diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index cb956600..b00968d2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -39,29 +39,38 @@ jobs: ./vcpkg-master/bootstrap-vcpkg.sh ./vcpkg-master/vcpkg integrate install - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg-master/scripts/buildsystems/vcpkg.cmake + - name: Run debug build + run: | + cmake -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=./vcpkg-master/scripts/buildsystems/vcpkg.cmake + cmake --build ./build --config Debug + + - name: Start MinIO server + run: | + wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio + chmod +x minio + mkdir -p ~/.minio/certs + cp ./tests/public.crt ./tests/private.key ~/.minio/certs/ + sudo cp ./tests/public.crt /usr/local/share/ca-certificates/ + sudo update-ca-certificates + MINIO_CI_CD=true ./minio server /tmp/test-xl/{1...4}/ & + sleep 10 + + - name: Run tests on debug build + run: | + S3HOST=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ./build/tests/tests - - name: Build - # Build your program with the given configuration + - name: Run release build run: | - cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio && chmod +x minio - mkdir -p ~/.minio/certs/ && cp testdata/localhost.crt ~/.minio/certs/public.crt && cp testdata/localhost.key ~/.minio/certs/private.key - sudo cp testdata/localhost.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates - export MINIO_CI_CD=true - ./minio server /tmp/test-xl/{1...4}/ & sleep 10 - export ENDPOINT=https://localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin - ${{github.workspace}}/build/examples/s3 -d -a mb -n bucketname - ${{github.workspace}}/build/examples/s3 -d -a up -f ${{github.workspace}}/testdata/localhost.crt -n bucketname -k objectname - ${{github.workspace}}/build/examples/s3 -d -a down -f /tmp/local.crt -n bucketname -k objectname - ${{github.workspace}}/build/examples/s3 -d -a rm -n bucketname -k objectname - ${{github.workspace}}/build/examples/s3 -d -a rb -n bucketname + cmake --build ./build --target clean + cmake -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg-master/scripts/buildsystems/vcpkg.cmake + cmake --build ./build --config Release + + - name: Run tests on release build + run: | + S3HOST=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ./build/tests/tests + - name: Test working-directory: ${{github.workspace}}/build # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - diff --git a/CMakeLists.txt b/CMakeLists.txt index f666aa74..69a0bf8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ macro(set_globals) endmacro() # specify the C++ standard -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -79,8 +79,8 @@ INCLUDE (CheckIncludeFiles) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) SET(MINIOCPP_MAJOR_VERSION "0") -SET(MINIOCPP_MINOR_VERSION "0") -SET(MINIOCPP_PATCH_VERSION "1") +SET(MINIOCPP_MINOR_VERSION "1") +SET(MINIOCPP_PATCH_VERSION "0") add_subdirectory(include) add_subdirectory(src) @@ -91,6 +91,11 @@ if (BUILD_EXAMPLES) add_subdirectory(examples) endif (BUILD_EXAMPLES) +option(BUILD_TESTS "Build tests" ON) +if (BUILD_TESTS) + add_subdirectory(tests) +endif (BUILD_TESTS) + option(BUILD_DOC "Build documentation" ON) # check if Doxygen is installed diff --git a/README.md b/README.md index 90822b7d..0acd6f14 100644 --- a/README.md +++ b/README.md @@ -2,63 +2,98 @@ # MinIO C++ Client SDK for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Sourcegraph](https://sourcegraph.com/github.com/minio/minio-cpp/-/badge.svg)](https://sourcegraph.com/github.com/minio/minio-cpp?badge) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/minio/minio-cpp/blob/master/LICENSE) -The MinIO C++ Client SDK provides simple APIs to access any Amazon S3 compatible object storage. This quickstart guide will show you how to install the MinIO client SDK, connect to MinIO, and provide a walkthrough for a simple file uploader. For a complete list of APIs and examples, please take a look at the [MinIO C++ Client API Reference](https://minio-cpp.min.io/) +MinIO C++ SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service. -This document assumes that you have a working C++ development environment. In order to build this project, you need the Cross-Platform Make CMake 3.10 or higher, [vcpkg](https://vcpkg.io/en/index.html). +For a complete list of APIs and examples, please take a look at the [MinIO C++ Client API Reference](https://minio-cpp.min.io/) + +## Build requirements +* A working C++ development environment supporting C++17 standards. +* CMake 3.10 or higher. +* [vcpkg](https://vcpkg.io/en/index.html). ## Install from `vcpkg` ``` vcpkg install minio-cpp ``` -## Source build - -``` -git clone https://github.com/minio/minio-cpp; cd minio-cpp; -cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${VCPKGDIR}/scripts/buildsystems/vcpkg.cmake -cmake --build build +## Building source +```bash +$ git clone https://github.com/minio/minio-cpp +$ cd minio-cpp +$ wget --quiet -O vcpkg-master.zip https://github.com/microsoft/vcpkg/archive/refs/heads/master.zip +$ unzip -qq vcpkg-master.zip +$ ./vcpkg-master/bootstrap-vcpkg.sh +$ ./vcpkg-master/vcpkg integrate install +$ cmake -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=./vcpkg-master/scripts/buildsystems/vcpkg.cmake +$ cmake --build ./build --config Debug ``` -## Example code +## Example:: file-uploader.cc ```c++ -#include -#include -#include -#include -#include - -using namespace Minio; - -int -main ( int argc, char** argv ) -{ - S3Client s3("https://play.min.io:9000", "minioadmin", "minioadmin"); - S3ClientIO io; - s3.MakeBucket("newbucket", io); - if(io.Failure()) { - std::cerr << "ERROR: failed to create bucket" << endl; - std::cerr << "response:\n" << io << endl; - std::cerr << "response body:\n" << io.response.str() << endl; - return -1; +#include + +int main(int argc, char* argv[]) { + // Create S3 base URL. + minio::http::BaseUrl base_url; + base_url.SetHost("play.min.io"); + + // Create credential provider. + minio::creds::StaticProvider provider( + "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"); + + // Create S3 client. + minio::s3::Client client(base_url, &provider); + + std::string bucket_name = "asiatrip"; + + // Check 'asiatrip' bucket exist or not. + bool exist; + { + minio::s3::BucketExistsArgs args; + args.bucket_ = bucket_name; + + minio::s3::BucketExistsResponse resp = client.BucketExists(args); + if (!resp) { + std::cout << "unable to do bucket existence check; " << resp.GetError() + << std::endl; + return EXIT_FAILURE; + } + + exist = resp.exist_; } - return 0; -} -``` -## Run an example -Following example runs 'multipart' upload, uploads a single part. You would have to choose a local file to upload for `-f`, and also remote bucket to upload the object to as `-n` and final object name in the bucket as `-k`. + // Make 'asiatrip' bucket if not exist. + if (!exist) { + minio::s3::MakeBucketArgs args; + args.bucket_ = bucket_name; -``` -export ACTION="multipart" -export ACCESS_KEY=minioadmin -export SECRET_KEY=minioadmin -export ENDPOINT="https://play.min.io:9000" + minio::s3::MakeBucketResponse resp = client.MakeBucket(args); + if (!resp) { + std::cout << "unable to create bucket; " << resp.GetError() << std::endl; + return EXIT_FAILURE; + } + } -./examples/s3 -a ${ACTION} -f \ - -n -k -``` + // Upload '/home/user/Photos/asiaphotos.zip' as object name + // 'asiaphotos-2015.zip' to bucket 'asiatrip'. + minio::s3::UploadObjectArgs args; + args.bucket_ = bucket_name; + args.object_ = "asiaphotos-2015.zip"; + args.filename_ = "/home/user/Photos/asiaphotos.zip"; -Please choose a `` that exists. + minio::s3::UploadObjectResponse resp = client.UploadObject(args); + if (!resp) { + std::cout << "unable to upload object; " << resp.GetError() << std::endl; + return EXIT_FAILURE; + } + + std::cout << "'/home/user/Photos/asiaphotos.zip' is successfully uploaded as " + << "object 'asiaphotos-2015.zip' to bucket 'asiatrip'." + << std::endl; + + return EXIT_SUCCESS; +} +``` ## License This SDK is distributed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), see [LICENSE](https://github.com/minio/minio-cpp/blob/master/LICENSE) for more information. diff --git a/check-style.sh b/check-style.sh index b776203d..24ba6ad6 100755 --- a/check-style.sh +++ b/check-style.sh @@ -10,7 +10,7 @@ function clang_format() { } ec=0 -mapfile -t files < <(find . -iname "*.cpp" -o -iname "*.h") +mapfile -t files < <(find src include examples tests -iname "*.cc" -o -iname "*.h") for file in "${files[@]}"; do if ! clang_format "$file"; then ec=255 diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 4f0b82ae..d4cab419 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -1,5 +1,7 @@ -OUTPUT_DIRECTORY = @CMAKE_CURRENT_SOURCE_DIR@/docs/ -INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/ @CMAKE_CURRENT_SOURCE_DIR@/docs @CMAKE_CURRENT_SOURCE_DIR@/include @CMAKE_CURRENT_SOURCE_DIR@/examples +OUTPUT_DIRECTORY = @CMAKE_CURRENT_SOURCE_DIR@/docs +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs/README.md @CMAKE_CURRENT_SOURCE_DIR@/src @CMAKE_CURRENT_SOURCE_DIR@/include PROJECT_NAME = "MinIO C++ SDK" GENERATE_LATEX = NO -HTML_OUTPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs/ +WARN_IF_UNDOCUMENTED = NO +USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_SOURCE_DIR@/docs/README.md +HTML_OUTPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..915168b1 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,97 @@ +> NOTE: This project is work in progress. + +MinIO C++ SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service. + +For a complete list of APIs and examples, please take a look at the [MinIO C++ Client API Reference](https://minio-cpp.min.io/) + +## Build requirements +* A working C++ development environment supporting C++17 standards. +* CMake 3.10 or higher. +* [vcpkg](https://vcpkg.io/en/index.html). + +## Install from vcpkg +``` +vcpkg install minio-cpp +``` + +## Building source +``` +$ git clone https://github.com/minio/minio-cpp +$ cd minio-cpp +$ wget --quiet -O vcpkg-master.zip https://github.com/microsoft/vcpkg/archive/refs/heads/master.zip +$ unzip -qq vcpkg-master.zip +$ ./vcpkg-master/bootstrap-vcpkg.sh +$ ./vcpkg-master/vcpkg integrate install +$ cmake -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=./vcpkg-master/scripts/buildsystems/vcpkg.cmake +$ cmake --build ./build --config Debug +``` + +## Example:: file-uploader.cc +``` +#include + +int main(int argc, char* argv[]) { + // Create S3 base URL. + minio::http::BaseUrl base_url; + base_url.SetHost("play.min.io"); + + // Create credential provider. + minio::creds::StaticProvider provider( + "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"); + + // Create S3 client. + minio::s3::Client client(base_url, &provider); + + std::string bucket_name = "asiatrip"; + + // Check 'asiatrip' bucket exist or not. + bool exist; + { + minio::s3::BucketExistsArgs args; + args.bucket_ = bucket_name; + + minio::s3::BucketExistsResponse resp = client.BucketExists(args); + if (!resp) { + std::cout << "unable to do bucket existence check; " << resp.GetError() + << std::endl; + return EXIT_FAILURE; + } + + exist = resp.exist_; + } + + // Make 'asiatrip' bucket if not exist. + if (!exist) { + minio::s3::MakeBucketArgs args; + args.bucket_ = bucket_name; + + minio::s3::MakeBucketResponse resp = client.MakeBucket(args); + if (!resp) { + std::cout << "unable to create bucket; " << resp.GetError() << std::endl; + return EXIT_FAILURE; + } + } + + // Upload '/home/user/Photos/asiaphotos.zip' as object name + // 'asiaphotos-2015.zip' to bucket 'asiatrip'. + minio::s3::UploadObjectArgs args; + args.bucket_ = bucket_name; + args.object_ = "asiaphotos-2015.zip"; + args.filename_ = "/home/user/Photos/asiaphotos.zip"; + + minio::s3::UploadObjectResponse resp = client.UploadObject(args); + if (!resp) { + std::cout << "unable to upload object; " << resp.GetError() << std::endl; + return EXIT_FAILURE; + } + + std::cout << "'/home/user/Photos/asiaphotos.zip' is successfully uploaded as " + << "object 'asiaphotos-2015.zip' to bucket 'asiatrip'." + << std::endl; + + return EXIT_SUCCESS; +} +``` + +## License +This SDK is distributed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), see [LICENSE](https://github.com/minio/minio-cpp/blob/master/LICENSE) for more information. diff --git a/docs/annotated.html b/docs/annotated.html index dba1c314..281c02c1 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -67,18 +67,71 @@ diff --git a/docs/args_8h_source.html b/docs/args_8h_source.html new file mode 100644 index 00000000..74a5e0e1 --- /dev/null +++ b/docs/args_8h_source.html @@ -0,0 +1,351 @@ + + + + + + + +MinIO C++ SDK: /home/bala/devel/github.com/minio/minio-cpp/include/args.h Source File + + + + + + + + + +
+
+ + + + + + +
+
MinIO C++ SDK +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
args.h
+
+
+
1 // MinIO C++ Library for Amazon S3 Compatible Cloud Storage
+
2 // Copyright 2022 MinIO, Inc.
+
3 //
+
4 // Licensed under the Apache License, Version 2.0 (the "License");
+
5 // you may not use this file except in compliance with the License.
+
6 // You may obtain a copy of the License at
+
7 //
+
8 // http://www.apache.org/licenses/LICENSE-2.0
+
9 //
+
10 // Unless required by applicable law or agreed to in writing, software
+
11 // distributed under the License is distributed on an "AS IS" BASIS,
+
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13 // See the License for the specific language governing permissions and
+
14 // limitations under the License.
+
15 
+
16 #ifndef _MINIO_S3_ARGS_H
+
17 #define _MINIO_S3_ARGS_H
+
18 
+
19 #include <filesystem>
+
20 
+
21 #include "http.h"
+
22 #include "sse.h"
+
23 #include "types.h"
+
24 
+
25 namespace minio {
+
26 namespace s3 {
+
27 struct BaseArgs {
+
28  utils::Multimap extra_headers;
+
29  utils::Multimap extra_query_params;
+
30 }; // struct BaseArgs
+
31 
+
32 struct BucketArgs : public BaseArgs {
+
33  std::string bucket;
+
34  std::string region;
+
35 
+
36  error::Error Validate();
+
37 }; // struct BucketArgs
+
38 
+
39 struct ObjectArgs : public BucketArgs {
+
40  std::string object;
+
41 
+
42  error::Error Validate();
+
43 }; // struct ObjectArgs
+
44 
+
45 struct ObjectWriteArgs : public ObjectArgs {
+
46  utils::Multimap headers;
+
47  utils::Multimap user_metadata;
+
48  Sse *sse = NULL;
+
49  std::map<std::string, std::string> tags;
+
50  Retention *retention = NULL;
+
51  bool legal_hold = false;
+
52 
+
53  utils::Multimap Headers();
+
54 }; // struct ObjectWriteArgs
+
55 
+
56 struct ObjectVersionArgs : public ObjectArgs {
+
57  std::string version_id;
+
58 }; // struct ObjectVersionArgs
+
59 
+ +
61  SseCustomerKey *ssec = NULL;
+
62 }; // struct ObjectReadArgs
+
63 
+ +
65  size_t *offset = NULL;
+
66  size_t *length = NULL;
+
67  std::string match_etag;
+
68  std::string not_match_etag;
+
69  utils::Time modified_since;
+
70  utils::Time unmodified_since;
+
71 
+
72  utils::Multimap Headers();
+
73  utils::Multimap CopyHeaders();
+
74 }; // struct ObjectConditionalReadArgs
+
75 
+
76 struct MakeBucketArgs : public BucketArgs {
+
77  bool object_lock = false;
+
78 
+
79  error::Error Validate();
+
80 }; // struct MakeBucketArgs
+
81 
+ +
83 
+ +
85 
+ +
87 
+ +
89  std::string upload_id;
+
90 
+
91  error::Error Validate();
+
92 }; // struct AbortMultipartUploadArgs
+
93 
+ +
95  std::string upload_id;
+
96  std::list<Part> parts;
+
97 
+
98  error::Error Validate();
+
99 }; // struct CompleteMultipartUploadArgs
+
100 
+ +
102  utils::Multimap headers;
+
103 }; // struct CreateMultipartUploadArgs
+
104 
+ +
106  long object_size = -1;
+
107  size_t part_size = 0;
+
108  long part_count = 0;
+
109  std::string content_type;
+
110 }; // struct PutObjectBaseArgs
+
111 
+ +
113  std::string_view data;
+
114  utils::Multimap query_params;
+
115 }; // struct PutObjectApiArgs
+
116 
+ +
118  std::string upload_id;
+
119  unsigned int part_number;
+
120  std::string_view data;
+
121 
+
122  error::Error Validate();
+
123 }; // struct UploadPartArgs
+
124 
+ +
126  std::string upload_id;
+
127  unsigned int part_number;
+
128  utils::Multimap headers;
+
129 
+
130  error::Error Validate();
+
131 }; // struct UploadPartCopyArgs
+
132 
+ +
134 
+ +
136 
+ +
138  std::string filename;
+
139  bool overwrite;
+
140 
+
141  error::Error Validate();
+
142 }; // struct DownloadObjectArgs
+
143 
+ +
145  http::DataCallback data_callback;
+
146  void *user_arg = NULL;
+
147 
+
148  error::Error Validate();
+
149 }; // struct GetObjectArgs
+
150 
+
151 struct ListObjectsArgs : public BucketArgs {
+
152  std::string delimiter;
+
153  bool use_url_encoding_type = true;
+
154  std::string marker; // only for ListObjectsV1.
+
155  std::string start_after; // only for ListObjectsV2.
+
156  std::string key_marker; // only for GetObjectVersions.
+
157  unsigned int max_keys = 1000;
+
158  std::string prefix;
+
159  std::string continuation_token; // only for ListObjectsV2.
+
160  bool fetch_owner = false; // only for ListObjectsV2.
+
161  std::string version_id_marker; // only for GetObjectVersions.
+
162  bool include_user_metadata = false; // MinIO extension for ListObjectsV2.
+
163  bool recursive = false;
+
164  bool use_api_v1 = false;
+
165  bool include_versions = false;
+
166 }; // struct ListObjectsArgs
+
167 
+ +
169  std::string delimiter;
+
170  std::string encoding_type;
+
171  unsigned int max_keys = 1000;
+
172  std::string prefix;
+
173 }; // struct ListObjectsCommonArgs
+
174 
+ +
176  std::string marker;
+
177 
+ + +
180 }; // struct ListObjectsV1Args
+
181 
+ +
183  std::string start_after;
+
184  std::string continuation_token;
+
185  bool fetch_owner;
+
186  bool include_user_metadata;
+
187 
+ + +
190 }; // struct ListObjectsV2Args
+
191 
+ +
193  std::string key_marker;
+
194  std::string version_id_marker;
+
195 
+ + +
198 }; // struct ListObjectVersionsArgs
+
199 
+ +
201  std::istream &stream;
+
202 
+
203  PutObjectArgs(std::istream &stream, long objectsize, long partsize);
+
204  error::Error Validate();
+
205 }; // struct PutObjectArgs
+
206 
+ +
208 
+ +
210  CopySource source;
+
211  Directive *metadata_directive = NULL;
+
212  Directive *tagging_directive = NULL;
+
213 
+
214  error::Error Validate();
+
215 }; // struct CopyObjectArgs
+
216 
+ +
218  error::Error BuildHeaders(size_t object_size, std::string etag);
+
219  size_t ObjectSize();
+
220  utils::Multimap Headers();
+
221 
+
222  private:
+
223  long object_size_ = -1;
+
224  utils::Multimap headers_;
+
225 }; // struct ComposeSource
+
226 
+ +
228  std::list<ComposeSource> sources;
+
229 
+
230  error::Error Validate();
+
231 }; // struct ComposeObjectArgs
+
232 
+ +
234  std::string filename;
+
235 
+
236  error::Error Validate();
+
237 }; // struct PutObjectArgs
+
238 } // namespace s3
+
239 } // namespace minio
+
240 #endif // #ifndef __MINIO_S3_ARGS_H
+
Definition: error.h:23
+
Definition: sse.h:35
+
Definition: sse.h:23
+
Definition: utils.h:121
+
Definition: utils.h:99
+ +
Definition: args.h:27
+
Definition: args.h:32
+ +
Definition: args.h:227
+
Definition: args.h:217
+
Definition: args.h:209
+ +
Definition: args.h:137
+
Definition: args.h:144
+
Definition: args.h:192
+
Definition: args.h:151
+
Definition: args.h:168
+
Definition: args.h:175
+
Definition: args.h:182
+
Definition: args.h:76
+
Definition: args.h:39
+ +
Definition: args.h:60
+
Definition: args.h:56
+
Definition: args.h:45
+
Definition: args.h:112
+
Definition: args.h:200
+
Definition: args.h:105
+
Definition: types.h:118
+
Definition: args.h:233
+
Definition: args.h:117
+
Definition: args.h:125
+
+ + + + diff --git a/docs/classMinio_1_1Headers-members.html b/docs/classMinio_1_1Headers-members.html deleted file mode 100644 index 588ab31e..00000000 --- a/docs/classMinio_1_1Headers-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MinIO C++ SDK: Member List - - - - - - - - - -
-
- - - - - - -
-
MinIO C++ SDK -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
Minio::Headers Member List
-
-
- -

