2018-09-27 11:43:36 +00:00
|
|
|
package config
|
2018-05-19 13:17:21 +00:00
|
|
|
|
|
|
|
/* (1) Configuration
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
|
2018-06-01 08:51:51 +00:00
|
|
|
type Parameter struct {
|
2018-06-03 13:08:47 +00:00
|
|
|
Description string `json:"info"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Rename string `json:"name,omitempty"`
|
|
|
|
Optional bool
|
|
|
|
Default *interface{} `json:"default"`
|
2018-05-19 13:17:21 +00:00
|
|
|
}
|
2018-05-20 08:46:39 +00:00
|
|
|
type Method struct {
|
2018-06-03 13:08:47 +00:00
|
|
|
Description string `json:"info"`
|
|
|
|
Permission [][]string `json:"scope"`
|
|
|
|
Parameters map[string]*Parameter `json:"in"`
|
|
|
|
Download *bool `json:"download"`
|
2018-05-19 13:17:21 +00:00
|
|
|
}
|
|
|
|
|
2018-05-20 08:46:39 +00:00
|
|
|
type Controller struct {
|
|
|
|
GET *Method `json:"GET"`
|
|
|
|
POST *Method `json:"POST"`
|
|
|
|
PUT *Method `json:"PUT"`
|
|
|
|
DELETE *Method `json:"DELETE"`
|
2018-05-19 13:17:21 +00:00
|
|
|
|
2018-05-21 11:02:15 +00:00
|
|
|
Children map[string]*Controller `json:"/"`
|
2018-05-19 13:17:21 +00:00
|
|
|
}
|