github.com/gophercloud/gophercloud@v1.11.0/openstack/objectstorage/v1/objects/urls.go (about) 1 package objects 2 3 import ( 4 "github.com/gophercloud/gophercloud" 5 "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers" 6 ) 7 8 func listURL(c *gophercloud.ServiceClient, container string) (string, error) { 9 if err := containers.CheckContainerName(container); err != nil { 10 return "", err 11 } 12 return c.ServiceURL(container), nil 13 } 14 15 func copyURL(c *gophercloud.ServiceClient, container, object string) (string, error) { 16 if err := containers.CheckContainerName(container); err != nil { 17 return "", err 18 } 19 return c.ServiceURL(container, object), nil 20 } 21 22 func createURL(c *gophercloud.ServiceClient, container, object string) (string, error) { 23 return copyURL(c, container, object) 24 } 25 26 func getURL(c *gophercloud.ServiceClient, container, object string) (string, error) { 27 return copyURL(c, container, object) 28 } 29 30 func deleteURL(c *gophercloud.ServiceClient, container, object string) (string, error) { 31 return copyURL(c, container, object) 32 } 33 34 func downloadURL(c *gophercloud.ServiceClient, container, object string) (string, error) { 35 return copyURL(c, container, object) 36 } 37 38 func updateURL(c *gophercloud.ServiceClient, container, object string) (string, error) { 39 return copyURL(c, container, object) 40 } 41 42 func bulkDeleteURL(c *gophercloud.ServiceClient) string { 43 return c.Endpoint + "?bulk-delete=true" 44 }