This is the complete list of members for Minio::Headers, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - -
begin() (defined in Minio::Headers)Minio::Headersinline
begin() const (defined in Minio::Headers)Minio::Headersinline
Clear() (defined in Minio::Headers)Minio::Headersinline
const_iterator typedef (defined in Minio::Headers)Minio::Headers
end() (defined in Minio::Headers)Minio::Headersinline
end() const (defined in Minio::Headers)Minio::Headersinline
equal_range(const std::string &key) (defined in Minio::Headers)Minio::Headersinline
equal_range(const std::string &key) const (defined in Minio::Headers)Minio::Headersinline
Exists(const std::string &key) const (defined in Minio::Headers)Minio::Headersinline
Get(const std::string &key, std::string &value) const (defined in Minio::Headers)Minio::Headersinline
Get(const std::string &key, double &value) const (defined in Minio::Headers)Minio::Headersinline
Get(const std::string &key, int &value) const (defined in Minio::Headers)Minio::Headersinline
Get(const std::string &key, long &value) const (defined in Minio::Headers)Minio::Headersinline
Get(const std::string &key, size_t &value) const (defined in Minio::Headers)Minio::Headersinline
GetWithDefault(const std::string &key, const std::string &defaultVal) const (defined in Minio::Headers)Minio::Headersinline
GetWithDefault(const std::string &key, double defaultVal) const (defined in Minio::Headers)Minio::Headersinline
GetWithDefault(const std::string &key, int defaultVal) const (defined in Minio::Headers)Minio::Headersinline
GetWithDefault(const std::string &key, long defaultVal) const (defined in Minio::Headers)Minio::Headersinline
GetWithDefault(const std::string &key, size_t defaultVal) const (defined in Minio::Headers)Minio::Headersinline
Headers() (defined in Minio::Headers)Minio::Headersinline
Insert(const std::string &key, const std::string &value) (defined in Minio::Headers)Minio::Headersinline
iterator typedef (defined in Minio::Headers)Minio::Headers
Update(const std::string &key, const std::string &value) (defined in Minio::Headers)Minio::Headersinline
- - - - diff --git a/docs/classMinio_1_1Headers.html b/docs/classMinio_1_1Headers.html deleted file mode 100644 index 6a98d91d..00000000 --- a/docs/classMinio_1_1Headers.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -MinIO C++ SDK: Minio::Headers Class Reference - - - - - - - - - -
-
- - - - - - -
-
MinIO C++ SDK -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
Minio::Headers Class Reference
-
-
- - - - - - -

