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
NewAWSSecretsManagerEnvLoader instantiates a new AWSSecretsManagerEnvLoader instance
func (*AWSSecretsManagerEnvLoader) GetAndLogEnvVar ¶
func (a *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 ¶
func (l *LocalEnvLoader) GetAndLogEnvVar(key string, required bool, sensitive bool) string
GetAndLogEnvVar implements EnvLoader
Click to show internal directories.
Click to hide internal directories.