github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/iec/v1/edgeclouds/requests.go (about) 1 package edgeclouds 2 3 import ( 4 "net/http" 5 6 "github.com/huaweicloud/golangsdk" 7 ) 8 9 func Get(client *golangsdk.ServiceClient, edgeCloudID string) (r GetResult) { 10 url := GetURL(client, edgeCloudID) 11 _, r.Err = client.Get(url, &r.Body, &golangsdk.RequestOpts{ 12 OkCodes: []int{http.StatusOK}, 13 }) 14 return 15 } 16 17 func Delete(client *golangsdk.ServiceClient, edgeCloudID string) (r DeleteResult) { 18 _, r.Err = client.Delete(DeleteURL(client, edgeCloudID), &golangsdk.RequestOpts{ 19 OkCodes: []int{http.StatusNoContent}, 20 }) 21 return 22 }