-Public Types

-typedef Minio::Http::HeaderValueCollection::iterator iterator
 
-typedef Minio::Http::HeaderValueCollection::const_iterator const_iterator
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-iterator begin ()
 
-const_iterator begin () const
 
-iterator end ()
 
-const_iterator end () const
 
-std::pair< iterator, iterator > equal_range (const std::string &key)
 
-std::pair< const_iterator, const_iterator > equal_range (const std::string &key) const
 
-void Clear ()
 
-bool Exists (const std::string &key) const
 
-bool Get (const std::string &key, std::string &value) const
 
-bool Get (const std::string &key, double &value) const
 
-bool Get (const std::string &key, int &value) const
 
-bool Get (const std::string &key, long &value) const
 
-bool Get (const std::string &key, size_t &value) const
 
-const std::string & GetWithDefault (const std::string &key, const std::string &defaultVal) const
 
-double GetWithDefault (const std::string &key, double defaultVal) const
 
-int GetWithDefault (const std::string &key, int defaultVal) const
 
-long GetWithDefault (const std::string &key, long defaultVal) const
 
-size_t GetWithDefault (const std::string &key, size_t defaultVal) const
 
-void Insert (const std::string &key, const std::string &value)
 
-void Update (const std::string &key, const std::string &value)
 
