Documentation ¶
Overview ¶
Package envconfig loads configuration from env vars.
Package envconfig provides utilities for reading environment variables.
Package envconfig loads configuration from env vars.
Package envconfig loads configuration from env vars.
Package envconfig loads configuration from env vars.
Package envconfig loads configuration from env vars.
Package envconfig loads configuration from env vars.
Index ¶
Constants ¶
const ( DefaultSecretsManagerPrefix = "aws-secretsmanager" DefaultParameterStorePrefix = "aws-parameterstore" DefaultS3Prefix = "aws-s3" DefaultDynamoDbPrefix = "aws-dynamodb" DefaultLambdaPrefix = "aws-lambda" DefaultHTTPPrefix = "#http" )
Define default prefixes for Secrets Manager and Parameter Store.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
Env holds context information for loading confing from env vars.
func (*Env) Bool ¶
Bool extracts boolean value from env var. It returns the provided defaultValue if the env var is empty. The value returned is also recorded in logs.
func (*Env) Duration ¶
Duration extracts time.Duration value from env var. It returns the provided defaultValue if the env var is empty. The value returned is also recorded in logs.
type FuncPrintf ¶
FuncPrintf is a helper type for logging function.
type Options ¶
type Options struct { AwsConfig aws.Config Printf FuncPrintf // defaults to log.Printf PrefixSecretsManager string // defaults to "aws-secretsmanager" PrefixParameterStore string // defaults to "aws-parameterstore" PrefixS3 string // defaults to "aws-s3" PrefixDynamoDb string // defaults to "aws-dynamodb" PrefixLambda string // defaults to "aws-lambda" PrefixHTTP string // defaults to "#http" DisableQueryStore bool CrashOnQueryError bool }
Options provide optional parameters for client.