Skip to content

Commit a67ee68

Browse files
Merge pull request #56 from volcengine/release_2.6.15
2.6.15 特性提交
2 parents 8b8a203 + ed184c3 commit a67ee68

File tree

127 files changed

+1962
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1962
-267
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
## Release Note
2+
### 2025.4.19 Version 2.6.15
3+
- 支持 请求时携带客户端证书
4+
- 修复 默认流控实现中返回时间单位错误问题
5+
- 支持 指定客户端签名时间
6+
- 支持 递归删除目录和 Rename 递归创建目录
7+
8+
### 2025.1.23 Version 2.6.14
9+
- 支持 Qos Policy 相关接口
10+
- 支持 DeleteObject 和 DeleteMultiObjects 接口携带递归删除参数
11+
212
### 2025.1.9 Version 2.6.13
313
- 修复:GetFileStatus 接口扁平桶返回对象名错误的问题
414

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.1)
22

33
project(ve-tos-cpp-sdk
4-
VERSION 2.6.13
4+
VERSION 2.6.15
55
LANGUAGES CXX)
66

77
# project settings

example/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.1)
22
project(ve-tos-cpp-sdk-example
3-
VERSION 2.6.13
3+
VERSION 2.6.15
44
LANGUAGES CXX)
55

66
add_executable(${PROJECT_NAME} example.cc)

