github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/lbaas_v2/whitelists/results.go (about) 1 package whitelists 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 ) 6 7 type Whitelist struct { 8 ID string `json:"id"` 9 TenantId string `json:"tenant_id"` 10 ListenerId string `json:"listener_id"` 11 EnableWhitelist bool `json:"enable_whitelist"` 12 Whitelist string `json:"whitelist"` 13 } 14 15 type commonResult struct { 16 golangsdk.Result 17 } 18 19 func (r commonResult) Extract() (*Whitelist, error) { 20 s := &Whitelist{} 21 return s, r.ExtractInto(s) 22 } 23 24 func (r commonResult) ExtractInto(v interface{}) error { 25 return r.Result.ExtractIntoStructPtr(v, "whitelist") 26 } 27 28 type CreateResult struct { 29 commonResult 30 } 31 32 // GetResult represents the result of a get operation. 33 type GetResult struct { 34 commonResult 35 } 36 37 type UpdateResult struct { 38 commonResult 39 } 40 41 // DeleteResult represents the result of a delete operation. 42 type DeleteResult struct { 43 golangsdk.ErrResult 44 }