tokens

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
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

Jump to

Keyboard shortcuts

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