github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/apigw/v2/apigroups/results.go (about) 1 package apigroups 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 "github.com/huaweicloud/golangsdk/pagination" 6 ) 7 8 type commonResult struct { 9 golangsdk.Result 10 } 11 12 // CreateResult represents a result of the Create method. 13 type CreateResult struct { 14 commonResult 15 } 16 17 // GetResult represents a result of the Get operation. 18 type GetResult struct { 19 commonResult 20 } 21 22 // UpdateResult represents a result of the Update operation. 23 type UpdateResult struct { 24 commonResult 25 } 26 27 type Group struct { 28 // List of independent domain names bound to the API group. 29 UrlDomians []UrlDomian `json:"url_domains"` 30 // Time when the API group was last modified. 31 UpdateTime string `json:"update_time"` 32 // API group name. 33 Name string `json:"name"` 34 // Indicates whether the API group has been listed on the marketplace. 35 // 1: listed 36 // 2: not listed 37 // 3: under review. 38 OnSellStatus int `json:"on_sell_status"` 39 // Description. 40 Description string `json:"remark"` 41 // Subdomain name that API Gateway automatically allocates to the API group. 42 Subdomain string `json:"sl_domain"` 43 // Subdomain names that API Gateway automatically allocates to the API group. 44 Subdomains []string `json:"sl_domains"` 45 // ID. 46 Id string `json:"id"` 47 // Registraion time. 48 RegistraionTime string `json:"register_time"` 49 // group status. 50 // 1: valid 51 Status int `json:"status"` 52 // Indicates whether the API group is the default group. 53 IsDefault int `json:"is_default"` 54 } 55 56 type UrlDomian struct { 57 // Domain ID. 58 Id string `json:"id"` 59 // Domain ID. 60 DomainName string `json:"domain"` 61 // CNAME resolution status of the domain name. 62 // 1: not resolved 63 // 2: resolving 64 // 3: resolved 65 // 4: resolving failed 66 ResolutionStatus int `json:"cname_status"` 67 // SSL certificate ID. 68 SSLId string `json:"ssl_id"` 69 // SSL certificate name. 70 SSLName string `json:"ssl_name"` 71 // Minimum SSL version. TLS 1.1 and TLS 1.2 are supported. 72 // Enumeration values: 73 // TLSv1.1 74 // TLSv1.2 75 MinSSLVersion string `json:"min_ssl_version"` 76 } 77 78 func (r commonResult) Extract() (*Group, error) { 79 var s Group 80 err := r.ExtractInto(&s) 81 return &s, err 82 } 83 84 // GroupPage represents the response pages of the List operation. 85 type GroupPage struct { 86 pagination.SinglePageBase 87 } 88 89 func ExtractGroups(r pagination.Page) ([]Group, error) { 90 var s []Group 91 err := r.(GroupPage).Result.ExtractIntoSlicePtr(&s, "groups") 92 return s, err 93 } 94 95 // DeleteResult represents a result of the Delete method. 96 type DeleteResult struct { 97 golangsdk.ErrResult 98 }