You've already forked img-proxy-url-generator
This commit is contained in:
24
config/aws.go
Normal file
24
config/aws.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package config
|
||||
|
||||
import "github.com/bigkevmcd/go-configparser"
|
||||
|
||||
type awsConfig struct {
|
||||
AwsKey string
|
||||
AwsSecret string
|
||||
AwsToken string
|
||||
AwsRegion string
|
||||
AwsBucket string
|
||||
AwsRole string
|
||||
}
|
||||
|
||||
func getAwsConfig(p *configparser.ConfigParser) *awsConfig {
|
||||
ac := &awsConfig{}
|
||||
ac.AwsKey, _ = p.Get("aws", "key")
|
||||
ac.AwsSecret, _ = p.Get("aws", "secret")
|
||||
ac.AwsToken, _ = p.Get("aws", "token")
|
||||
ac.AwsRegion, _ = p.Get("aws", "region")
|
||||
ac.AwsBucket, _ = p.Get("aws", "bucket")
|
||||
ac.AwsRole, _ = p.Get("aws", "role")
|
||||
|
||||
return ac
|
||||
}
|
||||
Reference in New Issue
Block a user