-
Notifications
You must be signed in to change notification settings - Fork 245
/
Copy pathservice.go
49 lines (42 loc) · 1.04 KB
/
service.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
48
49
package cdn
import "time"
type ServiceRequest struct {
InternetChargeType string
}
type Service struct {
InternetChargeType string
OpeningTime string
ChangingChargeType string
ChangingAffectTime time.Time
OperationLocks struct {
LockReason []string
}
}
type ServiceResponse struct {
CdnCommonResponse
Service
}
func (client *CdnClient) OpenCdnService(req ServiceRequest) (CdnCommonResponse, error) {
var resp CdnCommonResponse
err := client.Invoke("OpenCdnService", req, &resp)
if err != nil {
return CdnCommonResponse{}, err
}
return resp, nil
}
func (client *CdnClient) DescribeCdnService() (ServiceResponse, error) {
var resp ServiceResponse
err := client.Invoke("DescribeCdnService", struct{}{}, &resp)
if err != nil {
return ServiceResponse{}, err
}
return resp, nil
}
func (client *CdnClient) ModifyCdnService(req ServiceRequest) (CdnCommonResponse, error) {
var resp CdnCommonResponse
err := client.Invoke("ModifyCdnService", req, &resp)
if err != nil {
return CdnCommonResponse{}, err
}
return resp, nil
}