urls.go 664 B

12345678910111213141516171819202122232425262728
  1. package snapshots
  2. import "devel.mephi.ru/iacherepanov/openstack-gophercloud"
  3. func createURL(c *gophercloud.ServiceClient) string {
  4. return c.ServiceURL("snapshots")
  5. }
  6. func deleteURL(c *gophercloud.ServiceClient, id string) string {
  7. return c.ServiceURL("snapshots", id)
  8. }
  9. func getURL(c *gophercloud.ServiceClient, id string) string {
  10. return deleteURL(c, id)
  11. }
  12. func listURL(c *gophercloud.ServiceClient) string {
  13. return createURL(c)
  14. }
  15. func metadataURL(c *gophercloud.ServiceClient, id string) string {
  16. return c.ServiceURL("snapshots", id, "metadata")
  17. }
  18. func updateMetadataURL(c *gophercloud.ServiceClient, id string) string {
  19. return metadataURL(c, id)
  20. }