urls.go 822 B

1234567891011121314151617181920212223242526272829303132333435
  1. package clusters
  2. import "devel.mephi.ru/iacherepanov/openstack-gophercloud"
  3. var apiVersion = "v1"
  4. var apiName = "clusters"
  5. func commonURL(client *gophercloud.ServiceClient) string {
  6. return client.ServiceURL(apiVersion, apiName)
  7. }
  8. func idURL(client *gophercloud.ServiceClient, id string) string {
  9. return client.ServiceURL(apiVersion, apiName, id)
  10. }
  11. func createURL(client *gophercloud.ServiceClient) string {
  12. return commonURL(client)
  13. }
  14. func getURL(client *gophercloud.ServiceClient, id string) string {
  15. return idURL(client, id)
  16. }
  17. func listURL(client *gophercloud.ServiceClient) string {
  18. return commonURL(client)
  19. }
  20. func updateURL(client *gophercloud.ServiceClient, id string) string {
  21. return idURL(client, id)
  22. }
  23. func deleteURL(client *gophercloud.ServiceClient, id string) string {
  24. return idURL(client, id)
  25. }