credentialmanager

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredentialsNotFoundErrMsg = "Credentials not found"
	CredentialMissingErrMsg   = "Username/Password is missing"
	UnknownSecretKeyErrMsg    = "Unknown secret key"
)

Error Messages

Variables

View Source
var (
	ErrCredentialsNotFound = errors.New(CredentialsNotFoundErrMsg)
	ErrCredentialMissing   = errors.New(CredentialMissingErrMsg)
	ErrUnknownSecretKey    = errors.New(UnknownSecretKeyErrMsg)
)

Error constants

Functions

This section is empty.

Types

type Credential

type Credential struct {
	User     string `gcfg:"user"`
	Password string `gcfg:"password"`
}

type SecretCache

type SecretCache struct {
	VirtualCenter map[string]*Credential
	Secret        *v1.Secret
	SecretFile    map[string][]byte
	// contains filtered or unexported fields
}

func (*SecretCache) GetCredential

func (cache *SecretCache) GetCredential(server string) (Credential, bool)

func (*SecretCache) GetSecret

func (cache *SecretCache) GetSecret() *corev1.Secret

func (*SecretCache) UpdateSecret

func (cache *SecretCache) UpdateSecret(secret *corev1.Secret)

func (*SecretCache) UpdateSecretFile

func (cache *SecretCache) UpdateSecretFile(data map[string][]byte)

type SecretCredentialManager

type SecretCredentialManager struct {
	SecretName            string
	SecretNamespace       string
	SecretLister          clientv1.SecretLister
	SecretsDirectory      string
	SecretsDirectoryParse bool
	Cache                 *SecretCache
}

func (*SecretCredentialManager) GetCredential

func (secretCredentialManager *SecretCredentialManager) GetCredential(server string) (*Credential, error)

GetCredential returns credentials for the given vCenter Server. GetCredential returns error if Secret is not added or SecretDirectory is not set (ie No Creds).

Jump to

Keyboard shortcuts

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