forked from rackspace/gophercloud
/
urls.go
27 lines (20 loc) · 847 Bytes
/
urls.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package policies
import "github.com/rackspace/gophercloud"
func listURL(c *gophercloud.ServiceClient, groupID string) string {
return c.ServiceURL("groups", groupID, "policies")
}
func createURL(c *gophercloud.ServiceClient, groupID string) string {
return c.ServiceURL("groups", groupID, "policies")
}
func getURL(c *gophercloud.ServiceClient, groupID, policyID string) string {
return c.ServiceURL("groups", groupID, "policies", policyID)
}
func updateURL(c *gophercloud.ServiceClient, groupID, policyID string) string {
return getURL(c, groupID, policyID)
}
func deleteURL(c *gophercloud.ServiceClient, groupID, policyID string) string {
return getURL(c, groupID, policyID)
}
func executeURL(c *gophercloud.ServiceClient, groupID, policyID string) string {
return c.ServiceURL("groups", groupID, "policies", policyID, "execute")
}