Skip to content

Commit d2fe3c2

Browse files
publish jdcloud-sdk-go version 0.10.40
1 parent 4c23268 commit d2fe3c2

3 files changed

Lines changed: 163 additions & 2 deletions

File tree

services/cdn/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# 更新历史 #
2-
API版本:0.10.39
2+
API版本:0.10.40
33

44

55

66

77
| 发布时间 | 版本号 | 更新 | 说明 |
88
| ---------- | ------ | ---------------------------------------------------------- | ---- |
9+
| 2022-12-19 | 0.10.40 |商城pin维度离线日志查询接口|
910
| 2022-12-09 | 0.10.39 |SCDN回源配置接口字段调整|
1011
| 2022-12-08 | 0.10.38 |封禁解封接口V2|
1112
| 2022-12-07 | 0.10.37 |增加SCDN回源配置相关接口|
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
// Copyright 2018 JDCLOUD.COM
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+
package apis
18+
19+
import (
20+
"github.com/jdcloud-api/jdcloud-sdk-go/core"
21+
cdn "github.com/jdcloud-api/jdcloud-sdk-go/services/cdn/models"
22+
)
23+
24+
type QueryDomainsLogForJdRequest struct {
25+
26+
core.JDCloudRequest
27+
28+
/* pin (Optional) */
29+
Pin *string `json:"pin"`
30+
31+
/* 查询起始时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional) */
32+
StartTime *string `json:"startTime"`
33+
34+
/* 查询截止时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional) */
35+
EndTime *string `json:"endTime"`
36+
37+
/* 时间间隔,取值(hour,day,fiveMin),不传默认小时。 (Optional) */
38+
Interval *string `json:"interval"`
39+
40+
/* 日志类型,取值(log,zip,gz),不传默认gz。 (Optional) */
41+
LogType *string `json:"logType"`
42+
}
43+
44+
/*
45+
*
46+
* @Deprecated, not compatible when mandatory parameters changed
47+
*/
48+
func NewQueryDomainsLogForJdRequest(
49+
) *QueryDomainsLogForJdRequest {
50+
51+
return &QueryDomainsLogForJdRequest{
52+
JDCloudRequest: core.JDCloudRequest{
53+
URL: "/logsJd",
54+
Method: "POST",
55+
Header: nil,
56+
Version: "v1",
57+
},
58+
}
59+
}
60+
61+
/*
62+
* param pin: pin (Optional)
63+
* param startTime: 查询起始时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional)
64+
* param endTime: 查询截止时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z (Optional)
65+
* param interval: 时间间隔,取值(hour,day,fiveMin),不传默认小时。 (Optional)
66+
* param logType: 日志类型,取值(log,zip,gz),不传默认gz。 (Optional)
67+
*/
68+
func NewQueryDomainsLogForJdRequestWithAllParams(
69+
pin *string,
70+
startTime *string,
71+
endTime *string,
72+
interval *string,
73+
logType *string,
74+
) *QueryDomainsLogForJdRequest {
75+
76+
return &QueryDomainsLogForJdRequest{
77+
JDCloudRequest: core.JDCloudRequest{
78+
URL: "/logsJd",
79+
Method: "POST",
80+
Header: nil,
81+
Version: "v1",
82+
},
83+
Pin: pin,
84+
StartTime: startTime,
85+
EndTime: endTime,
86+
Interval: interval,
87+
LogType: logType,
88+
}
89+
}
90+
91+
/* This constructor has better compatible ability when API parameters changed */
92+
func NewQueryDomainsLogForJdRequestWithoutParam() *QueryDomainsLogForJdRequest {
93+
94+
return &QueryDomainsLogForJdRequest{
95+
JDCloudRequest: core.JDCloudRequest{
96+
URL: "/logsJd",
97+
Method: "POST",
98+
Header: nil,
99+
Version: "v1",
100+
},
101+
}
102+
}
103+
104+
/* param pin: pin(Optional) */
105+
func (r *QueryDomainsLogForJdRequest) SetPin(pin string) {
106+
r.Pin = &pin
107+
}
108+
/* param startTime: 查询起始时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z(Optional) */
109+
func (r *QueryDomainsLogForJdRequest) SetStartTime(startTime string) {
110+
r.StartTime = &startTime
111+
}
112+
/* param endTime: 查询截止时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z',示例:2018-10-21T10:00:00Z(Optional) */
113+
func (r *QueryDomainsLogForJdRequest) SetEndTime(endTime string) {
114+
r.EndTime = &endTime
115+
}
116+
/* param interval: 时间间隔,取值(hour,day,fiveMin),不传默认小时。(Optional) */
117+
func (r *QueryDomainsLogForJdRequest) SetInterval(interval string) {
118+
r.Interval = &interval
119+
}
120+
/* param logType: 日志类型,取值(log,zip,gz),不传默认gz。(Optional) */
121+
func (r *QueryDomainsLogForJdRequest) SetLogType(logType string) {
122+
r.LogType = &logType
123+
}
124+
125+
126+
// GetRegionId returns path parameter 'regionId' if exist,
127+
// otherwise return empty string
128+
func (r QueryDomainsLogForJdRequest) GetRegionId() string {
129+
return ""
130+
}
131+
132+
type QueryDomainsLogForJdResponse struct {
133+
RequestID string `json:"requestId"`
134+
Error core.ErrorResponse `json:"error"`
135+
Result QueryDomainsLogForJdResult `json:"result"`
136+
}
137+
138+
type QueryDomainsLogForJdResult struct {
139+
Logs []cdn.DomainsLog `json:"logs"`
140+
}

services/cdn/client/CdnClient.go

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewCdnClient(credential *core.Credential) *CdnClient {
4040
Credential: *credential,
4141
Config: *config,
4242
ServiceName: "cdn",
43-
Revision: "0.10.39",
43+
Revision: "0.10.40",
4444
Logger: core.NewDefaultLogger(core.LogInfo),
4545
}}
4646
}
@@ -117,6 +117,26 @@ func (c *CdnClient) QueryDeviceStatusForPCdn(request *cdn.QueryDeviceStatusForPC
117117
return jdResp, err
118118
}
119119

120+
/* 批量域名查询日志-pin维度 */
121+
func (c *CdnClient) QueryDomainsLogForJd(request *cdn.QueryDomainsLogForJdRequest) (*cdn.QueryDomainsLogForJdResponse, error) {
122+
if request == nil {
123+
return nil, errors.New("Request object is nil. ")
124+
}
125+
resp, err := c.Send(request, c.ServiceName)
126+
if err != nil {
127+
return nil, err
128+
}
129+
130+
jdResp := &cdn.QueryDomainsLogForJdResponse{}
131+
err = json.Unmarshal(resp, jdResp)
132+
if err != nil {
133+
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
134+
return nil, err
135+
}
136+
137+
return jdResp, err
138+
}
139+
120140
/* 查询目录基础统计数据,仅有部分用户支持该功能 */
121141
func (c *CdnClient) QueryDirStatsData(request *cdn.QueryDirStatsDataRequest) (*cdn.QueryDirStatsDataResponse, error) {
122142
if request == nil {

0 commit comments

Comments
 (0)