github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/cce/v3/clusters/urls.go (about) 1 package clusters 2 3 import "github.com/huaweicloud/golangsdk" 4 5 const ( 6 rootPath = "clusters" 7 certPath = "clustercert" 8 masterIpPath = "mastereip" 9 operationPath = "operation" 10 ) 11 12 func rootURL(client *golangsdk.ServiceClient) string { 13 return client.ServiceURL(rootPath) 14 } 15 16 func resourceURL(c *golangsdk.ServiceClient, id string) string { 17 return c.ServiceURL(rootPath, id) 18 } 19 20 func certificateURL(c *golangsdk.ServiceClient, id string) string { 21 return c.ServiceURL(rootPath, id, certPath) 22 } 23 24 func masterIpURL(c *golangsdk.ServiceClient, id string) string { 25 return c.ServiceURL(rootPath, id, masterIpPath) 26 } 27 28 func operationURL(c *golangsdk.ServiceClient, id, action string) string { 29 return c.ServiceURL(rootPath, id, operationPath, action) 30 }