github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/apigw/groups/results.go (about) 1 package groups 2 3 import ( 4 "time" 5 6 "github.com/huaweicloud/golangsdk" 7 ) 8 9 type UrlDomain struct { 10 ID string `json:"id"` 11 Domain string `json:"domain"` 12 CnameStatus int `json:"cname_status"` 13 SslID string `json:"ssl_id"` 14 SslName string `json:"ssl_name"` 15 } 16 17 // Group contains all the information associated with a API group. 18 type Group struct { 19 // Unique identifier for the Group. 20 ID string `json:"id"` 21 // Human-readable display name for the Group. 22 Name string `json:"name"` 23 // Description of the API group. 24 Remark string `json:"remark"` 25 // Status of the Group. 26 Status int `json:"status"` 27 // Indicates whether the API group has been listed on the marketplace. 28 OnSellStatus int `json:"on_sell_status"` 29 // Subdomain name automatically allocated by the system to the API group. 30 SlDomain string `json:"sl_domain"` 31 // Total number of times all APIs in the API group can be accessed. 32 CallLimits int `json:"call_limits"` 33 // The type of Group to create, either SATA or SSD. 34 TimeInterval int `json:"time_interval"` 35 // Time unit for limiting the number of API calls 36 TimeUnit string `json:"time_unit"` 37 // List of independent domain names bound to the API group 38 UrlDomains []UrlDomain `json:"url_domains"` 39 // Time when the API group is created 40 RegisterTime time.Time `json:"-"` 41 // Time when the API group was last modified 42 UpdateTime time.Time `json:"-"` 43 } 44 45 type commonResult struct { 46 golangsdk.Result 47 } 48 49 // Extract will get the Group object out of the commonResult object. 50 func (r commonResult) Extract() (*Group, error) { 51 var s Group 52 err := r.ExtractInto(&s) 53 return &s, err 54 } 55 56 // CreateResult contains the response body and error from a Create request. 57 type CreateResult struct { 58 commonResult 59 } 60 61 // GetResult contains the response body and error from a Get request. 62 type GetResult struct { 63 commonResult 64 } 65 66 // UpdateResult contains the response body and error from an Update request. 67 type UpdateResult struct { 68 commonResult 69 } 70 71 // DeleteResult contains the response body and error from a Delete request. 72 type DeleteResult struct { 73 golangsdk.ErrResult 74 }