github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dms/v2/rabbitmq/instances/urls.go (about) 1 package instances 2 3 import "github.com/chnsz/golangsdk" 4 5 // endpoint/instances 6 const resourcePath = "instances" 7 8 const rabbitMqEngine = "rabbitmq" 9 10 // createURL will build the rest query url of creation 11 func createURL(client *golangsdk.ServiceClient) string { 12 return client.ServiceURL(client.ProjectID, resourcePath) 13 } 14 15 // createWithEngineURL will build the rest query url of creation 16 func createWithEngineURL(client *golangsdk.ServiceClient) string { 17 return client.ServiceURL(rabbitMqEngine, client.ProjectID, resourcePath) 18 } 19 20 // deleteURL will build the url of deletion 21 func deleteURL(client *golangsdk.ServiceClient, id string) string { 22 return client.ServiceURL(client.ProjectID, resourcePath, id) 23 } 24 25 // updateURL will build the url of update 26 func updateURL(c *golangsdk.ServiceClient, id string) string { 27 return c.ServiceURL(c.ProjectID, resourcePath, id) 28 } 29 30 // getURL will build the get url of get function 31 func getURL(client *golangsdk.ServiceClient, id string) string { 32 return client.ServiceURL(client.ProjectID, resourcePath, id) 33 } 34 35 func listURL(client *golangsdk.ServiceClient) string { 36 return client.ServiceURL(client.ProjectID, resourcePath) 37 } 38 39 func extend(client *golangsdk.ServiceClient, id string) string { 40 return client.ServiceURL(rabbitMqEngine, client.ProjectID, resourcePath, id, "extend") 41 } 42 43 // resetPasswordURL will build the url of resetting password 44 func resetPasswordURL(c *golangsdk.ServiceClient, id string) string { 45 return c.ServiceURL(c.ProjectID, resourcePath, id, "password") 46 }