github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/fwaas/policies/urls.go (about) 1 package policies 2 3 import "github.com/huaweicloud/golangsdk" 4 5 const ( 6 rootPath = "fw" 7 resourcePath = "firewall_policies" 8 insertPath = "insert_rule" 9 removePath = "remove_rule" 10 ) 11 12 func rootURL(c *golangsdk.ServiceClient) string { 13 return c.ServiceURL(rootPath, resourcePath) 14 } 15 16 func resourceURL(c *golangsdk.ServiceClient, id string) string { 17 return c.ServiceURL(rootPath, resourcePath, id) 18 } 19 20 func insertURL(c *golangsdk.ServiceClient, id string) string { 21 return c.ServiceURL(rootPath, resourcePath, id, insertPath) 22 } 23 24 func removeURL(c *golangsdk.ServiceClient, id string) string { 25 return c.ServiceURL(rootPath, resourcePath, id, removePath) 26 }