-
Notifications
You must be signed in to change notification settings - Fork 271
/
endpoint.go
35 lines (31 loc) · 1.1 KB
/
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
31
32
33
34
35
package baas
// 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": "baas.aliyuncs.com",
"cn-beijing": "baas.aliyuncs.com",
"ap-south-1": "baas.ap-southeast-1.aliyuncs.com",
"eu-west-1": "baas.ap-southeast-1.aliyuncs.com",
"ap-northeast-1": "baas.ap-southeast-1.aliyuncs.com",
"cn-qingdao": "baas.aliyuncs.com",
"cn-shanghai": "baas.aliyuncs.com",
"cn-hongkong": "baas.ap-southeast-1.aliyuncs.com",
"ap-southeast-2": "baas.ap-southeast-1.aliyuncs.com",
"eu-central-1": "baas.ap-southeast-1.aliyuncs.com",
"cn-huhehaote": "baas.aliyuncs.com",
"us-east-1": "baas.ap-southeast-1.aliyuncs.com",
"cn-zhangjiakou": "baas.aliyuncs.com",
"us-west-1": "baas.ap-southeast-1.aliyuncs.com",
}
}
return EndpointMap
}
// GetEndpointType Get Endpoint Type Value
func GetEndpointType() string {
return EndpointType
}