secretstore

package
v0.0.0-...-4c8948d Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunningInKubernetes

func IsRunningInKubernetes() bool

func Resolver

func Resolver(sm SecretStore) envconfig.MutatorFunc

Types

type AWSSecretStore

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

func (AWSSecretStore) GetSecret

func (as AWSSecretStore) GetSecret(ctx context.Context, key string) (string, error)

type Config

type Config struct {
	Type string `env:"SECRET_MANAGER" json:"type"`
}

type HashiCorpVault

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

func NewHashiCorpVault

func NewHashiCorpVault(ctx context.Context) (*HashiCorpVault, error)

func (*HashiCorpVault) GetDatabaseCredentials

func (hv *HashiCorpVault) GetDatabaseCredentials(ctx context.Context, path string) (map[string]string, error)

func (*HashiCorpVault) GetSecret

func (hv *HashiCorpVault) GetSecret(ctx context.Context, name string) (string, error)

type HashiCorpVaultConfig

type HashiCorpVaultConfig struct {
	Role      string `env:"VAULT_LOGIN_ROLE" json:"role"`
	LoginPath string `env:"VAULT_LOGIN_PATH" json:"login_path"`
	Addr      string `env:"VAULT_ADDR" json:"addr"`

	Token string `env:"VAULT_TOKEN"`
}

type SecretStore

type SecretStore interface {
	GetSecret(ctx context.Context, key string) (string, error)
}

func GetSecretStore

func GetSecretStore(ctx context.Context, config *Config) (SecretStore, error)

func NewAWSSecretManager

func NewAWSSecretManager(ctx context.Context) (SecretStore, error)

Jump to

Keyboard shortcuts

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