github.com/gophercloud/gophercloud@v1.11.0/openstack/identity/v2/users/urls.go (about)

     1  package users
     2  
     3  import "github.com/gophercloud/gophercloud"
     4  
     5  const (
     6  	tenantPath = "tenants"
     7  	userPath   = "users"
     8  	rolePath   = "roles"
     9  )
    10  
    11  func ResourceURL(c *gophercloud.ServiceClient, id string) string {
    12  	return c.ServiceURL(userPath, id)
    13  }
    14  
    15  func rootURL(c *gophercloud.ServiceClient) string {
    16  	return c.ServiceURL(userPath)
    17  }
    18  
    19  func listRolesURL(c *gophercloud.ServiceClient, tenantID, userID string) string {
    20  	return c.ServiceURL(tenantPath, tenantID, userPath, userID, rolePath)
    21  }