-
Notifications
You must be signed in to change notification settings - Fork 5
/
client.go
47 lines (39 loc) · 791 Bytes
/
client.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
44
45
46
47
package main
import (
"github.com/aliyun/alibaba-cloud-sdk-go/services/cms"
"github.com/aliyun/alibaba-cloud-sdk-go/services/rds"
"github.com/aliyun/alibaba-cloud-sdk-go/services/slb"
)
func newCmsClient() *cms.Client {
cmsClient, err := cms.NewClientWithAccessKey(
config.Region,
config.AccessKeyId,
config.AccessKeySecret,
)
if err != nil {
panic(err)
}
return cmsClient
}
func newSLBClient() *slb.Client {
client, err := slb.NewClientWithAccessKey(
config.Region,
config.AccessKeyId,
config.AccessKeySecret,
)
if err != nil {
panic(err)
}
return client
}
func newRDSClient() *rds.Client {
client, err := rds.NewClientWithAccessKey(
config.Region,
config.AccessKeyId,
config.AccessKeySecret,
)
if err != nil {
panic(err)
}
return client
}