secrets

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SecretProviderDatabase         = "db"
	SecretProviderAWSSecretManager = "awsSecretManager"
	SecretProviderVault            = "vault"
)

Variables

View Source
var (
	Configs = configset.Set[Config]{
		Default: &Config{},
		Dev: &Config{
			Provider: SecretProviderDatabase,
		},
	}
)

Functions

This section is empty.

Types

type Config added in v0.3.1

type Config struct {
	Provider         string                  `koanf:"provider"`
	GlobalScope      string                  `koanf:"global_scope"`
	AWSSecretManager *awsSecretManagerConfig `koanf:"aws"`
	Vault            *vaultConfig            `koanf:"vault"`
}

type Secrets

type Secrets interface {
	Get(ctx context.Context, key string) (string, error)
	Set(ctx context.Context, key string, value string) error
	Delete(ctx context.Context, key string) error
}

func New

func New(cfg *Config, z *zap.Logger, db db.DB) (Secrets, error)

Jump to

Keyboard shortcuts

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