cloud

package
v0.0.0-...-3f89d33 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeystoneClient

type KeystoneClient interface {
	GetTenantID(string) (string, error)
	GetTenantName(string) (string, error)
	VerifyToken(string) (schema.Authorization, error)
	GetServiceAuthorization() (schema.Authorization, error)
}

KeystoneClient represents keystone client

func NewKeystoneV2Client

func NewKeystoneV2Client(authURL, userName, password, tenantName string) (KeystoneClient, error)

NewKeystoneV2Client is an constructor for KeystoneV2Client

func NewKeystoneV3Client

func NewKeystoneV3Client(authURL, userName, password, domainName, tenantName string) (KeystoneClient, error)

NewKeystoneV3Client is an constructor for KeystoneV3Client

type KeystoneIdentity

type KeystoneIdentity struct {
	Client KeystoneClient
}

KeystoneIdentity middleware

func NewKeystoneIdentity

func NewKeystoneIdentity(authURL, userName, password, domainName, tenantName, version string) (*KeystoneIdentity, error)

NewKeystoneIdentity is an constructor for KeystoneIdentity middleware

func (*KeystoneIdentity) GetServiceAuthorization

func (identity *KeystoneIdentity) GetServiceAuthorization() (schema.Authorization, error)

GetServiceAuthorization returns the master authorization with full permisions

func (*KeystoneIdentity) GetTenantID

func (identity *KeystoneIdentity) GetTenantID(tenantName string) (string, error)

GetTenantID maps the given tenant/project name to the tenant's/project's ID

func (*KeystoneIdentity) GetTenantName

func (identity *KeystoneIdentity) GetTenantName(tenantID string) (string, error)

GetTenantName maps the given tenant/project name to the tenant's/project's ID

func (*KeystoneIdentity) VerifyToken

func (identity *KeystoneIdentity) VerifyToken(token string) (schema.Authorization, error)

VerifyToken verifies identity

type RoundTripper

type RoundTripper struct {
	// contains filtered or unexported fields
}

RoundTripper limits number of Reauth attempts

func (*RoundTripper) RoundTrip

func (lrt *RoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

RoundTrip limits number of Reauth attempts

Jump to

Keyboard shortcuts

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