github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/swr/v2/domains/Delete.go (about) 1 package domains 2 3 import ( 4 "fmt" 5 6 "github.com/opentelekomcloud/gophertelekomcloud" 7 ) 8 9 type GetOpts struct { 10 // Organization name 11 Namespace string `json:"-" required:"true"` 12 // Image repository name 13 Repository string `json:"-" required:"true"` 14 // Name of the account used for image sharing. 15 AccessDomain string `json:"access_domain"` 16 } 17 18 func Delete(client *golangsdk.ServiceClient, opts GetOpts) (err error) { 19 // DELETE /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains/{access_domain} 20 url := fmt.Sprintf("%s/%s", client.ServiceURL("manage", "namespaces", opts.Namespace, "repos", opts.Repository, "access-domains"), opts.AccessDomain) 21 _, err = client.Delete(url, nil) 22 return 23 }