gophercloud: github.com/rackspace/gophercloud/openstack/identity/v2/extensions/admin/roles Index | Files

package roles

import "github.com/rackspace/gophercloud/openstack/identity/v2/extensions/admin/roles"

Package roles provides functionality to interact with and control roles on the API.

A role represents a personality that a user can assume when performing a specific set of operations. If a role includes a set of rights and privileges, a user assuming that role inherits those rights and privileges.

When a token is generated, the list of roles that user can assume is returned back to them. Services that are being called by that user determine how they interpret the set of roles a user has and to which operations or resources each role grants access.

It is up to individual services such as Compute or Image to assign meaning to these roles. As far as the Identity service is concerned, a role is an arbitrary name assigned by the user.

Index

Package Files

docs.go requests.go results.go urls.go

Constants

const (
    ExtPath  = "OS-KSADM"
    RolePath = "roles"
    UserPath = "users"
)

func ExtractRoles Uses

func ExtractRoles(page pagination.Page) ([]Role, error)

ExtractRoles returns a slice of roles contained in a single page of results.

func List Uses

func List(client *gophercloud.ServiceClient) pagination.Pager

List is the operation responsible for listing all available global roles that a user can adopt.

type Role Uses

type Role struct {
    // The unique ID for the role.
    ID  string

    // The human-readable name of the role.
    Name string

    // The description of the role.
    Description string

    // The associated service for this role.
    ServiceID string
}

Role represents an API role resource.

type RolePage Uses

type RolePage struct {
    pagination.SinglePageBase
}

RolePage is a single page of a user Role collection.

func (RolePage) IsEmpty Uses

func (page RolePage) IsEmpty() (bool, error)

IsEmpty determines whether or not a page of Tenants contains any results.

type UserRoleResult Uses

type UserRoleResult struct {
    gophercloud.ErrResult
}

UserRoleResult represents the result of either an AddUserRole or a DeleteUserRole operation.

func AddUserRole Uses

func AddUserRole(client *gophercloud.ServiceClient, tenantID, userID, roleID string) UserRoleResult

AddUserRole is the operation responsible for assigning a particular role to a user. This is confined to the scope of the user's tenant - so the tenant ID is a required argument.

func DeleteUserRole Uses

func DeleteUserRole(client *gophercloud.ServiceClient, tenantID, userID, roleID string) UserRoleResult

DeleteUserRole is the operation responsible for deleting a particular role from a user. This is confined to the scope of the user's tenant - so the tenant ID is a required argument.

Package roles imports 3 packages (graph) and is imported by 2 packages. Updated 2016-07-23. Refresh now. Tools for package owners.