Version: v0.9.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2016 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0



Package roles provides information and interaction with the roles API resource for the OpenStack Identity service.



This section is empty.


This section is empty.


func ListAssignments

ListAssignments enumerates the roles assigned to a specified resource.


type Domain

type Domain struct {
	ID string `json:"id,omitempty"`

type Group

type Group struct {
	ID string `json:"id,omitempty"`

type ListAssignmentsOpts

type ListAssignmentsOpts struct {
	GroupId        string `q:""`
	RoleId         string `q:""`
	ScopeDomainId  string `q:""`
	ScopeProjectId string `q:""`
	UserId         string `q:""`
	Effective      bool   `q:"effective"`

ListAssignmentsOpts allows you to query the ListAssignments method. Specify one of or a combination of GroupId, RoleId, ScopeDomainId, ScopeProjectId, and/or UserId to search for roles assigned to corresponding entities. Effective lists effective assignments at the user, project, and domain level, allowing for the effects of group membership.

func (ListAssignmentsOpts) ToRolesListAssignmentsQuery

func (opts ListAssignmentsOpts) ToRolesListAssignmentsQuery() (string, error)

ToRolesListAssignmentsQuery formats a ListAssignmentsOpts into a query string.

type ListAssignmentsOptsBuilder

type ListAssignmentsOptsBuilder interface {
	ToRolesListAssignmentsQuery() (string, error)

ListAssignmentsOptsBuilder allows extensions to add additional parameters to the ListAssignments request.

type Project

type Project struct {
	ID string `json:"id,omitempty"`

type Role

type Role struct {
	ID string `json:"id,omitempty"`

type RoleAssignment

type RoleAssignment struct {
	Role  Role  `json:"role,omitempty"`
	Scope Scope `json:"scope,omitempty"`
	User  User  `json:"user,omitempty"`
	Group Group `json:"group,omitempty"`

RoleAssignment is the result of a role assignments query.

func ExtractRoleAssignments

func ExtractRoleAssignments(page pagination.Page) ([]RoleAssignment, error)

ExtractRoleAssignments extracts a slice of RoleAssignments from a Collection acquired from List.

type RoleAssignmentsPage

type RoleAssignmentsPage struct {

RoleAssignmentsPage is a single page of RoleAssignments results.

func (RoleAssignmentsPage) IsEmpty

func (p RoleAssignmentsPage) IsEmpty() (bool, error)

IsEmpty returns true if the page contains no results.

func (RoleAssignmentsPage) NextPageURL

func (page RoleAssignmentsPage) NextPageURL() (string, error)

NextPageURL uses the response's embedded link reference to navigate to the next page of results.

type Scope

type Scope struct {
	Domain  Domain  `json:"domain,omitempty"`
	Project Project `json:"domain,omitempty"`

type User

type User struct {
	ID string `json:"id,omitempty"`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL