Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Environment name, which can contain 3 to 64 characters, starting with a letter. // Only letters, digits and underscores (_) are allowed. // Chinese characters must be in UTF-8 or Unicode format. Name string `json:"name" required:"true"` // Description of the environment, which can contain a maximum of 255 characters, // and the angle brackets (< and >) are not allowed. // Chinese characters must be in UTF-8 or Unicode format. Description string `json:"remark,omitempty"` }
CreateOpts allows to create a new APIG environment using given parameters
type Environment ¶
type Environment struct { // Environment ID. Id string `json:"id"` // Environment name. Name string `json:"name"` // Time when the environment is created. CreateTime string `json:"create_time"` // Description of the environment. Description string `json:"remark"` }
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Environment, error)
Create is a method to create a new APIG shared environment using given parameters.
func List ¶
func List(c *golangsdk.ServiceClient, opts ListOpts) ([]Environment, error)
List is a method to obtain an array of one or more environments according to the query parameters. Note: The list returned by the function only contains the environment of the first page. This is because the return body does not contain page number information, so the page number of the next page cannot be obtained.
func Update ¶
func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Environment, error)
Update is a method to update a APIG shared environment using given parameters.
type EnvironmentPage ¶
type EnvironmentPage struct {
pagination.SinglePageBase
}
EnvironmentPage represents the response pages of the List method.
type ListOpts ¶
type ListOpts struct { // Environment name. EnvName string `q:"name"` // Number of records displayed on each page. The default value is 20. PageSize int `q:"page_size"` // Page number. The default value is 1. PageNum int `q:"page_no"` // Parameter name for exact matching. PreciseSearch string `q:"precise_search"` // Limit number of records displayed on each page. The default value is 20. Limit int `q:"limit"` // Offset Page number. The default value is 1. Offset int `q:"offset"` }
type ListResp ¶
type ListResp struct { // Number of environments that match the query conditions. Total int `json:"total"` // Length of the returned environment list. Size int `json:"size"` // Environment list. Environments []Environment `json:"envs"` }
type UpdateOpts ¶
type UpdateOpts struct { // Name of the APIG shared environment. Name string `json:"name" required:"true"` // Description of the APIG shared environment. Description *string `json:"remark,omitempty"` }
UpdateOpts allows to update an existing APIG environment using given parameters