Documentation ¶
Index ¶
- type CommonFiled
- type CreateCloudServerResponse
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteOpts
- type DeleteOptsBuilder
- type DeleteResult
- type GetResult
- type Job
- type JobExecResult
- type ListOpts
- type ListResult
- type ListServersOptsBuilder
- type Server
- type ServerDetail
- type ServerIDs
- type Servers
- type UpdateInstance
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonFiled ¶
type CommonFiled struct { ServerID string `json:"origin_server_id,omitempty"` EdgeCloudID string `json:"edgecloud_id,omitempty"` EdgeCloudName string `json:"edgecloud_name,omitempty"` Location common.GeoLocation `json:"geolocation"` Operator common.Operator `json:"operator"` DomainID string `json:"domain_id"` }
CommonFiled is common filed
type CreateCloudServerResponse ¶
CreateCloudServerResponse is a structure for creating server return values
func CreateServer ¶
func CreateServer(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (createResult CreateCloudServerResponse, err error)
CreateServer requests a server to be provisioned to the user in the current tenant with response entity.
type CreateOpts ¶
type CreateOpts struct { common.ResourceOpts Coverage common.Coverage `json:"coverage" required:"true"` }
func (CreateOpts) ToServerCreateMap ¶
func (opts CreateOpts) ToServerCreateMap() (map[string]interface{}, error)
ToServerCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func (CreateResult) ExtractJob ¶
func (CreateResult) ExtractServer ¶
ExtractServer is used to extract server struct in response
type DeleteOpts ¶
type DeleteOpts struct {
Servers []cloudservers.Server `json:"servers"`
}
DeleteOpts to delete all Servers in server array
func (DeleteOpts) ToDeleteBodyMap ¶
func (opts DeleteOpts) ToDeleteBodyMap() (map[string]interface{}, error)
ToDeleteBodyMap converts DeleteOpts structures to map[string]interface{}
type DeleteOptsBuilder ¶
DeleteOptsBuilder to handle Delete request's body
type DeleteResult ¶
DeleteResult is the response from a Delete operation. Call its ExtractErr method to determine if the call succeeded or failed.
func DeleteServers ¶
func DeleteServers(client *golangsdk.ServiceClient, opts DeleteOptsBuilder) (r DeleteResult)
DeleteServers deletes all server in DeleteOptsBuilder
type GetResult ¶
GetResult contains the server result
func GetServer ¶
func GetServer(client *golangsdk.ServiceClient, serverID string) (r GetResult)
GetServer get server detail
func (GetResult) ExtractServerDetail ¶
func (r GetResult) ExtractServerDetail() (ServerDetail, error)
ExtractServerDetail 输出边缘实例详情
type Job ¶
type Job struct { // job id of create image Id string `json:"job_id"` }
Job 执行创建/删除接口时返回的jobid结构
type JobExecResult ¶
type JobExecResult struct {
// contains filtered or unexported fields
}
func (JobExecResult) ExtractJob ¶
func (JobExecResult) ExtractServer ¶
ExtractServer is used to extract server struct in response
type ListOpts ¶
type ListOpts struct { Limit int `q:"limit"` Offset int `q:"offset"` Name string `q:"name"` Area string `q:"area"` City string `q:"city"` Province string `q:"province"` EdgeCloudID string `q:"edgecloud_id"` Status string `q:"status"` }
func (ListOpts) ToListServersQuery ¶
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListServersOptsBuilder) (r ListResult)
func (ListResult) Extract ¶
func (r ListResult) Extract() (*Servers, error)
func (ListResult) ExtractJob ¶
func (ListResult) ExtractServer ¶
ExtractServer is used to extract server struct in response
type ListServersOptsBuilder ¶
type ServerDetail ¶
type ServerDetail struct {
Server *Server `json:"server"`
}
type ServerIDs ¶
type ServerIDs struct {
IDs []string `json:"server_ids"`
}
ServerIDs is a serverIds structure returned when you create a server
type UpdateInstance ¶
type UpdateInstance struct {
UpdateServer UpdateOpts `json:"server"`
}
UpdateInstance to update one server
func (UpdateInstance) ToUpdateBodyMap ¶
func (opts UpdateInstance) ToUpdateBodyMap() (map[string]interface{}, error)
ToUpdateBodyMap converts UpdateInstance structures to map[string]interface{}
type UpdateOpts ¶
type UpdateOpts struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` }
UpdateOpts to update one server options
type UpdateOptsBuilder ¶
UpdateOptsBuilder to handle Delete request's body
type UpdateResult ¶
UpdateResult contains the update result
func UpdateServer ¶
func UpdateServer(client *golangsdk.ServiceClient, opts UpdateOptsBuilder, serverID string) (r UpdateResult)
UpdateServer updates one server in UpdateOptsBuilder
func (UpdateResult) ExtractUpdateToServer ¶
func (r UpdateResult) ExtractUpdateToServer() (interface{}, error)
ExtractUpdateToServer extract CloudServer struct from UpdateResult