Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsSecretsManagerEnvLoader ¶
type AwsSecretsManagerEnvLoader struct {
// contains filtered or unexported fields
}
AwsSecretsManagerEnvLoader is an EnvLoader implementation which loads variables from an AWS SecretsManager secret
func NewAwsSecretsManagerEnvLoader ¶
func NewAwsSecretsManagerEnvLoader(secretName string, region string, version string, logger *logs.Logger) *AwsSecretsManagerEnvLoader
NewLocalEnvLoader instantiates a new AwsSecretsManagerEnvLoader instance
func (*AwsSecretsManagerEnvLoader) GetAndLogEnvVar ¶ added in v0.1.6
func (l *AwsSecretsManagerEnvLoader) GetAndLogEnvVar(key string, required bool, sensitive bool) string
GetAndLogEnvVar implements EnvLoader
type EnvLoader ¶
type EnvLoader interface { // GetEnvVar returns the environment variable value with the specified key // If required and key is not found, a fatal log will be generated. Otherwise an empty string is returned GetEnvVar(key string, required bool) string // GetAndLogEnvVar returns and logs the environment variable value with the specified key // If required and key is not found, a fatal log will be generated. Otherwise an empty string is returned // If sensitive, the value of the environment variable will not be logged GetAndLogEnvVar(key string, required bool, sensitive bool) string }
EnvLoader is an interface to assist with environment variable loading
type LocalEnvLoader ¶
type LocalEnvLoader struct {
// contains filtered or unexported fields
}
LocalEnvLoader is an EnvLoader implementation which loads variables from the local system environment
func NewLocalEnvLoader ¶
func NewLocalEnvLoader(version string, logger *logs.Logger) *LocalEnvLoader
NewLocalEnvLoader instantiates a new LocalEnvLoader instance
func (*LocalEnvLoader) GetAndLogEnvVar ¶ added in v0.1.6
func (l *LocalEnvLoader) GetAndLogEnvVar(key string, required bool, sensitive bool) string
GetAndLogEnvVar implements EnvLoader
Click to show internal directories.
Click to hide internal directories.