Skip to content

Commit 29f6df7

Browse files
Merge pull request #171 from jdcloud-apigateway/master
publish jdcloud-sdk-go version 0.10.32
2 parents a64333e + 56a0acf commit 29f6df7

3 files changed

Lines changed: 692 additions & 560 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.31
2+
API版本:0.10.32
33

44

55

66

77
| 发布时间 | 版本号 | 更新 | 说明 |
88
| ---------- | ------ | ---------------------------------------------------------- | ---- |
9+
| 2022-06-22 | 0.10.32 |增加域名限速接口|
910
| 2022-04-08 | 0.10.31 |增加查询、设置回源OSS鉴权定制接口|
1011
| 2022-01-17 | 0.10.29 |设置、查询回源改写批量配置|
1112
| 2021-09-17 | 0.10.28 |设置、删除、查询httpHeader支持区分边缘和回源|

services/cdn/apis/SpeedLimit.go

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
)
22+
23+
type SpeedLimitRequest struct {
24+
25+
core.JDCloudRequest
26+
27+
/* 用户域名 */
28+
Domain string `json:"domain"`
29+
30+
/* 限速值,单位为KB/s,取值范围[1,20480] (Optional) */
31+
LimitRate *int `json:"limitRate"`
32+
}
33+
34+
/*
35+
* param domain: 用户域名 (Required)
36+
*
37+
* @Deprecated, not compatible when mandatory parameters changed
38+
*/
39+
func NewSpeedLimitRequest(
40+
domain string,
41+
) *SpeedLimitRequest {
42+
43+
return &SpeedLimitRequest{
44+
JDCloudRequest: core.JDCloudRequest{
45+
URL: "/domain/{domain}/speedLimit",
46+
Method: "POST",
47+
Header: nil,
48+
Version: "v1",
49+
},
50+
Domain: domain,
51+
}
52+
}
53+
54+
/*
55+
* param domain: 用户域名 (Required)
56+
* param limitRate: 限速值,单位为KB/s,取值范围[1,20480] (Optional)
57+
*/
58+
func NewSpeedLimitRequestWithAllParams(
59+
domain string,
60+
limitRate *int,
61+
) *SpeedLimitRequest {
62+
63+
return &SpeedLimitRequest{
64+
JDCloudRequest: core.JDCloudRequest{
65+
URL: "/domain/{domain}/speedLimit",
66+
Method: "POST",
67+
Header: nil,
68+
Version: "v1",
69+
},
70+
Domain: domain,
71+
LimitRate: limitRate,
72+
}
73+
}
74+
75+
/* This constructor has better compatible ability when API parameters changed */
76+
func NewSpeedLimitRequestWithoutParam() *SpeedLimitRequest {
77+
78+
return &SpeedLimitRequest{
79+
JDCloudRequest: core.JDCloudRequest{
80+
URL: "/domain/{domain}/speedLimit",
81+
Method: "POST",
82+
Header: nil,
83+
Version: "v1",
84+
},
85+
}
86+
}
87+
88+
/* param domain: 用户域名(Required) */
89+
func (r *SpeedLimitRequest) SetDomain(domain string) {
90+
r.Domain = domain
91+
}
92+
93+
/* param limitRate: 限速值,单位为KB/s,取值范围[1,20480](Optional) */
94+
func (r *SpeedLimitRequest) SetLimitRate(limitRate int) {
95+
r.LimitRate = &limitRate
96+
}
97+
98+
// GetRegionId returns path parameter 'regionId' if exist,
99+
// otherwise return empty string
100+
func (r SpeedLimitRequest) GetRegionId() string {
101+
return ""
102+
}
103+
104+
type SpeedLimitResponse struct {
105+
RequestID string `json:"requestId"`
106+
Error core.ErrorResponse `json:"error"`
107+
Result SpeedLimitResult `json:"result"`
108+
}
109+
110+
type SpeedLimitResult struct {
111+
}

0 commit comments

Comments
 (0)