Documentation ¶
Index ¶
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 CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Version string `json:"version" required:"true"` Network NetworkOpts `json:"network" required:"true"` Agency string `json:"agency,omitempty"` FlavorRef string `json:"flavorRef" required:"true"` MrsCluster MrsClusterOpts `json:"mrsCluster" required:"true"` }
CreateOpts is a struct that contains all the parameters.
func (CreateOpts) ToInstanceCreateMap ¶
func (opts CreateOpts) ToInstanceCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
CreateOptsBuilder 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
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create an instance with given parameters.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
delete an instance via id
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(client *golangsdk.ServiceClient, id string) (r GetResult)
get an 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"` Name string `json:"name"` Version string `json:"version"` FlavorRef string `json:"flavorRef"` Status string `json:"status"` CurrentTask string `json:"currentTask"` Network Network `json:"network"` MrsCluster MrsCluster `json:"mrsCluster"` Created string `json:"created"` Updated string `json:"updated"` InnerEndPoint string `json:"innerEndPoint"` PublicEndPoint string `json:"publicEndPoint"` }
type MrsCluster ¶
type MrsCluster struct {
Id string `json:"id"`
}
type MrsClusterOpts ¶
type NetworkOpts ¶
type NetworkOpts struct { VpcId string `json:"vpcId" required:"true"` SubnetId string `json:"subnetId" required:"true"` SecurityGroupId string `json:"securityGroupId,omitempty"` AvailableZone string `json:"availableZone" required:"true"` PublicIP PublicIPOpts `json:"publicIP" required:"true"` }
type PublicIPOpts ¶
type PublicIPOpts struct {
BindType string `json:"bindType" required:"true"`
}
Click to show internal directories.
Click to hide internal directories.