Jamie Hannaford | 0ca076c | 2014-10-30 13:12:35 +0100 | [diff] [blame] | 1 | package roles |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
Jamie Hannaford | 1d58e7a | 2014-10-30 13:23:33 +0100 | [diff] [blame^] | 5 | const extPath = "OS-KSADMN/roles" |
Jamie Hannaford | 0ca076c | 2014-10-30 13:12:35 +0100 | [diff] [blame] | 6 | |
| 7 | func resourceURL(c *gophercloud.ServiceClient, id string) string { |
Jamie Hannaford | 1d58e7a | 2014-10-30 13:23:33 +0100 | [diff] [blame^] | 8 | return c.ServiceURL(extPath, id) |
Jamie Hannaford | 0ca076c | 2014-10-30 13:12:35 +0100 | [diff] [blame] | 9 | } |
| 10 | |
| 11 | func rootURL(c *gophercloud.ServiceClient) string { |
Jamie Hannaford | 1d58e7a | 2014-10-30 13:23:33 +0100 | [diff] [blame^] | 12 | return c.ServiceURL(extPath) |
| 13 | } |
| 14 | |
| 15 | func userRoleURL(c *gophercloud.ServiceClient, tenantID, userID, roleID string) string { |
| 16 | return c.ServiceURL("tenants", tenantID, "users", userID, extPath, roleID) |
Jamie Hannaford | 0ca076c | 2014-10-30 13:12:35 +0100 | [diff] [blame] | 17 | } |