setters

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CLI_ENVIRONMENT_SECRET_SETTER_KEY = "is_secret"
View Source
const CLI_ENVIRONMENT_SETTER_KEY = "from_cli"
View Source
const DRAGOMAN_ENV_KEY = "from_dragoman"
View Source
const SECRETS_MANAGER_ENV_ARN_KEY = "secret_arn"
View Source
const SECRETS_MANAGER_ENV_JSON_KEY = "secret_json_key"

Variables

This section is empty.

Functions

func NewSecretsManagerEnvironmentSetterError

func NewSecretsManagerEnvironmentSetterError(variable string, err string) error

Types

type BasicEnvironmentSetter

type BasicEnvironmentSetter struct {
	Key   string
	Value string
}

func NewBasicEnvironmentSetter

func NewBasicEnvironmentSetter(key string, value interface{}) *BasicEnvironmentSetter

func (BasicEnvironmentSetter) SetEnv

func (s BasicEnvironmentSetter) SetEnv() (string, error)

type CLIEnvironmentSetter added in v0.8.0

type CLIEnvironmentSetter struct {
	Key   string
	Value string
}

CLIEnvironmentSetter will pull an env var from the provided io.Reader (stdin)

func NewCLIEnvironmentSetter added in v0.8.0

func NewCLIEnvironmentSetter(key string, rd io.Reader, isSecret bool) (*CLIEnvironmentSetter, error)

func (CLIEnvironmentSetter) SetEnv added in v0.8.0

func (s CLIEnvironmentSetter) SetEnv() (string, error)

type DragomanEnvironmentSetter added in v0.5.0

type DragomanEnvironmentSetter struct {
	Encrypted string // The dragoman encrypted string
	EnvKey    string // The environment variable to be set
	// contains filtered or unexported fields
}

DragomanEnvironmentSetter will decrypt a secret that has been encrypted with dragoman

func NewDragomanEnvironmentSetter added in v0.5.0

func NewDragomanEnvironmentSetter(key string, val string) (*DragomanEnvironmentSetter, error)

NewDragomanEnvironmentSetter is the builder function for DragomanEnvironmentSetter

func (DragomanEnvironmentSetter) SetEnv added in v0.5.0

func (s DragomanEnvironmentSetter) SetEnv() (string, error)

type EnvironmentSetter

type EnvironmentSetter interface {
	// Returns the value being set and an error if one was encountered
	SetEnv() (string, error)
}

EnvironmentSetter is the minimum contract needed to set an environment variable of any kind

func GetEnvironmentSetter

func GetEnvironmentSetter(key string, node interface{}) (EnvironmentSetter, error)

type SecretsManagerEnvironmentSetter

type SecretsManagerEnvironmentSetter struct {
	EnvKey    string // The environment variable key being set
	ARN       string // The secrets manager secret ARN to reference
	SecretKey string // The JSON key in the secret to use
	// contains filtered or unexported fields
}

SecretsManagerEnvironmentSetter will set an environment variable from a JSON secret stored in AWS Secrets Manager

func NewSecretsManagerEnvironmentSetter

func NewSecretsManagerEnvironmentSetter(key string, subkeys map[string]interface{}) (*SecretsManagerEnvironmentSetter, error)

NewSecretsManagerEnvironmentSetter will generete a SM Setter

func (SecretsManagerEnvironmentSetter) SetEnv

type SecretsManagerEnvironmentSetterError

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

func (SecretsManagerEnvironmentSetterError) Error

Jump to

Keyboard shortcuts

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