forked from evalphobia/aws-sdk-go-wrapper
/
env.go
43 lines (34 loc) · 972 Bytes
/
env.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package config
import "os"
const (
envRegion = "AWS_REGION"
envEndpoint = "AWS_ENDPOINT"
envDynamoDBEndpoint = "AWS_DYNAMODB_ENDPOINT"
envS3Endpoint = "AWS_S3_ENDPOINT"
envSNSEndpoint = "AWS_SNS_ENDPOINT"
envSQSEndpoint = "AWS_SQS_ENDPOINT"
)
// EnvRegion get region from env params
func EnvRegion() string {
return os.Getenv(envRegion)
}
// EnvEndpoint get endpoint from env params
func EnvEndpoint() string {
return os.Getenv(envEndpoint)
}
// EnvDynamoDBEndpoint get DynamoDB endpoint from env params
func EnvDynamoDBEndpoint() string {
return os.Getenv(envDynamoDBEndpoint)
}
// EnvS3Endpoint get S3 endpoint from env params
func EnvS3Endpoint() string {
return os.Getenv(envS3Endpoint)
}
// EnvSNSEndpoint get SNS endpoint from env params
func EnvSNSEndpoint() string {
return os.Getenv(envSNSEndpoint)
}
// EnvSQSEndpoint get SQS endpoint from env params
func EnvSQSEndpoint() string {
return os.Getenv(envSQSEndpoint)
}