github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/mls/v1/instances/results.go (about) 1 package instances 2 3 import "github.com/huaweicloud/golangsdk" 4 5 type Instance struct { 6 ID string `json:"id"` 7 Name string `json:"name"` 8 Version string `json:"version"` 9 FlavorRef string `json:"flavorRef"` 10 Status string `json:"status"` 11 CurrentTask string `json:"currentTask"` 12 Network Network `json:"network"` 13 MrsCluster MrsCluster `json:"mrsCluster"` 14 Created string `json:"created"` 15 Updated string `json:"updated"` 16 InnerEndPoint string `json:"innerEndPoint"` 17 PublicEndPoint string `json:"publicEndPoint"` 18 } 19 20 type Network struct { 21 VpcId string `json:"vpcId"` 22 SubnetId string `json:"subnetId"` 23 SecurityGroupId string `json:"securityGroupId"` 24 AvailableZone string `json:"availableZone"` 25 PublicIP PublicIP `json:"publicIP"` 26 } 27 28 type PublicIP struct { 29 BindType string `json:"bindType"` 30 EipId string `json:"eipId"` 31 } 32 33 type MrsCluster struct { 34 Id string `json:"id"` 35 } 36 37 type instanceResult struct { 38 golangsdk.Result 39 } 40 41 // Extract will get the Instance object out of the commonResult object. 42 func (r instanceResult) Extract() (*Instance, error) { 43 var s Instance 44 err := r.ExtractInto(&s) 45 return &s, err 46 } 47 48 func (r instanceResult) ExtractInto(v interface{}) error { 49 return r.Result.ExtractIntoStructPtr(v, "instance") 50 } 51 52 type CreateResult struct { 53 instanceResult 54 } 55 56 type GetResult struct { 57 instanceResult 58 } 59 60 type DeleteResult struct { 61 golangsdk.ErrResult 62 }