github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/iec/v1/bandwidths/results.go (about) 1 package bandwidths 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 "github.com/huaweicloud/golangsdk/openstack/iec/v1/common" 6 ) 7 8 type commonResult struct { 9 golangsdk.Result 10 } 11 12 //BandWidthObject 带宽的结构体,用于创建和更新请求 13 type BandWidthObject struct { 14 BandWidth common.Bandwidth `json:"bandwidth"` 15 } 16 17 type GetResult struct { 18 commonResult 19 } 20 21 func (r GetResult) Extract() (*BandWidthObject, error) { 22 var entity BandWidthObject 23 err := r.ExtractIntoStructPtr(&entity, "") 24 return &entity, err 25 } 26 27 type UpdateResult struct { 28 commonResult 29 } 30 31 func (r UpdateResult) Extract() (*BandWidthObject, error) { 32 var entity BandWidthObject 33 err := r.ExtractIntoStructPtr(&entity, "") 34 return &entity, err 35 }