forked from gophercloud/utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.go
29 lines (22 loc) · 839 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
28
29
package measures
import "github.com/cro8ox/gophercloud"
const (
resourcePath = "metric"
batchCreateMetricsPath = "batch/metrics"
batchCreateResourcesMetricsPath = "batch/resources/metrics"
)
func resourceURL(c *gophercloud.ServiceClient, metricID string) string {
return c.ServiceURL(resourcePath, metricID, "measures")
}
func listURL(c *gophercloud.ServiceClient, metricID string) string {
return resourceURL(c, metricID)
}
func createURL(c *gophercloud.ServiceClient, metricID string) string {
return resourceURL(c, metricID)
}
func batchCreateMetricsURL(c *gophercloud.ServiceClient) string {
return c.ServiceURL(batchCreateMetricsPath, "measures")
}
func batchCreateResourcesMetricsURL(c *gophercloud.ServiceClient) string {
return c.ServiceURL(batchCreateResourcesMetricsPath, "measures")
}