github.com/gophercloud/gophercloud@v1.11.0/openstack/identity/v3/extensions/trusts/urls.go (about)

     1  package trusts
     2  
     3  import "github.com/gophercloud/gophercloud"
     4  
     5  const resourcePath = "OS-TRUST/trusts"
     6  
     7  func rootURL(c *gophercloud.ServiceClient) string {
     8  	return c.ServiceURL(resourcePath)
     9  }
    10  
    11  func resourceURL(c *gophercloud.ServiceClient, id string) string {
    12  	return c.ServiceURL(resourcePath, id)
    13  }
    14  
    15  func createURL(c *gophercloud.ServiceClient) string {
    16  	return rootURL(c)
    17  }
    18  
    19  func deleteURL(c *gophercloud.ServiceClient, id string) string {
    20  	return resourceURL(c, id)
    21  }
    22  
    23  func listURL(c *gophercloud.ServiceClient) string {
    24  	return c.ServiceURL(resourcePath)
    25  }
    26  
    27  func listRolesURL(c *gophercloud.ServiceClient, id string) string {
    28  	return c.ServiceURL(resourcePath, id, "roles")
    29  }
    30  
    31  func getRoleURL(c *gophercloud.ServiceClient, id, roleID string) string {
    32  	return c.ServiceURL(resourcePath, id, "roles", roleID)
    33  }