Jon Perritt | 8c4327f | 2014-09-21 23:35:47 -0500 | [diff] [blame] | 1 | package snapshots |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
Jon Perritt | 6d5561b | 2014-10-01 21:42:15 -0500 | [diff] [blame] | 5 | func createURL(c *gophercloud.ServiceClient) string { |
Jon Perritt | 8c4327f | 2014-09-21 23:35:47 -0500 | [diff] [blame] | 6 | return c.ServiceURL("snapshots") |
| 7 | } |
| 8 | |
Jon Perritt | 6d5561b | 2014-10-01 21:42:15 -0500 | [diff] [blame] | 9 | func deleteURL(c *gophercloud.ServiceClient, id string) string { |
Jon Perritt | 8c4327f | 2014-09-21 23:35:47 -0500 | [diff] [blame] | 10 | return c.ServiceURL("snapshots", id) |
| 11 | } |
Jon Perritt | 6d5561b | 2014-10-01 21:42:15 -0500 | [diff] [blame] | 12 | |
| 13 | func getURL(c *gophercloud.ServiceClient, id string) string { |
| 14 | return deleteURL(c, id) |
| 15 | } |
| 16 | |
| 17 | func listURL(c *gophercloud.ServiceClient) string { |
| 18 | return createURL(c) |
| 19 | } |
| 20 | |
| 21 | func metadataURL(c *gophercloud.ServiceClient, id string) string { |
| 22 | return c.ServiceURL("snapshots", id, "metadata") |
| 23 | } |
| 24 | |
Jon Perritt | e357e3d | 2014-10-03 01:53:57 -0500 | [diff] [blame] | 25 | func updateMetadataURL(c *gophercloud.ServiceClient, id string) string { |
Jon Perritt | 6d5561b | 2014-10-01 21:42:15 -0500 | [diff] [blame] | 26 | return metadataURL(c, id) |
| 27 | } |