github.com/gophercloud/gophercloud@v1.11.0/openstack/identity/v3/roles/urls.go (about)

     1  package roles
     2  
     3  import "github.com/gophercloud/gophercloud"
     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  }