github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/elbaas/loadbalancer_elbs/urls.go (about) 1 package loadbalancer_elbs 2 3 import "github.com/huaweicloud/golangsdk" 4 5 const ( 6 rootPath = "elbaas" 7 resourcePath = "loadbalancers" 8 ) 9 10 func rootURL(c *golangsdk.ServiceClient) string { 11 return c.ServiceURL(rootPath, resourcePath) 12 } 13 14 func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 return c.ServiceURL(rootPath, resourcePath, id) 16 } 17 18 func deleteURL(c *golangsdk.ServiceClient, id string, keepEIP bool) string { 19 if keepEIP { 20 return c.ServiceURL(rootPath, resourcePath, id, "keep-eip") 21 } 22 return c.ServiceURL(rootPath, resourcePath, id) 23 }