github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/identity/v2/extensions/admin/roles/urls.go (about) 1 package roles 2 3 import "github.com/huaweicloud/golangsdk" 4 5 const ( 6 ExtPath = "OS-KSADM" 7 RolePath = "roles" 8 UserPath = "users" 9 ) 10 11 func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 return c.ServiceURL(ExtPath, RolePath, id) 13 } 14 15 func rootURL(c *golangsdk.ServiceClient) string { 16 return c.ServiceURL(ExtPath, RolePath) 17 } 18 19 func userRoleURL(c *golangsdk.ServiceClient, tenantID, userID, roleID string) string { 20 return c.ServiceURL("tenants", tenantID, UserPath, userID, RolePath, ExtPath, roleID) 21 }