Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvAccessKey = "AWS_ACCESS_KEY_ID" EnvSecretKey = "AWS_SECRET_KEY" EnvRegion = "AWS_REGION" )
Variables ¶
Functions ¶
func ProvideAwsConfig ¶
Validate, then provide the app with a AWS config.
To use this:
var Module = fx.Options( qsaws.ProvideAwsConfig(&qsaws.EnvConfigType{}) )
this code will provide a new default instance of a aws.Config that can be used to instantiate a aws.Session.
in case you want to customize a aws.Config yourself, implements:
qsconfig.ConfigType[*aws.Config]
If you need custom dependencies, don't use this, instead, create a fx.Option yourself:
fx.Provide(func (dep *Dependencies) (*aws.Config, error) { // Do something return &aws.Config{ // Options here } })
func ValidateConfig ¶
Validate a set of AWS config for error
Types ¶
type EnvConfigType ¶
type EnvConfigType struct{}
Requires these following environment variables
- AWS_ACCESS_KEY_ID: The access key ID
- AWS_SECRET_KEY: The secret key
- AWS_REGION: The AWS region
Click to show internal directories.
Click to hide internal directories.