github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/dms/v1/queues/urls.go (about)

     1  package queues
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/huaweicloud/golangsdk"
     7  )
     8  
     9  // endpoint/queues
    10  const resourcePath = "queues"
    11  
    12  // createURL will build the rest query url of creation
    13  func createURL(client *golangsdk.ServiceClient) string {
    14  	return client.ServiceURL(resourcePath)
    15  }
    16  
    17  // deleteURL will build the url of deletion
    18  func deleteURL(client *golangsdk.ServiceClient, id string) string {
    19  	return client.ServiceURL(resourcePath, id)
    20  }
    21  
    22  // getURL will build the get url of get function
    23  func getURL(client *golangsdk.ServiceClient, id string, includeDeadLetter bool) string {
    24  	return client.ServiceURL(resourcePath, fmt.Sprintf("%s?include_deadletter=%t", id, includeDeadLetter))
    25  }
    26  
    27  // listURL will build the list url of list function
    28  func listURL(client *golangsdk.ServiceClient, includeDeadLetter bool) string {
    29  	return client.ServiceURL(fmt.Sprintf("%s?include_deadletter=%t", resourcePath, includeDeadLetter))
    30  }