blob: 89f66f2799aa55ee31064b06389d62f90a75bb20 [file] [log] [blame]
Jamie Hannaford2a130242014-10-28 11:19:46 +01001package users
Jamie Hannafordb319d472014-10-29 10:57:22 +01002
Jon Perritt27249f42016-02-18 10:35:59 -06003import "github.com/gophercloud/gophercloud"
Jamie Hannafordb319d472014-10-29 10:57:22 +01004
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}