package tokens

import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/tokens"

Package tokens provides information and interaction with the token API resource for the Rackspace Identity service.

Index

Variables

var (
	// ErrPasswordProvided is returned if both a password and an API key are provided to Create.
	ErrPasswordProvided = errors.New("Please provide either a password or an API key.")
)

Functions

func Create

func Create(client *gophercloud.ServiceClient, auth AuthOptions) os.CreateResult

Create authenticates to Rackspace's identity service and attempts to acquire a Token. Rather than interact with this service directly, users should generally call rackspace.AuthenticatedClient().

Types

type AuthOptions

type AuthOptions struct {
	os.AuthOptions
}

AuthOptions wraps the OpenStack AuthOptions struct to be able to customize the request body when API key authentication is used.

func WrapOptions

func WrapOptions(original gophercloud.AuthOptions) AuthOptions

WrapOptions embeds a root AuthOptions struct in a package-specific one.

func (AuthOptions) ToTokenCreateMap

func (auth AuthOptions) ToTokenCreateMap() (map[string]interface{}, error)

ToTokenCreateMap serializes an AuthOptions into a request body. If an API key is provided, it will be used, otherwise

Source Files

delegate.go doc.go

Version
v1.1.9-beta.0
Published
Feb 23, 2016
Platform
linux/amd64
Imports
3 packages
Last checked
2 minutes ago

Tools for package owners.