blob: 5100e94b0136aa15286ad91e0828f289149a11b6 [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 Hannaford4ab9aea2014-11-04 14:38:06 +010014)
Jamie Hannaford186d4e22014-10-31 12:26:11 +010015
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +010016func resourceURL(c *gophercloud.ServiceClient, id int) string {
17 return c.ServiceURL(path, strconv.Itoa(id))
Jamie Hannaford186d4e22014-10-31 12:26:11 +010018}
19
20func rootURL(c *gophercloud.ServiceClient) string {
21 return c.ServiceURL(path)
22}
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010023
24func protocolsURL(c *gophercloud.ServiceClient) string {
25 return c.ServiceURL(path, protocolsPath)
26}
Jamie Hannaford46336282014-11-04 14:48:20 +010027
28func algorithmsURL(c *gophercloud.ServiceClient) string {
29 return c.ServiceURL(path, algorithmsPath)
30}
Jamie Hannafordd78bb352014-11-07 16:36:09 +010031
32func loggingURL(c *gophercloud.ServiceClient, id int) string {
33 return c.ServiceURL(path, strconv.Itoa(id), logPath)
34}