github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/dms/v1/groups/urls.go (about) 1 package groups 2 3 import ( 4 "fmt" 5 6 "github.com/huaweicloud/golangsdk" 7 ) 8 9 // endpoint/queues/{queue_id}/groups 10 const resourcePathQueues = "queues" 11 const resourcePathGroups = "groups" 12 13 // createURL will build the rest query url of creation 14 func createURL(client *golangsdk.ServiceClient, queueID string) string { 15 return client.ServiceURL(resourcePathQueues, queueID, resourcePathGroups) 16 } 17 18 // deleteURL will build the url of deletion 19 func deleteURL(client *golangsdk.ServiceClient, queueID string, groupID string) string { 20 return client.ServiceURL(resourcePathQueues, queueID, resourcePathGroups, groupID) 21 } 22 23 // listURL will build the list url of list function 24 func listURL(client *golangsdk.ServiceClient, queueID string, includeDeadLetter bool) string { 25 return client.ServiceURL(resourcePathQueues, queueID, fmt.Sprintf("%s?include_deadletter=%t", resourcePathGroups, includeDeadLetter)) 26 }