Update Lego

This commit is contained in:
Ludovic Fernandez 2018-09-14 10:06:03 +02:00 committed by Traefiker Bot
parent 36966da701
commit 253060b4f3
185 changed files with 16653 additions and 3210 deletions

View file

@ -2,14 +2,14 @@ package egoscale
// API represents an API service
type API struct {
Description string `json:"description"`
IsAsync bool `json:"isasync"`
Name string `json:"name"`
Related string `json:"related"` // comma separated
Since string `json:"since"`
Type string `json:"type"`
Params []APIParam `json:"params"`
Response []APIResponse `json:"responses"`
Description string `json:"description,omitempty" doc:"description of the api"`
IsAsync bool `json:"isasync,omitempty" doc:"true if api is asynchronous"`
Name string `json:"name,omitempty" doc:"the name of the api command"`
Related string `json:"related,omitempty" doc:"comma separated related apis"`
Since string `json:"since,omitempty" doc:"version of CloudStack the api was introduced in"`
Type string `json:"type,omitempty" doc:"response field type"`
Params []APIParam `json:"params,omitempty" doc:"the list params the api accepts"`
Response []APIField `json:"response,omitempty" doc:"api response fields"`
}
// APIParam represents an API parameter field
@ -17,32 +17,23 @@ type APIParam struct {
Description string `json:"description"`
Length int64 `json:"length"`
Name string `json:"name"`
Related string `json:"related"` // comma separated
Since string `json:"since"`
Required bool `json:"required"`
Since string `json:"since,omitempty"`
Type string `json:"type"`
}
// APIResponse represents an API response field
type APIResponse struct {
Description string `json:"description"`
Name string `json:"name"`
Response []APIResponse `json:"response"`
Type string `json:"type"`
// APIField represents an API response field
type APIField struct {
Description string `json:"description"`
Name string `json:"name"`
Response []APIField `json:"response,omitempty"`
Type string `json:"type"`
}
// ListAPIs represents a query to list the api
//
// CloudStack API: https://cloudstack.apache.org/api/apidocs-4.10/apis/listApis.html
type ListAPIs struct {
Name string `json:"name,omitempty"`
}
func (*ListAPIs) name() string {
return "listApis"
}
func (*ListAPIs) response() interface{} {
return new(ListAPIsResponse)
Name string `json:"name,omitempty" doc:"API name"`
_ bool `name:"listApis" description:"lists all available apis on the server"`
}
// ListAPIsResponse represents a list of API
@ -50,3 +41,7 @@ type ListAPIsResponse struct {
Count int `json:"count"`
API []API `json:"api"`
}
func (*ListAPIs) response() interface{} {
return new(ListAPIsResponse)
}