credential_provider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCredentialNotFound = errors.New("credential with provided name was not found")
)

Functions

func IsValidProvider

func IsValidProvider(providerName string) bool

Types

type AwsProvider

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

func NewAwsProvider

func NewAwsProvider(properties map[string]interface{}) (provider AwsProvider, err error)

func (AwsProvider) GetCredentialNames

func (p AwsProvider) GetCredentialNames() ([]string, error)

func (AwsProvider) GetCredentialWithName

func (p AwsProvider) GetCredentialWithName(key string) (string, error)

func (AwsProvider) Shutdown

func (p AwsProvider) Shutdown()

type CredentialProvider

type CredentialProvider struct {
	Identifier CredentialProviderIdentifier
	Provider   Provider
}

func NewCredentialProvider

func NewCredentialProvider(id CredentialProviderIdentifier, properties map[string]interface{}) (provider CredentialProvider, err error)

type CredentialProviderIdentifier

type CredentialProviderIdentifier uint
const (
	CredentialProviderIdentifierInvalid    CredentialProviderIdentifier = iota
	CredentialProviderIdentifierGCP        CredentialProviderIdentifier = iota
	CredentialProviderIdentifierAWS        CredentialProviderIdentifier = iota
	CredentialProviderIdentifierENV        CredentialProviderIdentifier = iota
	CredentialProviderIdentifierKubernetes CredentialProviderIdentifier = iota
)

func CredentialProviderIdentifierFromString

func CredentialProviderIdentifierFromString(input string) CredentialProviderIdentifier

func (CredentialProviderIdentifier) Index

func (CredentialProviderIdentifier) IsValid

func (c CredentialProviderIdentifier) IsValid() bool

func (CredentialProviderIdentifier) String

type EnvironmentProvider

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

func NewEnvironmentProvider

func NewEnvironmentProvider() (provider EnvironmentProvider)

func (EnvironmentProvider) GetCredentialNames

func (p EnvironmentProvider) GetCredentialNames() ([]string, error)

func (EnvironmentProvider) GetCredentialWithName

func (p EnvironmentProvider) GetCredentialWithName(key string) (string, error)

func (EnvironmentProvider) GetCredentials

func (p EnvironmentProvider) GetCredentials() map[string]string

func (EnvironmentProvider) Shutdown

func (p EnvironmentProvider) Shutdown()

type GcpProvider

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

func NewGcpProvider

func NewGcpProvider(properties map[string]interface{}) (provider GcpProvider, err error)

func (GcpProvider) GetCredentialNames

func (p GcpProvider) GetCredentialNames() (names []string, err error)

func (GcpProvider) GetCredentialWithName

func (p GcpProvider) GetCredentialWithName(key string) (string, error)

func (GcpProvider) Shutdown

func (p GcpProvider) Shutdown()

type KubernetesProvider

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

func NewKubernetesProvider

func NewKubernetesProvider(properties map[string]interface{}) (provider KubernetesProvider, err error)

func (KubernetesProvider) GetCredentialNames

func (p KubernetesProvider) GetCredentialNames() ([]string, error)

func (KubernetesProvider) GetCredentialWithName

func (p KubernetesProvider) GetCredentialWithName(key string) (string, error)

func (KubernetesProvider) Shutdown

func (p KubernetesProvider) Shutdown()

type Provider

type Provider interface {
	GetCredentialNames() ([]string, error)
	GetCredentialWithName(string) (string, error)
	Shutdown()
}

A credential provider's provider interface this determines how credentials are retrieved

Jump to

Keyboard shortcuts

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