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