Documentation ¶
Index ¶
- Variables
- type BackupStrategyInfor
- type BackupStrategyOps
- type CreateOps
- type CreateOpsBuilder
- type CreateResult
- type DataStoreInfo
- type DataStoreOps
- type DeleteResult
- type ExtendParamInfo
- type FlavorInfo
- type GetResult
- type HaInfor
- type HaOps
- type Instance
- type Job
- type ListResult
- type NicsInfor
- type NicsOps
- type SecurityGroupInfor
- type SecurityGroupOps
- type UpdateFlavorOps
- type UpdateFlavorOpsBuilder
- type UpdateOps
- type UpdateOpsBuilder
- type UpdatePolicyOps
- type UpdatePolicyOpsBuilder
- type UpdateResult
- func UpdateFlavorRef(client *golangsdk.ServiceClient, ops UpdateFlavorOpsBuilder, id string) (r UpdateResult)
- func UpdatePolicy(client *golangsdk.ServiceClient, ops UpdatePolicyOpsBuilder, id string) (r UpdateResult)
- func UpdateVolumeSize(client *golangsdk.ServiceClient, ops UpdateOpsBuilder, id string) (r UpdateResult)
- type VolumeInfor
- type VolumeOps
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type BackupStrategyInfor ¶
type BackupStrategyOps ¶
type CreateOps ¶
type CreateOps struct { Name string `json:"name" required:"true"` DataStore DataStoreOps `json:"datastore,omitempty"` FlavorRef string `json:"flavorRef" required:"true"` Volume VolumeOps `json:"volume,omitempty"` Region string `json:"region,omitempty"` AvailabilityZone string `json:"availabilityZone,omitempty"` Vpc string `json:"vpc,omitempty"` Nics NicsOps `json:"nics,omitempty"` SecurityGroup SecurityGroupOps `json:"securityGroup,omitempty"` DbPort string `json:"dbPort,omitempty"` BackupStrategy BackupStrategyOps `json:"backupStrategy,omitempty"` DbRtPd string `json:"dbRtPd,omitempty"` Ha HaOps `json:"ha,omitempty"` ReplicaOf string `json:"replicaOf,omitempty"` }
CreateOps is a struct that contains all the parameters.
func (CreateOps) ToInstanceCreateMap ¶
type CreateOpsBuilder ¶
CreateOpsBuilder is used for creating instance parameters. any struct providing the parameters should implement this interface
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, ops CreateOpsBuilder) (r CreateResult)
Create a instance with given parameters.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DataStoreInfo ¶
type DataStoreOps ¶
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
delete a instance via id
func (DeleteResult) ExtractInto ¶
func (r DeleteResult) ExtractInto(v interface{}) error
type ExtendParamInfo ¶
type ExtendParamInfo struct {
Jobs []Job `json:"jobs"`
}
type FlavorInfo ¶
type FlavorInfo struct {
Id string `json:"id"`
}
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(client *golangsdk.ServiceClient, id string) (r GetResult)
get a instance with detailed information by id
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type Instance ¶
type Instance struct { ID string `json:"id"` Status string `json:"status"` Name string `json:"name"` Created string `json:"created"` HostName string `json:"hostname"` Type string `json:"type"` Region string `json:"region"` Updated string `json:"updated"` AvailabilityZone string `json:"availabilityZone"` Vpc string `json:"vpc"` Nics NicsInfor `json:"nics"` SecurityGroup SecurityGroupInfor `json:"securityGroup"` Flavor FlavorInfo `json:"flavor"` Volume VolumeInfor `json:"volume"` DbPort int `json:"dbPort"` DataStore DataStoreInfo `json:"dataStoreInfo"` ExtendParameters ExtendParamInfo `json:"extendparam"` BackupStrategy BackupStrategyInfor `json:"backupStrategy"` Ha HaInfor `json:"ha"` SlaveId string `json:"slaveId"` }
type ListResult ¶
func (ListResult) Extract ¶
func (lr ListResult) Extract() ([]Instance, error)
type SecurityGroupInfor ¶
type SecurityGroupInfor struct {
Id string `json:"id"`
}
type SecurityGroupOps ¶
type SecurityGroupOps struct {
Id string `json:"id" required:"true"`
}
type UpdateFlavorOps ¶
type UpdateFlavorOps struct {
FlavorRef string `json:"flavorRef"`
}
func (UpdateFlavorOps) ToInstanceFlavorUpdateMap ¶
func (ops UpdateFlavorOps) ToInstanceFlavorUpdateMap() (map[string]interface{}, error)
type UpdateFlavorOpsBuilder ¶
type UpdateOps ¶
type UpdateOps struct {
Volume map[string]interface{} `json:"volume"`
}
func (UpdateOps) ToInstanceUpdateMap ¶
type UpdateOpsBuilder ¶
type UpdatePolicyOps ¶
func (UpdatePolicyOps) ToInstanceUpdatePolicyMap ¶
func (ops UpdatePolicyOps) ToInstanceUpdatePolicyMap() (map[string]interface{}, error)
type UpdatePolicyOpsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func UpdateFlavorRef ¶
func UpdateFlavorRef(client *golangsdk.ServiceClient, ops UpdateFlavorOpsBuilder, id string) (r UpdateResult)
func UpdatePolicy ¶
func UpdatePolicy(client *golangsdk.ServiceClient, ops UpdatePolicyOpsBuilder, id string) (r UpdateResult)
func UpdateVolumeSize ¶
func UpdateVolumeSize(client *golangsdk.ServiceClient, ops UpdateOpsBuilder, id string) (r UpdateResult)
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error
type VolumeInfor ¶
Click to show internal directories.
Click to hide internal directories.