github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/openstack/objectstorage/v1/containers/urls.go (about)

     1  package containers
     2  
     3  import (
     4  	"net/url"
     5  
     6  	"github.com/vnpaycloud-console/gophercloud/v2"
     7  	v1 "github.com/vnpaycloud-console/gophercloud/v2/openstack/objectstorage/v1"
     8  )
     9  
    10  func listURL(c *gophercloud.ServiceClient) string {
    11  	return c.Endpoint
    12  }
    13  
    14  func createURL(c *gophercloud.ServiceClient, container string) (string, error) {
    15  	if err := v1.CheckContainerName(container); err != nil {
    16  		return "", err
    17  	}
    18  	return c.ServiceURL(url.PathEscape(container)), nil
    19  }
    20  
    21  func getURL(c *gophercloud.ServiceClient, container string) (string, error) {
    22  	return createURL(c, container)
    23  }
    24  
    25  func deleteURL(c *gophercloud.ServiceClient, container string) (string, error) {
    26  	return createURL(c, container)
    27  }
    28  
    29  func updateURL(c *gophercloud.ServiceClient, container string) (string, error) {
    30  	return createURL(c, container)
    31  }
    32  
    33  func bulkDeleteURL(c *gophercloud.ServiceClient) string {
    34  	return c.Endpoint + "?bulk-delete=true"
    35  }