secrets

package
v0.0.0-...-f2f1368 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvManager

type EnvManager struct{}

EnvManager manages secrets stored in .env files

func NewEnvManager

func NewEnvManager(_ *configs.SageflowConfig) (EnvManager, error)

NewEnvManager creates a new EnvManager.

func (*EnvManager) Get

func (mgr *EnvManager) Get(key string, _ ...interface{}) (string, error)

Get get a secret by its key.

func (*EnvManager) Set

func (mgr *EnvManager) Set(_ string, _ string, _ ...interface{}) error

Set does nothing.

type Manager

type Manager interface {
	Get(key string, opts ...interface{}) (string, error)
	Set(key string, value string, opts ...interface{}) error
}

Manager abstracts how application secrets are managed. Secrets may be from a .env file or some external service like Hashicorp Vault.

func NewManager

func NewManager(config *configs.SageflowConfig) (Manager, error)

NewManager creates a new secrets manager based on settings in your sageflow.yaml file.

Jump to

Keyboard shortcuts

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