github.com/gophercloud/gophercloud@v1.11.0/openstack/containerinfra/v1/clusters/urls.go (about) 1 package clusters 2 3 import ( 4 "github.com/gophercloud/gophercloud" 5 ) 6 7 var apiName = "clusters" 8 9 func commonURL(client *gophercloud.ServiceClient) string { 10 return client.ServiceURL(apiName) 11 } 12 13 func idURL(client *gophercloud.ServiceClient, id string) string { 14 return client.ServiceURL(apiName, id) 15 } 16 17 func createURL(client *gophercloud.ServiceClient) string { 18 return commonURL(client) 19 } 20 21 func deleteURL(client *gophercloud.ServiceClient, id string) string { 22 return idURL(client, id) 23 } 24 25 func getURL(c *gophercloud.ServiceClient, id string) string { 26 return c.ServiceURL("clusters", id) 27 } 28 29 func listURL(client *gophercloud.ServiceClient) string { 30 return client.ServiceURL("clusters") 31 } 32 33 func listDetailURL(client *gophercloud.ServiceClient) string { 34 return client.ServiceURL("clusters", "detail") 35 } 36 37 func updateURL(client *gophercloud.ServiceClient, id string) string { 38 return idURL(client, id) 39 } 40 41 func upgradeURL(client *gophercloud.ServiceClient, id string) string { 42 return client.ServiceURL("clusters", id, "actions/upgrade") 43 } 44 45 func resizeURL(client *gophercloud.ServiceClient, id string) string { 46 return client.ServiceURL("clusters", id, "actions/resize") 47 }