secrets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoSecretErr = NoSecretError{}

Functions

func Register

func Register(ssf SecretStoreProvider, spec *v1.ProviderSpec)

Register a secret store provider with target spec.

Types

type NoSecretError

type NoSecretError struct{}

NoSecretError will be returned when GetSecret call can not find the desired secret.

func (NoSecretError) Error

func (NoSecretError) Error() string

type Providers

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

type SecretStore

type SecretStore interface {
	// GetSecret retrieves ref secret from various cloud secret manager.
	GetSecret(ctx context.Context, ref v1.ExternalSecretRef) ([]byte, error)
}

SecretStore provides the interface to interact with various cloud secret manager.

type SecretStoreProvider

type SecretStoreProvider interface {
	// NewSecretStore constructs a usable secret store with specific provider spec.
	NewSecretStore(spec v1.SecretStore) (SecretStore, error)
}

SecretStoreProvider is a factory type for secret store.

func GetProvider

func GetProvider(spec *v1.ProviderSpec) (SecretStoreProvider, bool)

GetProvider returns the provider from the provider spec.

func GetProviderByName

func GetProviderByName(providerName string) (SecretStoreProvider, bool)

GetProviderByName returns registered provider by name.

Jump to

Keyboard shortcuts

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