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

     1  package instances
     2  
     3  import "github.com/huaweicloud/golangsdk"
     4  
     5  // endpoint/instances
     6  const resourcePath = "instances"
     7  const passwordPath = "password"
     8  const extendPath = "extend"
     9  
    10  // createURL will build the rest query url of creation
    11  func createURL(client *golangsdk.ServiceClient) string {
    12  	return client.ServiceURL(resourcePath)
    13  }
    14  
    15  // deleteURL will build the url of deletion
    16  func deleteURL(client *golangsdk.ServiceClient, id string) string {
    17  	return client.ServiceURL(resourcePath, id)
    18  }
    19  
    20  // updateURL will build the url of update
    21  func updateURL(c *golangsdk.ServiceClient, id string) string {
    22  	return c.ServiceURL(resourcePath, id)
    23  }
    24  
    25  // getURL will build the get url of get function
    26  func getURL(client *golangsdk.ServiceClient, id string) string {
    27  	return client.ServiceURL(resourcePath, id)
    28  }
    29  
    30  // passwordURL will build the password update function
    31  func passwordURL(client *golangsdk.ServiceClient, id string) string {
    32  	return client.ServiceURL(resourcePath, id, passwordPath)
    33  }
    34  
    35  // extendURL will build the extend update function
    36  func extendURL(client *golangsdk.ServiceClient, id string) string {
    37  	return client.ServiceURL(resourcePath, id, extendPath)
    38  }
    39  
    40  func listURL(client *golangsdk.ServiceClient) string {
    41  	return client.ServiceURL(resourcePath)
    42  }