secrets

package
Version: v0.0.0-...-9518a5e Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderLocal is the thing to use to indicate you want the Local provider for secret management.
	ProviderLocal = "local"
)

Variables

This section is empty.

Functions

func ProvideSecretKeeper

func ProvideSecretKeeper(_ context.Context, cfg *Config) (*secrets.Keeper, error)

ProvideSecretKeeper provides a new secret keeper.

Types

type Config

type Config struct {
	Provider string
	Key      string
	// contains filtered or unexported fields
}

Config is how we configure the secret manager.

type SecretManager

type SecretManager interface {
	Encrypt(ctx context.Context, value interface{}) (string, error)
	Decrypt(ctx context.Context, content string, v interface{}) error
}

SecretManager manages secrets.

func ProvideSecretManager

func ProvideSecretManager(logger logging.Logger, keeper *secrets.Keeper) (SecretManager, error)

ProvideSecretManager builds a new SecretManager.

Jump to

Keyboard shortcuts

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