cloud

package
v0.0.0-...-30e45d9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient() http.Client

NewHTTPClient returns http client with max reauth retry support

Types

type KeystoneClient

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

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) GetClient

func (identity *KeystoneIdentity) GetClient() *gophercloud.ServiceClient

GetClient returns openstack client

func (*KeystoneIdentity) GetServiceAuthorization

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

GetServiceAuthorization returns the master authorization with full permissions

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