Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AWSConfigModule = fx.Provide( func( setting AWSSettingParams, ) (out AWSConfigResult, err error) { out.Config, err = config.LoadDefaultConfig(context.Background(), config.WithRegion(setting.Region), config.WithCredentialsProvider( credentials.NewStaticCredentialsProvider(setting.Key, setting.Secret, ""), ), ) return }, )
AWSConfigModule is the AWS config module how tou use?: https://github.com/aws/aws-sdk-go-v2
View Source
var AWSSettingModule = fx.Provide( func() (out AWSSettingResult, err error) { if err = out.loadFromEnv(); err != nil { return } return }, )
AWSSettingModule is the AWS setting module
Functions ¶
This section is empty.
Types ¶
type AWSConfigParams ¶
type AWSConfigParams struct {
fx.In
// Config aws config object
Config aws.Config `name:"awsConfig"`
}
AWSConfigParams module params for injecting AWSConfig https://github.com/aws/aws-sdk-go-v2
type AWSConfigResult ¶
type AWSConfigResult struct {
fx.Out
// Config aws config object
Config aws.Config `name:"awsConfig"`
}
AWSConfigResult module result for exporting AWSConfig
type AWSSettingParams ¶
type AWSSettingParams struct {
fx.In
// Region is the AWS region
Region string `name:"awsRegion"`
// Key is the AWS key
Key string `name:"awsKey"`
// Secret is the AWS secret
// how to get the secret: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html
Secret string `name:"awsSecret"`
}
AWSSettingParams is the input parameter for the AWS setting module
type AWSSettingResult ¶
type AWSSettingResult struct {
fx.Out
// Region is the AWS region
Region string `name:"awsRegion" envconfig:"AWS_REGION" default:"us-west-2"`
// Key is the AWS key
Key string `name:"awsKey" envconfig:"AWS_KEY" default:""`
// Secret is the AWS secret
Secret string `name:"awsSecret" envconfig:"AWS_SECRET" default:"" `
}
AWSSettingResult is the output result for the AWS setting module
Click to show internal directories.
Click to hide internal directories.