roles

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2015 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListAssignments

ListAssignments enumerates the roles assigned to a specified resource.

Types

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:"group.id"`
	RoleId         string `q:"role.id"`
	ScopeDomainId  string `q:"scope.domain.id"`
	ScopeProjectId string `q:"scope.project.id"`
	UserId         string `q:"user.id"`
	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 {
	pagination.LinkedPageBase
}

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