Documentation
¶
Overview ¶
Package awsssmenv allows you to load environment variable and if indicated get remote secure values from AWS SSM.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidConfiguration indicates that a configuration is of the wrong type. ErrInvalidConfiguration = errors.New("configuration must be a struct pointer") // ErrInvalidFieldType indicates that a field is of the wrong type. ErrInvalidFieldType = errors.New("field must be a string") // ErrInvalidFieldAccess indicates that a field is of the wrong access. ErrInvalidFieldAccess = errors.New("field must be exported") )
Functions ¶
func Get ¶
Get sets field values in the conf struct from environment variables when the fields are decorated with "ssm". If there's another environment variable with the same name postfixed with "_SSM" then that value is used for querying SSM for the remote value.
It supports the "encrypted" option to indicate if the value should be retrieved from AWS SSM using encryption.
Types ¶
type SSM ¶
type SSM interface {
GetParameterWithContext(aws.Context, *ssm.GetParameterInput, ...request.Option) (*ssm.GetParameterOutput, error)
}
SSM defines the type implementing the SSM call. This type should define the exact method defined in github.com/aws/aws-sdk-go/service/ssm so the real AWS SSM can be used.
Directories
¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Run it as: AWS_REGION=us-east1 go run examples/main.go
|
Run it as: AWS_REGION=us-east1 go run examples/main.go |
Click to show internal directories.
Click to hide internal directories.