cloud

package
v0.0.0-...-f72491b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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