Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParameterGetter ¶
type ParameterGetter struct {
// contains filtered or unexported fields
}
func NewParameterGetter ¶
func NewParameterGetter(name string, opts ...func(*ParameterOpts)) (*ParameterGetter, error)
NewParameterGetter returns an instance of ParameterGetter that can be used to get the raw ssm.GetParameterOutput.
func (*ParameterGetter) Get ¶
func (g *ParameterGetter) Get(ctx context.Context) (*ssm.GetParameterOutput, error)
Get executes the GET request the AWS Parameter and Secrets Lambda extension.
type ParameterOpts ¶
type ParameterOpts struct { Name string Version string Label string WithDecryption bool Client http.Client }
ParameterOpts contains customisable settings when retrieving a variable from AWS Parameter Store.
type SecretsGetter ¶
type SecretsGetter struct {
// contains filtered or unexported fields
}
func NewSecretsGetter ¶
func NewSecretsGetter(secretId string, opts ...func(secretsOpts *SecretsOpts)) (*SecretsGetter, error)
NewSecretsGetter returns an instance of SecretsGetter that can be used to get the raw secretsmanager.GetSecretValueOutput.
func (*SecretsGetter) Get ¶
func (g *SecretsGetter) Get(ctx context.Context) (*secretsmanager.GetSecretValueOutput, error)
Get executes the GET request the AWS Parameter and Secrets Lambda extension.
type SecretsOpts ¶
SecretsOpts contains customisable settings when retrieving a variable from AWS Secrets Manager.
type Variable ¶
type Variable interface { Get() (string, error) GetWithContext(ctx context.Context) (string, error) MustGet() string MustGetWithContext(ctx context.Context) string }
Variable defines ways to retrieve a string variable.
func Env ¶
Env calls os.Getenv and returns that value in subsequent calls.
See Getenv if you need something that calls os.Getenv on every invocation.
func Getenv ¶
Getenv calls os.Getenv on every invocation and returns its value.
Most of the time, Env suffices because environment variables are not updated that often. Use Getenv if you have a use case where the environment variables might be updated by some other processes.
func Parameter ¶
func Parameter(name string, opts ...func(*ParameterOpts)) Variable
Parameter creates Getter that reads parameters from the AWS Parameter and Secrets Lambda extension.
If you need to customize the request with version, label, and/or with decryption, pass in a function to modify those values.
func Secrets ¶
func Secrets(secretId string, opts ...func(*SecretsOpts)) Variable
Secrets creates Getter that reads secrets from the AWS Parameter and Secrets Lambda extension.
If you need to customize the request with version, label, and/or with decryption, pass in a function to modify those values.
See https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets_lambda.html.