github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/elb/v3/loadbalancers/urls.go (about)

     1  package loadbalancers
     2  
     3  import "github.com/chnsz/golangsdk"
     4  
     5  const (
     6  	rootPath     = "elb"
     7  	resourcePath = "loadbalancers"
     8  	statusPath   = "statuses"
     9  	forcePath    = "force-elb"
    10  	azPath       = "availability-zone"
    11  )
    12  
    13  func rootURL(c *golangsdk.ServiceClient) string {
    14  	return c.ServiceURL(rootPath, resourcePath)
    15  }
    16  
    17  func resourceURL(c *golangsdk.ServiceClient, id string) string {
    18  	return c.ServiceURL(rootPath, resourcePath, id)
    19  }
    20  
    21  func statusRootURL(c *golangsdk.ServiceClient, id string) string {
    22  	return c.ServiceURL(rootPath, resourcePath, id, statusPath)
    23  }
    24  
    25  func resourceForceDeleteURL(c *golangsdk.ServiceClient, id string) string {
    26  	return c.ServiceURL(rootPath, resourcePath, id, forcePath)
    27  }
    28  
    29  func updateAvailabilityZoneURL(c *golangsdk.ServiceClient, id string, action string) string {
    30  	return c.ServiceURL(rootPath, resourcePath, id, azPath, action)
    31  }
    32  
    33  func changeChargingModeURL(c *golangsdk.ServiceClient) string {
    34  	return c.ServiceURL(rootPath, resourcePath, "change-charge-mode")
    35  }