2018-05-20 08:46:39 +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-05-19 13:17:21 +00:00
|
|
|
Description string `json:"des"`
|
|
|
|
Type string `json:"typ"`
|
|
|
|
Rename *string `json:"ren"`
|
|
|
|
Optional *bool `json:"opt"`
|
|
|
|
Default *interface{} `json:"def"`
|
|
|
|
}
|
2018-05-20 08:46:39 +00:00
|
|
|
type Method struct {
|
2018-06-01 08:51:51 +00:00
|
|
|
Description string `json:"des"`
|
|
|
|
Permission [][]string `json:"per"`
|
|
|
|
Parameters map[string]*Parameter `json:"par"`
|
|
|
|
Options map[string]interface{} `json:"opt"`
|
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
|
|
|
}
|