sdk/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.1)
22
project(ve-tos-cpp-sdk-lib
3-
VERSION 2.6.13
3+
VERSION 2.6.15
44
LANGUAGES CXX)
55
set(SDK_HEADER
66
include/auth/Credential.h
@@ -89,6 +89,7 @@ set(SDK_HEADER
8989
include/model/object/UploadFileCheckpoint.h
9090
include/model/object/UploadFilePartInfo.h
9191
include/model/RequestInfo.h
92+
include/model/GenericInput.h
9293
include/utils/BaseUtils.h
9394
include/utils/crc64.h
9495
include/ClientConfig.h
@@ -247,6 +248,12 @@ set(SDK_HEADER
247248
include/model/bucket/DeleteBucketRenameInput.h
248249
include/model/bucket/DeleteBucketRenameOutput.h
249250
include/model/object/GetFileStatusInput.h
251+
include/model/control/PutQosPolicyInput.h
252+
include/model/control/PutQosPolicyOutput.h
253+
include/model/control/GetQosPolicyInput.h
254+
include/model/control/GetQosPolicyOutput.h
255+
include/model/control/DeleteQosPolicyInput.h
256+
include/model/control/DeleteQosPolicyOutput.h
250257
)
251258
set(SDK_LIB
252259
src/transport/http/HttpClient.cc

sdk/include/ClientConfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class ClientConfig {
2121
~ClientConfig() = default;
2222

2323
std::string endPoint;
24+
std::string controlEndPoint;
2425
bool autoRecognizeContentType;
2526
int maxRetryCount;
2627
int connectionTimeout;
@@ -42,6 +43,8 @@ class ClientConfig {
4243
std::string userAgentSoftName;
4344
std::string userAgentSoftVersion;
4445
std::map<std::string,std::string> userAgentCustomizedKeyValues;
46+
std::string clientCrt;
47+
std::string clientKey;
4548

4649
// int MaxConnections;
4750
// int IdleConnectionTime;

sdk/include/Config.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ class Config {
1010
public:
1111
Config() = default;
1212
~Config() = default;
13+
const std::string& getControlEndpoint() const {
14+
return controlEndpoint_;
15+
}
16+
void setControlEndpoint(const std::string& endpoint) {
17+
controlEndpoint_ = endpoint;
18+
}
1319
const std::string& getEndpoint() const {
1420
return endpoint_;
1521
}
@@ -66,6 +72,7 @@ class Config {
6672

6773
private:
6874
std::string endpoint_;
75+
std::string controlEndpoint_;
6976
std::string region_;
7077
bool enableCRC_ = true;
7178
bool autoRecognizeContentType_ = true;

sdk/include/RequestBuilder.h

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <ctime>
34
#include <utility>
45
#include "auth/Signer.h"
56
#include "common/Common.h"
@@ -45,12 +46,14 @@ class HttpRange {
4546
};
4647
class RequestBuilder {
4748
public:
48-
RequestBuilder(std::shared_ptr<Signer> signer, std::string scheme, std::string host, std::string bucket,
49-
std::string object, int urlMode, std::map<std::string, std::string> headers,
50-
std::map<std::string, std::string> query, bool isCustomDomain)
49+
RequestBuilder(std::shared_ptr<Signer> signer, std::string scheme, std::string host, std::string controlHost_,
50+
std::string accountID, std::string bucket, std::string object, int urlMode,
51+
std::map<std::string, std::string> headers, std::map<std::string, std::string> query, bool isCustomDomain)
5152
: signer_(std::move(signer)),
5253
scheme_(std::move(scheme)),
5354
host_(std::move(host)),
55+
controlHost_(std::move(controlHost_)),
56+
accountID_(std::move(accountID)),
5457
bucket_(std::move(bucket)),
5558
object_(std::move(object)),
5659
URLMode_(urlMode),
@@ -105,17 +108,29 @@ class RequestBuilder {
105108
query_[key] = value;
106109
}
107110
}
111+
std::time_t getRequestDate() const {
112+
return requestDate_;
113+
}
114+
void setRequestDate(std::time_t requestDate) {
115+
requestDate_ = requestDate;
116+
}
117+
108118
std::shared_ptr<TosRequest> Build(const std::string& method);
119+
std::shared_ptr<TosRequest> BuildControlRequest(const std::string& method);
109120
std::shared_ptr<TosRequest> Build(const std::string& method, std::shared_ptr<std::iostream> content);
121+
std::shared_ptr<TosRequest> BuildControlRequest(const std::string& method, std::shared_ptr<std::iostream> content);
110122
std::shared_ptr<TosRequest> BuildWithCopySource(const std::string& method, const std::string& srcBucket,
111123
const std::string& srcObject);
112124
std::shared_ptr<TosRequest> build(const std::string& method);
125+
std::shared_ptr<TosRequest> buildControlRequest(const std::string& method);
113126
std::shared_ptr<TosRequest> buildSignedURL(const std::string& method);
114127

115128
private:
116129
std::shared_ptr<Signer> signer_;
117130
std::string scheme_;
118131
std::string host_;
132+
std::string controlHost_;
133+
std::string accountID_;
119134
std::string bucket_;
120135
std::string object_;
121136
int URLMode_ = 0;
@@ -125,5 +140,7 @@ class RequestBuilder {
125140
std::map<std::string, std::string> query_;
126141
bool autoRecognizeContentType_ = true;
127142
bool isCustomDomain_ = false;
143+
144+
std::time_t requestDate_ = 0;
128145
};
129146
} // namespace VolcengineTos

sdk/include/TosClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include "model/object/ModifyObjectInput.h"
5858
#include "model/object/ModifyObjectOutput.h"
5959
namespace VolcengineTos {
60-
static const char* TOS_SDK_VERSION = "v2.6.13";
60+
static const char* TOS_SDK_VERSION = "v2.6.15";
6161
#ifdef WIN32
6262
static const char* PLATFORM_NAME = "windows";
6363
#elif __linux__

sdk/include/TosClientV2.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@
190190
#include "model/bucket/DeleteBucketRenameOutput.h"
191191
#include "auth/EnvCredentials.h"
192192
#include "auth/EcsCredentials.h"
193+
#include "model/control/PutQosPolicyInput.h"
194+
#include "model/control/PutQosPolicyOutput.h"
195+
#include "model/control/GetQosPolicyInput.h"
196+
#include "model/control/GetQosPolicyOutput.h"
197+
#include "model/control/DeleteQosPolicyInput.h"
198+
#include "model/control/DeleteQosPolicyOutput.h"
193199

194200
namespace VolcengineTos {
195201

@@ -359,7 +365,11 @@ class TosClientV2 : public TosClient {
359365
Outcome<TosError, GetBucketRenameOutput> getBucketRename(const GetBucketRenameInput& input);
360366
Outcome<TosError, DeleteBucketRenameOutput> deleteBucketRename(const DeleteBucketRenameInput& input);
361367
Outcome<TosError,GetFileStatusOutput> getFileStatus(const GetFileStatusInput& input);
362-
// Outcome<TosError, ModifyObjectOutput> modifyObject(const ModifyObjectInput& input);
368+
// Outcome<TosError, ModifyObjectOutput> modifyObject(const ModifyObjectInput& input);
369+
370+
Outcome<TosError, PutQosPolicyOutput> putQosPolicy(const PutQosPolicyInput& input);
371+
Outcome<TosError, GetQosPolicyOutput> getQosPolicy(const GetQosPolicyInput& input);
372+
Outcome<TosError, DeleteQosPolicyOutput> deleteQosPolicy(const DeleteQosPolicyInput& input);
363373

364374
private:
365375
std::shared_ptr<TosClientImpl> tosClientImpl_;

sdk/include/TosRequest.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ class TosRequest {
144144
checkHighLatency_ = checkHighLatency;
145145
}
146146

147+
std::time_t getRequestDate() const {
148+
return requestDate_;
149+
}
150+
void setRequestDate(std::time_t requestDate) {
151+
requestDate_ = requestDate;
152+
}
153+
147154
private:
148155
std::string scheme_;
149156
std::string method_;
@@ -163,5 +170,6 @@ class TosRequest {
163170
int64_t contentOffset_ = 0;
164171
uint64_t preHashCrc64ecma_ = 0;
165172
bool checkHighLatency_ = false;
173+
std::time_t requestDate_ = 0;
166174
};
167175
} // namespace VolcengineTos

0 commit comments

Comments
 (0)