add aws apis
This commit is contained in:
@@ -16,6 +16,7 @@ type Config struct {
|
||||
Port int `yaml:"port"`
|
||||
AWS struct {
|
||||
SharedConfig bool `yaml:"shared_config"`
|
||||
SharedName string `yaml:"shared_name"`
|
||||
AccessKey string `yaml:"access_key"`
|
||||
SecretKey string `yaml:"secret_key"`
|
||||
} `yaml:"aws"`
|
||||
@@ -50,7 +51,7 @@ func LoadConfig(p ...string) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
envOverride()
|
||||
envOverride()
|
||||
|
||||
return
|
||||
}
|
||||
@@ -76,6 +77,11 @@ func envOverride() {
|
||||
}
|
||||
}
|
||||
|
||||
str = os.Getenv("AWS_SHARED_NAME")
|
||||
if len(str) > 0 {
|
||||
conf.AWS.SharedName = str
|
||||
}
|
||||
|
||||
// set aws access key
|
||||
str = os.Getenv("AWS_ACCESS_KEY")
|
||||
if len(str) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user