blob: 7ec4385d743b09aa93db5dd39a5b78b9092950d0 [file] [log] [blame]
Jamie Hannaford2a130242014-10-28 11:19:46 +01001package users
Jamie Hannafordb319d472014-10-29 10:57:22 +01002
3import "github.com/rackspace/gophercloud"
4
Jamie Hannaforde680e422014-10-29 14:55:57 +01005const (
6 tenantPath = "tenants"
7 userPath = "users"
Jamie Hannaford4cdfa922014-10-30 11:41:48 +01008 rolePath = "roles"
Jamie Hannaforde680e422014-10-29 14:55:57 +01009)
Jamie Hannafordb319d472014-10-29 10:57:22 +010010
Jamie Hannaford6e4d7952014-10-29 16:18:29 +010011func ResourceURL(c *gophercloud.ServiceClient, id string) string {
Jamie Hannaforde680e422014-10-29 14:55:57 +010012 return c.ServiceURL(userPath, id)
Jamie Hannafordb319d472014-10-29 10:57:22 +010013}
14
15func rootURL(c *gophercloud.ServiceClient) string {
Jamie Hannaforde680e422014-10-29 14:55:57 +010016 return c.ServiceURL(userPath)
17}
18
19func listRolesURL(c *gophercloud.ServiceClient, tenantID, userID string) string {
Jamie Hannaford4cdfa922014-10-30 11:41:48 +010020 return c.ServiceURL(tenantPath, tenantID, userPath, userID, rolePath)
Jamie Hannafordb319d472014-10-29 10:57:22 +010021}