github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/openstack/identity/v3/roles/urls.go (about) 1 package roles 2 3 import "github.com/vnpaycloud-console/gophercloud/v2" 4 5 const ( 6 rolePath = "roles" 7 ) 8 9 func listURL(client *gophercloud.ServiceClient) string { 10 return client.ServiceURL(rolePath) 11 } 12 13 func getURL(client *gophercloud.ServiceClient, roleID string) string { 14 return client.ServiceURL(rolePath, roleID) 15 } 16 17 func createURL(client *gophercloud.ServiceClient) string { 18 return client.ServiceURL(rolePath) 19 } 20 21 func updateURL(client *gophercloud.ServiceClient, roleID string) string { 22 return client.ServiceURL(rolePath, roleID) 23 } 24 25 func deleteURL(client *gophercloud.ServiceClient, roleID string) string { 26 return client.ServiceURL(rolePath, roleID) 27 } 28 29 func listAssignmentsURL(client *gophercloud.ServiceClient) string { 30 return client.ServiceURL("role_assignments") 31 } 32 33 func listAssignmentsOnResourceURL(client *gophercloud.ServiceClient, targetType, targetID, actorType, actorID string) string { 34 return client.ServiceURL(targetType, targetID, actorType, actorID, rolePath) 35 } 36 37 func assignURL(client *gophercloud.ServiceClient, targetType, targetID, actorType, actorID, roleID string) string { 38 return client.ServiceURL(targetType, targetID, actorType, actorID, rolePath, roleID) 39 } 40 41 func createRoleInferenceRuleURL(client *gophercloud.ServiceClient, priorRoleID, impliedRoleID string) string { 42 return client.ServiceURL(rolePath, priorRoleID, "implies", impliedRoleID) 43 } 44 45 func getRoleInferenceRuleURL(client *gophercloud.ServiceClient, priorRoleID, impliedRoleID string) string { 46 return client.ServiceURL(rolePath, priorRoleID, "implies", impliedRoleID) 47 } 48 49 func listRoleInferenceRulesURL(client *gophercloud.ServiceClient) string { 50 return client.ServiceURL("role_inferences") 51 } 52 53 func deleteRoleInferenceRuleURL(client *gophercloud.ServiceClient, priorRoleID, impliedRoleID string) string { 54 return client.ServiceURL(rolePath, priorRoleID, "implies", impliedRoleID) 55 }