github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dms/v2/kafka/instances/urls.go (about)

     1  package instances
     2  
     3  import "github.com/chnsz/golangsdk"
     4  
     5  // endpoint/instances
     6  const resourcePath = "instances"
     7  
     8  // createURL will build the rest query url of creation
     9  func createURL(client *golangsdk.ServiceClient) string {
    10  	return client.ServiceURL(client.ProjectID, resourcePath)
    11  }
    12  
    13  // deleteURL will build the url of deletion
    14  func deleteURL(client *golangsdk.ServiceClient, id string) string {
    15  	return client.ServiceURL(client.ProjectID, resourcePath, id)
    16  }
    17  
    18  // updateURL will build the url of update
    19  func updateURL(c *golangsdk.ServiceClient, id string) string {
    20  	return c.ServiceURL(c.ProjectID, resourcePath, id)
    21  }
    22  
    23  // getURL will build the get url of get function
    24  func getURL(client *golangsdk.ServiceClient, id string) string {
    25  	return client.ServiceURL(client.ProjectID, resourcePath, id)
    26  }
    27  
    28  func listURL(client *golangsdk.ServiceClient) string {
    29  	return client.ServiceURL(client.ProjectID, resourcePath)
    30  }
    31  
    32  func extend(client *golangsdk.ServiceClient, id string) string {
    33  	return client.ServiceURL(client.ProjectID, resourcePath, id, "extend")
    34  }
    35  
    36  func crossVpcURL(client *golangsdk.ServiceClient, id string) string {
    37  	return client.ServiceURL(client.ProjectID, resourcePath, id, "crossvpc/modify")
    38  }
    39  
    40  // autoTopicURL will build the url of UpdateAutoTopic
    41  func autoTopicURL(c *golangsdk.ServiceClient, id string) string {
    42  	return c.ServiceURL(c.ProjectID, resourcePath, id, "autotopic")
    43  }
    44  
    45  // resetPasswordURL will build the url of resetting password
    46  func resetPasswordURL(c *golangsdk.ServiceClient, id string) string {
    47  	return c.ServiceURL(c.ProjectID, resourcePath, id, "password")
    48  }
    49  
    50  func configurationsURL(c *golangsdk.ServiceClient, id string) string {
    51  	return c.ServiceURL(c.ProjectID, "instances", id, "configs")
    52  }
    53  
    54  func actionURL(c *golangsdk.ServiceClient) string {
    55  	return c.ServiceURL(c.ProjectID, "instances", "action")
    56  }
    57  
    58  func tasksURL(c *golangsdk.ServiceClient, id string) string {
    59  	return c.ServiceURL(c.ProjectID, "instances", id, "tasks")
    60  }