tenants

package
v0.9.1 Latest Latest
Warning

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

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

Documentation

Overview

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

See http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2 and http://developer.openstack.org/api-ref-identity-v2.html#admin-tenants for more information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *gophercloud.ServiceClient, opts *ListOpts) pagination.Pager

List enumerates the Tenants to which the current token has access.

Types

type ListOpts

type ListOpts struct {
	// Marker is the ID of the last Tenant on the previous page.
	Marker string `q:"marker"`

	// Limit specifies the page size.
	Limit int `q:"limit"`
}

ListOpts filters the Tenants that are returned by the List call.

type Tenant

type Tenant struct {
	// ID is a unique identifier for this tenant.
	ID string `mapstructure:"id"`

	// Name is a friendlier user-facing name for this tenant.
	Name string `mapstructure:"name"`

	// Description is a human-readable explanation of this Tenant's purpose.
	Description string `mapstructure:"description"`

	// Enabled indicates whether or not a tenant is active.
	Enabled bool `mapstructure:"enabled"`
}

Tenant is a grouping of users in the identity service.

func ExtractTenants

func ExtractTenants(page pagination.Page) ([]Tenant, error)

ExtractTenants returns a slice of Tenants contained in a single page of results.

type TenantPage

type TenantPage struct {
	pagination.LinkedPageBase
}

TenantPage is a single page of Tenant results.

func (TenantPage) IsEmpty

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

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

func (TenantPage) NextPageURL

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

NextPageURL extracts the "next" link from the tenants_links section of the result.

Jump to

Keyboard shortcuts

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