aicra/internal/controller/types.go

28 lines
716 B
Go
Raw Normal View History

package controller
2018-05-19 13:17:21 +00:00
/* (1) Configuration
---------------------------------------------------------*/
2018-06-01 08:51:51 +00:00
type Parameter struct {
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 {
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
Children map[string]*Controller `json:"/"`
2018-05-19 13:17:21 +00:00
}