blob: 471a86b0a7e2570f3f8e66ffd1f7ed1133d85237 [file] [log] [blame]
Jamie Hannafordfba65af2014-11-03 10:32:37 +01001package lbs
Jamie Hannaford186d4e22014-10-31 12:26:11 +01002
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +01003import (
4 "strconv"
5
6 "github.com/rackspace/gophercloud"
7)
Jamie Hannaford186d4e22014-10-31 12:26:11 +01008
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +01009const (
Jamie Hannaford46336282014-11-04 14:48:20 +010010 path = "loadbalancers"
11 protocolsPath = "protocols"
12 algorithmsPath = "algorithms"
Jamie Hannafordd78bb352014-11-07 16:36:09 +010013 logPath = "connectionlogging"
Jamie Hannafordda45b422014-11-10 11:00:38 +010014 epPath = "errorpage"
Jamie Hannaford3da65282014-11-10 11:36:16 +010015 stPath = "stats"
Jamie Hannaford20b75882014-11-10 13:39:51 +010016 cachePath = "contentcaching"
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010017)
Jamie Hannaford186d4e22014-10-31 12:26:11 +010018
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +010019func resourceURL(c *gophercloud.ServiceClient, id int) string {
20 return c.ServiceURL(path, strconv.Itoa(id))
Jamie Hannaford186d4e22014-10-31 12:26:11 +010021}
22
23func rootURL(c *gophercloud.ServiceClient) string {
24 return c.ServiceURL(path)
25}
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010026
27func protocolsURL(c *gophercloud.ServiceClient) string {
28 return c.ServiceURL(path, protocolsPath)
29}
Jamie Hannaford46336282014-11-04 14:48:20 +010030
31func algorithmsURL(c *gophercloud.ServiceClient) string {
32 return c.ServiceURL(path, algorithmsPath)
33}
Jamie Hannafordd78bb352014-11-07 16:36:09 +010034
35func loggingURL(c *gophercloud.ServiceClient, id int) string {
36 return c.ServiceURL(path, strconv.Itoa(id), logPath)
37}
Jamie Hannafordda45b422014-11-10 11:00:38 +010038
39func errorPageURL(c *gophercloud.ServiceClient, id int) string {
40 return c.ServiceURL(path, strconv.Itoa(id), epPath)
41}
Jamie Hannaford3da65282014-11-10 11:36:16 +010042
43func statsURL(c *gophercloud.ServiceClient, id int) string {
44 return c.ServiceURL(path, strconv.Itoa(id), stPath)
45}
Jamie Hannaford20b75882014-11-10 13:39:51 +010046
47func cacheURL(c *gophercloud.ServiceClient, id int) string {
48 return c.ServiceURL(path, strconv.Itoa(id), cachePath)
49}