blob: bf1e8b5ee78c3d68e8f8815f4fbac687f758bdcc [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 Hannaford4ab9aea2014-11-04 14:38:06 +010015)
Jamie Hannaford186d4e22014-10-31 12:26:11 +010016
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +010017func resourceURL(c *gophercloud.ServiceClient, id int) string {
18 return c.ServiceURL(path, strconv.Itoa(id))
Jamie Hannaford186d4e22014-10-31 12:26:11 +010019}
20
21func rootURL(c *gophercloud.ServiceClient) string {
22 return c.ServiceURL(path)
23}
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010024
25func protocolsURL(c *gophercloud.ServiceClient) string {
26 return c.ServiceURL(path, protocolsPath)
27}
Jamie Hannaford46336282014-11-04 14:48:20 +010028
29func algorithmsURL(c *gophercloud.ServiceClient) string {
30 return c.ServiceURL(path, algorithmsPath)
31}
Jamie Hannafordd78bb352014-11-07 16:36:09 +010032
33func loggingURL(c *gophercloud.ServiceClient, id int) string {
34 return c.ServiceURL(path, strconv.Itoa(id), logPath)
35}
Jamie Hannafordda45b422014-11-10 11:00:38 +010036
37func errorPageURL(c *gophercloud.ServiceClient, id int) string {
38 return c.ServiceURL(path, strconv.Itoa(id), epPath)
39}