cloud

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 4

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

Jump to

Keyboard shortcuts

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