swauth

package
v0.0.0-...-2804b72 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewObjectStorageV1

func NewObjectStorageV1(pc *gophercloud.ProviderClient, authOpts AuthOpts) (*gophercloud.ServiceClient, error)

NewObjectStorageV1 creates a Swauth-authenticated *gophercloud.ServiceClient client that can issue ObjectStorage-based API calls.

Types

type AuthOpts

type AuthOpts struct {
	// User is an Swauth-based username in username:tenant format.
	User string `h:"X-Auth-User" required:"true"`
	// Key is a secret/password to authenticate the User with.
	Key string `h:"X-Auth-Key" required:"true"`
}

AuthOpts specifies an authentication request.

func (AuthOpts) ToAuthOptsMap

func (opts AuthOpts) ToAuthOptsMap() (map[string]string, error)

ToAuthOptsMap formats an AuthOpts structure into a request body.

type AuthOptsBuilder

type AuthOptsBuilder interface {
	ToAuthOptsMap() (map[string]string, error)
}

AuthOptsBuilder describes struct types that can be accepted by the Auth call. The AuthOpts struct in this package does.

type AuthResult

type AuthResult struct {
	Token      string `json:"X-Auth-Token"`
	StorageURL string `json:"X-Storage-Url"`
	CDNURL     string `json:"X-CDN-Management-Url"`
}

AuthResult contains the authentication information from a Swauth authentication request.

type GetAuthResult

type GetAuthResult struct {
	gophercloud.HeaderResult
}

GetAuthResult temporarily contains the response from a Swauth authentication call.

func Auth

Auth performs an authentication request for a Swauth-based user.

func (GetAuthResult) Extract

func (r GetAuthResult) Extract() (*AuthResult, error)

Extract is a method that attempts to interpret any Swauth authentication response as a AuthResult struct.

Directories

Path Synopsis
objectstorage_swauth_v1
objectstorage_swauth_v1

Jump to

Keyboard shortcuts

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