Jamie Hannaford | fba65af | 2014-11-03 10:32:37 +0100 | [diff] [blame] | 1 | package lbs |
Jamie Hannaford | 186d4e2 | 2014-10-31 12:26:11 +0100 | [diff] [blame] | 2 | |
Jamie Hannaford | 5f95e6a | 2014-10-31 16:13:44 +0100 | [diff] [blame] | 3 | import ( |
| 4 | "strconv" |
| 5 | |
| 6 | "github.com/rackspace/gophercloud" |
| 7 | ) |
Jamie Hannaford | 186d4e2 | 2014-10-31 12:26:11 +0100 | [diff] [blame] | 8 | |
Jamie Hannaford | 4ab9aea | 2014-11-04 14:38:06 +0100 | [diff] [blame] | 9 | const ( |
Jamie Hannaford | 4633628 | 2014-11-04 14:48:20 +0100 | [diff] [blame] | 10 | path = "loadbalancers" |
| 11 | protocolsPath = "protocols" |
| 12 | algorithmsPath = "algorithms" |
Jamie Hannaford | d78bb35 | 2014-11-07 16:36:09 +0100 | [diff] [blame^] | 13 | logPath = "connectionlogging" |
Jamie Hannaford | 4ab9aea | 2014-11-04 14:38:06 +0100 | [diff] [blame] | 14 | ) |
Jamie Hannaford | 186d4e2 | 2014-10-31 12:26:11 +0100 | [diff] [blame] | 15 | |
Jamie Hannaford | 5f95e6a | 2014-10-31 16:13:44 +0100 | [diff] [blame] | 16 | func resourceURL(c *gophercloud.ServiceClient, id int) string { |
| 17 | return c.ServiceURL(path, strconv.Itoa(id)) |
Jamie Hannaford | 186d4e2 | 2014-10-31 12:26:11 +0100 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | func rootURL(c *gophercloud.ServiceClient) string { |
| 21 | return c.ServiceURL(path) |
| 22 | } |
Jamie Hannaford | 4ab9aea | 2014-11-04 14:38:06 +0100 | [diff] [blame] | 23 | |
| 24 | func protocolsURL(c *gophercloud.ServiceClient) string { |
| 25 | return c.ServiceURL(path, protocolsPath) |
| 26 | } |
Jamie Hannaford | 4633628 | 2014-11-04 14:48:20 +0100 | [diff] [blame] | 27 | |
| 28 | func algorithmsURL(c *gophercloud.ServiceClient) string { |
| 29 | return c.ServiceURL(path, algorithmsPath) |
| 30 | } |
Jamie Hannaford | d78bb35 | 2014-11-07 16:36:09 +0100 | [diff] [blame^] | 31 | |
| 32 | func loggingURL(c *gophercloud.ServiceClient, id int) string { |
| 33 | return c.ServiceURL(path, strconv.Itoa(id), logPath) |
| 34 | } |