Jamie Hannaford | 2a13024 | 2014-10-28 11:19:46 +0100 | [diff] [blame] | 1 | package users |
Jamie Hannaford | b319d47 | 2014-10-29 10:57:22 +0100 | [diff] [blame] | 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
Jamie Hannaford | e680e42 | 2014-10-29 14:55:57 +0100 | [diff] [blame^] | 5 | const ( |
| 6 | tenantPath = "tenants" |
| 7 | userPath = "users" |
| 8 | ) |
Jamie Hannaford | b319d47 | 2014-10-29 10:57:22 +0100 | [diff] [blame] | 9 | |
| 10 | func resourceURL(c *gophercloud.ServiceClient, id string) string { |
Jamie Hannaford | e680e42 | 2014-10-29 14:55:57 +0100 | [diff] [blame^] | 11 | return c.ServiceURL(userPath, id) |
Jamie Hannaford | b319d47 | 2014-10-29 10:57:22 +0100 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | func rootURL(c *gophercloud.ServiceClient) string { |
Jamie Hannaford | e680e42 | 2014-10-29 14:55:57 +0100 | [diff] [blame^] | 15 | return c.ServiceURL(userPath) |
| 16 | } |
| 17 | |
| 18 | func listRolesURL(c *gophercloud.ServiceClient, tenantID, userID string) string { |
| 19 | return c.ServiceURL(tenantPath, tenantID, userPath, userID) |
Jamie Hannaford | b319d47 | 2014-10-29 10:57:22 +0100 | [diff] [blame] | 20 | } |