github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/apigw/v2/channels/urls.go (about) 1 package channels 2 3 import ( 4 "fmt" 5 6 "github.com/huaweicloud/golangsdk" 7 ) 8 9 func buildRootPath(instanceId string) string { 10 return fmt.Sprintf("instances/%s/vpc-channels", instanceId) 11 } 12 13 func rootURL(c *golangsdk.ServiceClient, instanceId string) string { 14 return c.ServiceURL(buildRootPath(instanceId)) 15 } 16 17 func resourceURL(c *golangsdk.ServiceClient, instanceId, chanId string) string { 18 return c.ServiceURL(buildRootPath(instanceId), chanId) 19 } 20 21 func membersURL(c *golangsdk.ServiceClient, instanceId, chanId string) string { 22 return c.ServiceURL(buildRootPath(instanceId), chanId, "members") 23 } 24 25 func memberURL(c *golangsdk.ServiceClient, instanceId, chanId, memberId string) string { 26 return c.ServiceURL(buildRootPath(instanceId), chanId, "members", memberId) 27 }