-
Notifications
You must be signed in to change notification settings - Fork 271
/
endpoint.go
30 lines (26 loc) · 889 Bytes
/
endpoint.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
package sgw
// EndpointMap Endpoint Data
var EndpointMap map[string]string
// EndpointType regional or central
var EndpointType = "regional"
// GetEndpointMap Get Endpoint Data Map
func GetEndpointMap() map[string]string {
if EndpointMap == nil {
EndpointMap = map[string]string{
"cn-shenzhen": "sgw.cn-shanghai.aliyuncs.com",
"cn-qingdao": "sgw.cn-shanghai.aliyuncs.com",
"cn-beijing": "sgw.cn-shanghai.aliyuncs.com",
"cn-hongkong": "sgw.cn-shanghai.aliyuncs.com",
"cn-huhehaote": "sgw.cn-shanghai.aliyuncs.com",
"us-east-1": "sgw.us-west-1.aliyuncs.com",
"cn-zhangjiakou": "sgw.cn-shanghai.aliyuncs.com",
"cn-chengdu": "sgw.cn-shanghai.aliyuncs.com",
"cn-hangzhou": "sgw.cn-shanghai.aliyuncs.com",
}
}
return EndpointMap
}
// GetEndpointType Get Endpoint Type Value
func GetEndpointType() string {
return EndpointType
}