github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/dms/v2/kafka/topics/urls.go (about)

     1  package topics
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  const (
     8  	resourcePath = "instances"
     9  	topicPath    = "topics"
    10  )
    11  
    12  // rootURL will build the url of create, update and list
    13  func rootURL(client *golangsdk.ServiceClient, instanceID string) string {
    14  	return client.ServiceURL(resourcePath, instanceID, topicPath)
    15  }
    16  
    17  // getURL will build the url of get
    18  func getURL(client *golangsdk.ServiceClient, instanceID, topic string) string {
    19  	return client.ServiceURL(resourcePath, instanceID, "management", topicPath, topic)
    20  }
    21  
    22  // deleteURL will build the url of delete
    23  func deleteURL(client *golangsdk.ServiceClient, instanceID string) string {
    24  	return client.ServiceURL(resourcePath, instanceID, topicPath, "delete")
    25  }