2018-05-20 08:46:39 +00:00
|
|
|
package config
|
2018-05-19 13:17:21 +00:00
|
|
|
|
|
|
|
/* (1) Configuration
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
|
2018-05-20 08:46:39 +00:00
|
|
|
type MethodParameter 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-05-19 13:17:21 +00:00
|
|
|
Description string `json:"des"`
|
|
|
|
Permission [][]string `json:"per"`
|
2018-05-20 08:46:39 +00:00
|
|
|
Parameters *map[string]MethodParameter `json:"par"`
|
2018-05-19 13:17:21 +00:00
|
|
|
Options *map[string]interface{} `json:"opt"`
|
|
|
|
}
|
|
|
|
|
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-20 08:46:39 +00:00
|
|
|
Children map[string]Controller `json:"/"`
|
2018-05-19 13:17:21 +00:00
|
|
|
}
|