gophercloud: github.com/rackspace/gophercloud/rackspace/identity/v2/tokens Index | Files

package tokens

import "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

Package Files

delegate.go doc.go

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.")
)

func Create Uses

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().

type AuthOptions Uses

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 Uses

func WrapOptions(original gophercloud.AuthOptions) AuthOptions

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

func (AuthOptions) ToTokenCreateMap Uses

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

Package tokens imports 3 packages (graph) and is imported by 7 packages. Updated 2016-07-23. Refresh now. Tools for package owners.