github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/identity/v3/roles/urls.go (about)

     1  package roles
     2  
     3  import "github.com/huaweicloud/golangsdk"
     4  
     5  const (
     6  	rolePath = "roles"
     7  )
     8  
     9  func listURL(client *golangsdk.ServiceClient) string {
    10  	return client.ServiceURL(rolePath)
    11  }
    12  
    13  func getURL(client *golangsdk.ServiceClient, roleID string) string {
    14  	return client.ServiceURL(rolePath, roleID)
    15  }
    16  
    17  func createURL(client *golangsdk.ServiceClient) string {
    18  	return client.ServiceURL(rolePath)
    19  }
    20  
    21  func updateURL(client *golangsdk.ServiceClient, roleID string) string {
    22  	return client.ServiceURL(rolePath, roleID)
    23  }
    24  
    25  func deleteURL(client *golangsdk.ServiceClient, roleID string) string {
    26  	return client.ServiceURL(rolePath, roleID)
    27  }
    28  
    29  func listAssignmentsURL(client *golangsdk.ServiceClient, targetType, targetID, actorType, actorID string) string {
    30  	return client.ServiceURL(targetType, targetID, actorType, actorID, rolePath)
    31  }
    32  
    33  func assignURL(client *golangsdk.ServiceClient, targetType, targetID, actorType, actorID, roleID string) string {
    34  	return client.ServiceURL(targetType, targetID, actorType, actorID, rolePath, roleID)
    35  }