-
The documentation for this class was generated from the following file:
    -
  • /home/harsha/go/src/github.com/minio/minio-cpp/include/s3_headers.h
  • -
-
- - - - diff --git a/docs/classS3Client-members.html b/docs/classS3Client-members.html deleted file mode 100644 index 251423f7..00000000 --- a/docs/classS3Client-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -MinIO C++ SDK: Member List - - - - - - - - - -
-
- - - - - - -
-
MinIO C++ SDK -
-
-
- - - - - - - - -
-
- - -
- -
- -
-
-
-
S3Client Member List
-
-
- -

This is the complete list of members for S3Client, including all inherited members.

- - - - - - - - - - - - - - - - - - - - -
AbortMultipartUpload(const std::string &bkt, const std::string &key, const std::string &upload_id, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
CompleteMultipartUpload(const std::string &bkt, const std::string &key, const std::string &upload_id, const std::list< Minio::S3::CompletePart > &parts, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
CopyObject(const std::string &srcbkt, const std::string &srckey, const std::string &dstbkt, const std::string &dstkey, bool copyMD, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
CreateMultipartUpload(const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
DeleteObject(const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
GetObject(const std::string &bkt, const std::string &key, const int &part_number, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
GetObject(const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
ListBuckets(Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
ListObjects(Minio::S3::Bucket &bucket, S3Connection **conn=NULL) (defined in S3Client)S3Client
ListObjects(const std::string &bkt, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
MakeBucket(const std::string &bkt, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
PutObject(const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
PutObject(const std::string &bkt, const std::string &key, const std::string &localpath, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
PutObject(const std::string &bkt, const std::string &key, const int &part_number, const std::string &upload_id, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
RemoveBucket(const std::string &bkt, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
S3Client(const std::string &endpoint, const std::string &kid, const std::string &sk) (defined in S3Client)S3Client
SetVerbosity(int v) (defined in S3Client)S3Clientinline
StatObject(const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL) (defined in S3Client)S3Client
~S3Client() (defined in S3Client)S3Client
- - - - diff --git a/docs/classS3Client.html b/docs/classS3Client.html deleted file mode 100644 index f09d7066..00000000 --- a/docs/classS3Client.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -MinIO C++ SDK: S3Client Class Reference - - - - - - - - - -
-
- - - - - - -
-
MinIO C++ SDK -
-
-
- - - - - - - - -
-
- - -
- -
- -
-
- -
-
S3Client Class Reference
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

S3Client (const std::string &endpoint, const std::string &kid, const std::string &sk)
 
-void SetVerbosity (int v)
 
-void ListObjects (Minio::S3::Bucket &bucket, S3Connection **conn=NULL)
 
-void PutObject (const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void PutObject (const std::string &bkt, const std::string &key, const std::string &localpath, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void GetObject (const std::string &bkt, const std::string &key, const int &part_number, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void GetObject (const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void StatObject (const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void DeleteObject (const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void CopyObject (const std::string &srcbkt, const std::string &srckey, const std::string &dstbkt, const std::string &dstkey, bool copyMD, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void ListBuckets (Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void MakeBucket (const std::string &bkt, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void ListObjects (const std::string &bkt, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void RemoveBucket (const std::string &bkt, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-Minio::S3::CompletePart PutObject (const std::string &bkt, const std::string &key, const int &part_number, const std::string &upload_id, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-std::string CreateMultipartUpload (const std::string &bkt, const std::string &key, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-void AbortMultipartUpload (const std::string &bkt, const std::string &key, const std::string &upload_id, S3Connection **reqPtr=NULL)
 
-void CompleteMultipartUpload (const std::string &bkt, const std::string &key, const std::string &upload_id, const std::list< Minio::S3::CompletePart > &parts, Minio::S3ClientIO &io, S3Connection **reqPtr=NULL)
 
-
The documentation for this class was generated from the following files:
    -
  • /home/harsha/go/src/github.com/minio/minio-cpp/include/s3.h
  • -
  • /home/harsha/go/src/github.com/minio/minio-cpp/src/s3.cpp
  • -
-
- - - - diff --git a/docs/classes.html b/docs/classes.html index 49bc0ba7..536d8985 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -65,32 +65,53 @@
Class Index
-
B | C | D | H | O | R | S | W
+
A | B | C | D | E | G | I | L | M | O | P | R | S | T | U
-
B
-
Bucket (Minio::S3)
+
A
+
AbortMultipartUploadArgs (minio::s3)
-
C
-
CompletePart (Minio::S3)
+
B
+
BaseArgs (minio::s3)
BaseUrl (minio::http)
Bucket (minio::s3)
BucketArgs (minio::s3)
BucketExistsResponse (minio::s3)
+
C
+
CharBuffer (minio::utils)
Client (minio::s3)
CompleteMultipartUploadArgs (minio::s3)
CompleteMultipartUploadResponse (minio::s3)
ComposeObjectArgs (minio::s3)
ComposeSource (minio::s3)
CopyObjectArgs (minio::s3)
CreateMultipartUploadArgs (minio::s3)
CreateMultipartUploadResponse (minio::s3)
Credentials (minio::creds)
+
D
-
Dictionary_Error
+
DataCallbackArgs (minio::http)
DownloadObjectArgs (minio::s3)
+
+
E
+
Error (minio::error)
-
H
-
HeaderCB
Headers (Minio)
+
G
+
GetObjectArgs (minio::s3)
GetRegionResponse (minio::s3)
+
I
+
Item (minio::s3)
+
+
L
+
ListBucketsResponse (minio::s3)
ListObjectsArgs (minio::s3)
ListObjectsCommonArgs (minio::s3)
ListObjectsResponse (minio::s3)
ListObjectsResult (minio::s3)
ListObjectsV1Args (minio::s3)
ListObjectsV2Args (minio::s3)
ListObjectVersionsArgs (minio::s3)
+
+
M
+
MakeBucketArgs (minio::s3)
Multimap (minio::utils)
+
O
-
Object (Minio::S3)
+
ObjectArgs (minio::s3)
ObjectConditionalReadArgs (minio::s3)
ObjectReadArgs (minio::s3)
ObjectVersionArgs (minio::s3)
ObjectWriteArgs (minio::s3)
+
+
P
+
Part (minio::s3)
Provider (minio::creds)
PutObjectApiArgs (minio::s3)
PutObjectArgs (minio::s3)
PutObjectBaseArgs (minio::s3)
PutObjectResponse (minio::s3)
R
-
ReadDataCB
+
Request (minio::http)
RequestBuilder (minio::s3)
Response (minio::http)
Response (minio::s3)
Retention (minio::s3)
S
-
S3Client
S3ClientIO (Minio)
+
Sse (minio::s3)
SseCustomerKey (minio::s3)
SseKms (minio::s3)
SseS3 (minio::s3)
StaticProvider (minio::creds)
StatObjectResponse (minio::s3)
-
W
-
WriteDataCB
+
T
+
Time (minio::utils)
+
+
U
+
UploadObjectArgs (minio::s3)
UploadPartArgs (minio::s3)
UploadPartCopyArgs (minio::s3)
Url (minio::utils)
diff --git a/docs/classminio_1_1creds_1_1Credentials-members.html b/docs/classminio_1_1creds_1_1Credentials-members.html new file mode 100644 index 00000000..13d81766 --- /dev/null +++ b/docs/classminio_1_1creds_1_1Credentials-members.html @@ -0,0 +1,87 @@ + + + + + + + +MinIO C++ SDK: Member List + + + + + + + + + +
+
+ + + + + + +
+
MinIO C++ SDK +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
minio::creds::Credentials Member List
+
+
+ +

This is the complete list of members for minio::creds::Credentials, including all inherited members.

+ + + + + + + +
AccessKey() (defined in minio::creds::Credentials)minio::creds::Credentials
Credentials(const Credentials &creds) (defined in minio::creds::Credentials)minio::creds::Credentials
Credentials(std::string_view access_key, std::string_view secret_key, std::string_view session_token="", unsigned int expiration=0) (defined in minio::creds::Credentials)minio::creds::Credentials
IsExpired() (defined in minio::creds::Credentials)minio::creds::Credentials
SecretKey() (defined in minio::creds::Credentials)minio::creds::Credentials
SessionToken() (defined in minio::creds::Credentials)minio::creds::Credentials
+ + + + diff --git a/docs/classminio_1_1creds_1_1Credentials.html b/docs/classminio_1_1creds_1_1Credentials.html new file mode 100644 index 00000000..87489e96 --- /dev/null +++ b/docs/classminio_1_1creds_1_1Credentials.html @@ -0,0 +1,111 @@ + + + + + + + +MinIO C++ SDK: minio::creds::Credentials Class Reference + + + + + + + + + +
+
+ + + + + + +
+
MinIO C++ SDK +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
minio::creds::Credentials Class Reference
+
+
+ +

#include <creds.h>

+ + + + + + + + + + + + + + +

+Public Member Functions

Credentials (const Credentials &creds)
 
Credentials (std::string_view access_key, std::string_view secret_key, std::string_view session_token="", unsigned int expiration=0)
 
+std::string AccessKey ()
 
+std::string SecretKey ()
 
+std::string SessionToken ()
 
+bool IsExpired ()
 
+

Detailed Description

+

Credentials contains access key and secret key with optional session token and expiration.

+

The documentation for this class was generated from the following files:
    +
  • /home/bala/devel/github.com/minio/minio-cpp/include/creds.h
  • +
  • /home/bala/devel/github.com/minio/minio-cpp/src/creds.cc
  • +
+
+ + + + diff --git a/docs/structReadDataCB-members.html b/docs/classminio_1_1creds_1_1Provider-members.html similarity index 66% rename from docs/structReadDataCB-members.html rename to docs/classminio_1_1creds_1_1Provider-members.html index fbf530f3..9e8d6d81 100644 --- a/docs/structReadDataCB-members.html +++ b/docs/classminio_1_1creds_1_1Provider-members.html @@ -59,18 +59,22 @@ +
-
ReadDataCB Member List
+
minio::creds::Provider Member List
-

This is the complete list of members for ReadDataCB, including all inherited members.

+

This is the complete list of members for minio::creds::Provider, including all inherited members.

- - - + + +
io (defined in ReadDataCB)ReadDataCB
operator()(char *buf, size_t size, size_t nmemb) (defined in ReadDataCB)ReadDataCBinline
ReadDataCB(Minio::S3ClientIO &ioio) (defined in ReadDataCB)ReadDataCBinline
Fetch()=0 (defined in minio::creds::Provider)minio::creds::Providerpure virtual
Provider() (defined in minio::creds::Provider)minio::creds::Providerinline
~Provider() (defined in minio::creds::Provider)minio::creds::Providerinlinevirtual