rackspace

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RackspaceUSIdentity is an identity endpoint located in the United States.
	RackspaceUSIdentity = "https://identity.api.rackspacecloud.com/v2.0/"

	// RackspaceUKIdentity is an identity endpoint located in the UK.
	RackspaceUKIdentity = "https://lon.identity.api.rackspacecloud.com/v2.0/"
)

Variables

View Source
var (
	ErrNoAuthURL  = fmt.Errorf("Environment variable RS_AUTH_URL or OS_AUTH_URL need to be set.")
	ErrNoUsername = fmt.Errorf("Environment variable RS_USERNAME or OS_USERNAME need to be set.")
	ErrNoPassword = fmt.Errorf("Environment variable RS_API_KEY or RS_PASSWORD needs to be set.")
)

ErrNoAuthUrl, ErrNoUsername, and ErrNoPassword errors indicate of the required RS_AUTH_URL, RS_USERNAME, or RS_PASSWORD environment variables, respectively, remain undefined. See the AuthOptions() function for more details.

Functions

func AuthOptionsFromEnv

func AuthOptionsFromEnv() (gophercloud.AuthOptions, error)

AuthOptionsFromEnv fills out an identity.AuthOptions structure with the settings found on the various Rackspace RS_* environment variables.

func Authenticate

func Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error

Authenticate or re-authenticate against the most recent identity service supported at the provided endpoint.

func AuthenticateV2

func AuthenticateV2(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error

AuthenticateV2 explicitly authenticates with v2 of the identity service.

func AuthenticatedClient

func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)

AuthenticatedClient logs in to Rackspace with the provided credentials and constructs a ProviderClient that's ready to operate.

If the provided AuthOptions does not specify an explicit IdentityEndpoint, it will default to the canonical, production Rackspace US identity endpoint.

func NewBlockStorageV1

NewBlockStorageV1 creates a ServiceClient that can be used to access the Rackspace Cloud Block Storage v1 API.

func NewClient

func NewClient(endpoint string) (*gophercloud.ProviderClient, error)

NewClient creates a client that's prepared to communicate with the Rackspace API, but is not yet authenticated. Most users will probably prefer using the AuthenticatedClient function instead.

Provide the base URL of the identity endpoint you wish to authenticate against as "endpoint". Often, this will be either RackspaceUSIdentity or RackspaceUKIdentity.

func NewComputeV2

NewComputeV2 creates a ServiceClient that may be used to access the v2 compute service.

func NewIdentityV2

func NewIdentityV2(client *gophercloud.ProviderClient) *gophercloud.ServiceClient

NewIdentityV2 creates a ServiceClient that may be used to access the v2 identity service.

func NewObjectCDNV1

NewObjectCDNV1 creates a ServiceClient that may be used with the Rackspace v1 CDN.

func NewObjectStorageV1

NewObjectStorageV1 creates a ServiceClient that may be used with the Rackspace v1 object storage package.

Types

This section is empty.

Directories

Path Synopsis
blockstorage
compute
identity
objectstorage

Jump to

Keyboard shortcuts

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