mirror of
https://github.com/minio/minio-cpp.git
synced 2025-07-31 16:24:23 +03:00
Moved C++ headers to miniocpp subdirectory (#123)
* Use #include <miniocpp/header.h> to include minio-cpp now * Header files have consistent guards that don't start with _ * Added a SPDX license identifier to each source and header file * Use clang-format-18 to format the source code Co-authored-by: Petr Kobalicek <petr.kobalicek@min.io>
This commit is contained in:
91
.github/workflows/ci.yml
vendored
91
.github/workflows/ci.yml
vendored
@ -16,16 +16,34 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
coding-style:
|
||||||
|
name: "Coding Style Check"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies if Ubuntu
|
||||||
|
run: |
|
||||||
|
wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
|
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main' | sudo tee -a /etc/apt/sources.list
|
||||||
|
sudo apt-get -qy update
|
||||||
|
sudo apt-get -qy install clang-format-18
|
||||||
|
clang-format-18 --version
|
||||||
|
|
||||||
|
- name: Coding Style Check
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
CLANG_FORMAT=clang-format-18 ./check-style.sh
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.config.name }}
|
|
||||||
runs-on: ${{ matrix.config.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu_Latest_GCC",
|
name: "Ubuntu_Latest_GCC",
|
||||||
os: Ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
build_type: "Release",
|
build_type: "Release",
|
||||||
cc: "gcc",
|
cc: "gcc",
|
||||||
cxx: "g++"
|
cxx: "g++"
|
||||||
@ -45,8 +63,20 @@ jobs:
|
|||||||
cxx: "cl"
|
cxx: "cl"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
name: ${{ matrix.config.name }}
|
||||||
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout minio-cpp
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: "minio-cpp"
|
||||||
|
|
||||||
|
- name: Checkout vcpkg
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: microsoft/vcpkg
|
||||||
|
path: "vcpkg"
|
||||||
|
|
||||||
- name: Print env
|
- name: Print env
|
||||||
run: |
|
run: |
|
||||||
@ -57,22 +87,20 @@ jobs:
|
|||||||
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
||||||
run: |
|
run: |
|
||||||
wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main' | sudo tee -a /etc/apt/sources.list
|
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main' | sudo tee -a /etc/apt/sources.list
|
||||||
sudo apt-get -qy update
|
sudo apt-get -qy update
|
||||||
sudo apt-get -qy install cmake clang-format-14
|
sudo apt-get -qy install cmake
|
||||||
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
|
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
|
||||||
chmod +x minio
|
chmod +x minio
|
||||||
cmake --version
|
cmake --version
|
||||||
clang-format --version
|
|
||||||
./minio --version
|
./minio --version
|
||||||
|
|
||||||
- name: Install dependencies if macOS
|
- name: Install dependencies if macOS
|
||||||
if: startsWith(matrix.config.os, 'macos')
|
if: startsWith(matrix.config.os, 'macos')
|
||||||
run: |
|
run: |
|
||||||
brew install pkg-config cmake clang-format minio/stable/minio
|
brew install pkg-config cmake minio/stable/minio
|
||||||
cmake --version
|
cmake --version
|
||||||
minio --version
|
minio --version
|
||||||
clang-format --version
|
|
||||||
|
|
||||||
- name: Install dependencies if Windows
|
- name: Install dependencies if Windows
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -83,35 +111,21 @@ jobs:
|
|||||||
chmod +x minio.exe
|
chmod +x minio.exe
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
- name: Install vcpkg
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.vcpkg
|
|
||||||
touch ~/.vcpkg/vcpkg.path.txt
|
|
||||||
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
|
|
||||||
./vcpkg-master/vcpkg install
|
|
||||||
|
|
||||||
- name: C++ Style check if not Windows
|
|
||||||
if: ${{ !startsWith(matrix.config.os, 'windows') }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
./check-style.sh
|
|
||||||
|
|
||||||
- name: Configure and Build
|
- name: Configure and Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_TOOLCHAIN_FILE=./vcpkg-master/scripts/buildsystems/vcpkg.cmake -DMINIO_CPP_TEST:BOOL=ON
|
./vcpkg/bootstrap-vcpkg.sh
|
||||||
cmake --build ./build --config ${{ matrix.config.build_type }} -j 4
|
cd minio-cpp
|
||||||
|
../vcpkg/vcpkg install
|
||||||
|
cmake . -B ./build -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DMINIO_CPP_TEST:BOOL=ON
|
||||||
|
cmake --build ./build --config ${{matrix.config.build_type}} -j 4
|
||||||
|
|
||||||
- name: Start MinIO server if Ubuntu
|
- name: Start MinIO server if Ubuntu
|
||||||
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.minio/certs
|
mkdir -p ~/.minio/certs
|
||||||
cp ./tests/public.crt ./tests/private.key ~/.minio/certs/
|
cp ./minio-cpp/tests/public.crt ./minio-cpp/tests/private.key ~/.minio/certs/
|
||||||
sudo cp ./tests/public.crt /usr/local/share/ca-certificates/
|
sudo cp ./minio-cpp/tests/public.crt /usr/local/share/ca-certificates/
|
||||||
sudo update-ca-certificates
|
sudo update-ca-certificates
|
||||||
MINIO_CI_CD=true ./minio server /tmp/test-xl/{1...4}/ &
|
MINIO_CI_CD=true ./minio server /tmp/test-xl/{1...4}/ &
|
||||||
sleep 10
|
sleep 10
|
||||||
@ -127,29 +141,28 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.minio/certs
|
mkdir -p ~/.minio/certs
|
||||||
cp ./tests/public.crt ./tests/private.key ~/.minio/certs/
|
cp ./minio-cpp/tests/public.crt ./minio-cpp/tests/private.key ~/.minio/certs/
|
||||||
certutil -addstore -f "ROOT" ./tests/public.crt
|
certutil -addstore -f "ROOT" ./minio-cpp/tests/public.crt
|
||||||
MINIO_CI_CD=true ./minio.exe server test-xl/{1...4}/ &
|
MINIO_CI_CD=true ./minio.exe server test-xl/{1...4}/ &
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
- name: Run tests if Ubuntu
|
- name: Run tests if Ubuntu
|
||||||
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
||||||
run: |
|
run: |
|
||||||
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 ./build/tests
|
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 ./minio-cpp/build/tests
|
||||||
|
|
||||||
- name: Run tests if macOS
|
- name: Run tests if macOS
|
||||||
if: startsWith(matrix.config.name, 'macos')
|
if: startsWith(matrix.config.name, 'macos')
|
||||||
run: |
|
run: |
|
||||||
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ./build/tests
|
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ./minio-cpp/build/tests
|
||||||
|
|
||||||
- name: Run tests if Windows
|
- name: Run tests if Windows
|
||||||
shell: bash
|
shell: bash
|
||||||
if: startsWith(matrix.config.os, 'windows')
|
if: startsWith(matrix.config.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 ./build/Release/tests.exe
|
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 ./minio-cpp/build/Release/tests.exe
|
||||||
|
|
||||||
- name: Run CMake test
|
- name: Run CMake test
|
||||||
working-directory: ${{github.workspace}}/build
|
run: |
|
||||||
# Execute tests defined by the CMake configuration.
|
cd minio-cpp/build
|
||||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
ctest -C ${{ matrix.config.build_type }}
|
||||||
run: ctest -C ${{ matrix.config.build_type }}
|
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
cmake_policy(SET CMP0091 NEW)
|
cmake_policy(SET CMP0091 NEW)
|
||||||
|
|
||||||
@ -97,21 +100,21 @@ set(MINIO_CPP_SOURCES
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(MINIO_CPP_HEADERS
|
set(MINIO_CPP_HEADERS
|
||||||
include/args.h
|
include/miniocpp/args.h
|
||||||
include/baseclient.h
|
include/miniocpp/baseclient.h
|
||||||
include/client.h
|
include/miniocpp/client.h
|
||||||
include/config.h
|
include/miniocpp/config.h
|
||||||
include/credentials.h
|
include/miniocpp/credentials.h
|
||||||
include/error.h
|
include/miniocpp/error.h
|
||||||
include/http.h
|
include/miniocpp/http.h
|
||||||
include/providers.h
|
include/miniocpp/providers.h
|
||||||
include/request.h
|
include/miniocpp/request.h
|
||||||
include/response.h
|
include/miniocpp/response.h
|
||||||
include/select.h
|
include/miniocpp/select.h
|
||||||
include/signer.h
|
include/miniocpp/signer.h
|
||||||
include/sse.h
|
include/miniocpp/sse.h
|
||||||
include/types.h
|
include/miniocpp/types.h
|
||||||
include/utils.h
|
include/miniocpp/utils.h
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(miniocpp STATIC ${MINIO_CPP_SOURCES} ${MINIO_CPP_HEADERS})
|
add_library(miniocpp STATIC ${MINIO_CPP_SOURCES} ${MINIO_CPP_HEADERS})
|
||||||
|
11
README.md
11
README.md
@ -33,7 +33,7 @@ Typically `minio-cpp` will be part of dependencies specified in `vcpkg.json` fil
|
|||||||
|
|
||||||
## Hacking minio-cpp
|
## Hacking minio-cpp
|
||||||
|
|
||||||
In order to run minio-cpp tests and examples, you can do the following assuming `VCPKG_ROOT` points to a `vcpkg` installation:
|
In order to run minio-cpp tests and examples, you can do the following assuming `VCPKG_ROOT` points to a valid `vcpkg` installation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/minio/minio-cpp
|
$ git clone https://github.com/minio/minio-cpp
|
||||||
@ -58,11 +58,10 @@ The examples above assumed that you have `vcpkg` already installed and you have
|
|||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/minio/minio-cpp
|
$ git clone https://github.com/minio/minio-cpp
|
||||||
$ cd minio-cpp
|
$ cd minio-cpp
|
||||||
$ wget --quiet -O vcpkg-master.zip https://github.com/microsoft/vcpkg/archive/refs/heads/master.zip
|
$ git clone https://github.com/microsoft/vcpkg.git
|
||||||
$ unzip -qq vcpkg-master.zip
|
$ ./vcpkg/bootstrap-vcpkg.sh
|
||||||
$ ./vcpkg-master/bootstrap-vcpkg.sh
|
$ ./vcpkg/vcpkg install
|
||||||
$ ./vcpkg-master/vcpkg integrate install
|
$ cmake . -B ./build/Debug -DCMAKE_BUILD_TYPE=Debug -DMINIO_CPP_TEST=ON -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
$ cmake . -B ./build/Debug -DCMAKE_BUILD_TYPE=Debug -DMINIO_CPP_TEST=ON -DCMAKE_TOOLCHAIN_FILE=./vcpkg-master/scripts/buildsystems/vcpkg.cmake
|
|
||||||
$ cmake --build ./build/Debug
|
$ cmake --build ./build/Debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function clang_format() {
|
if [ -z "${CLANG_FORMAT}" ]; then
|
||||||
echo "verifying 'clang-format --output-replacements-xml --style=Google $@'"
|
CLANG_FORMAT="clang-format"
|
||||||
if clang-format --output-replacements-xml --style=Google "$@" | grep -q '<replacement '; then
|
fi
|
||||||
|
|
||||||
|
function do_clang_format() {
|
||||||
|
echo "verifying '${CLANG_FORMAT} --output-replacements-xml --style=Google $@'"
|
||||||
|
if ${CLANG_FORMAT} --output-replacements-xml --style=Google "$@" | grep -q '<replacement '; then
|
||||||
echo "ERROR:" "$@" "not in Google C/C++ style"
|
echo "ERROR:" "$@" "not in Google C/C++ style"
|
||||||
echo "To fix formatting run"
|
echo "To fix formatting run"
|
||||||
echo "$ clang-format -i --style=Google" "$@"
|
echo "$ ${CLANG_FORMAT} -i --style=Google" "$@"
|
||||||
return 255
|
return 255
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -14,7 +18,7 @@ tmpfile="tmpfile.$RANDOM"
|
|||||||
find src include examples tests -iname "*.cc" -o -iname "*.h" > "$tmpfile"
|
find src include examples tests -iname "*.cc" -o -iname "*.h" > "$tmpfile"
|
||||||
ec=0
|
ec=0
|
||||||
while read -r file; do
|
while read -r file; do
|
||||||
if ! clang_format "$file"; then
|
if ! do_clang_format "$file"; then
|
||||||
ec=255
|
ec=255
|
||||||
fi
|
fi
|
||||||
done < "$tmpfile"
|
done < "$tmpfile"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Composeright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
@ -37,8 +39,7 @@ int main() {
|
|||||||
if (resp) {
|
if (resp) {
|
||||||
std::cout << "Bucket tags: " << std::endl;
|
std::cout << "Bucket tags: " << std::endl;
|
||||||
for (auto& [key, value] : resp.tags) {
|
for (auto& [key, value] : resp.tags) {
|
||||||
std::cout << "Key: " << key << ", "
|
std::cout << "Key: " << key << ", " << "Value: " << value << std::endl;
|
||||||
<< "Value: " << value << std::endl;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cout << "unable to get bucket tags; " << resp.Error().String()
|
std::cout << "unable to get bucket tags; " << resp.Error().String()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
@ -38,8 +40,7 @@ int main() {
|
|||||||
if (resp) {
|
if (resp) {
|
||||||
std::cout << "Object tags: " << std::endl;
|
std::cout << "Object tags: " << std::endl;
|
||||||
for (auto& [key, value] : resp.tags) {
|
for (auto& [key, value] : resp.tags) {
|
||||||
std::cout << "Key: " << key << ", "
|
std::cout << "Key: " << key << ", " << "Value: " << value << std::endl;
|
||||||
<< "Value: " << value << std::endl;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cout << "unable to get object tags; " << resp.Error().String()
|
std::cout << "unable to get object tags; " << resp.Error().String()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,18 +12,20 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
#include <miniocpp/args.h>
|
||||||
|
#include <miniocpp/client.h>
|
||||||
|
#include <miniocpp/providers.h>
|
||||||
|
#include <miniocpp/request.h>
|
||||||
|
#include <miniocpp/response.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "args.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include "providers.h"
|
|
||||||
#include "request.h"
|
|
||||||
#include "response.h"
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
minio::s3::BaseUrl base_url("play.min.io");
|
minio::s3::BaseUrl base_url("play.min.io");
|
||||||
|
@ -12,19 +12,20 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
#include <miniocpp/args.h>
|
||||||
|
#include <miniocpp/client.h>
|
||||||
|
#include <miniocpp/providers.h>
|
||||||
|
#include <miniocpp/request.h>
|
||||||
|
#include <miniocpp/response.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "args.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include "http.h"
|
|
||||||
#include "providers.h"
|
|
||||||
#include "request.h"
|
|
||||||
#include "response.h"
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
minio::s3::BaseUrl base_url("play.min.io");
|
minio::s3::BaseUrl base_url("play.min.io");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
#include "select.h"
|
#include <miniocpp/select.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include <miniocpp/client.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Create S3 base URL.
|
// Create S3 base URL.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_ARGS_H
|
#ifndef MINIO_CPP_ARGS_H_INCLUDED
|
||||||
#define _MINIO_S3_ARGS_H
|
#define MINIO_CPP_ARGS_H_INCLUDED
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -30,6 +32,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace s3 {
|
namespace s3 {
|
||||||
|
|
||||||
struct BaseArgs {
|
struct BaseArgs {
|
||||||
utils::Multimap extra_headers;
|
utils::Multimap extra_headers;
|
||||||
utils::Multimap extra_query_params;
|
utils::Multimap extra_query_params;
|
||||||
@ -600,4 +603,5 @@ struct PostPolicy {
|
|||||||
}; // struct PostPolicy
|
}; // struct PostPolicy
|
||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef __MINIO_S3_ARGS_H
|
|
||||||
|
#endif // _MINIO_CPP_ARGS_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_BASE_CLIENT_H
|
#ifndef MINIO_CPP_BASECLIENT_H_INCLUDED
|
||||||
#define _MINIO_S3_BASE_CLIENT_H
|
#define MINIO_CPP_BASECLIENT_H_INCLUDED
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -151,4 +153,5 @@ class BaseClient {
|
|||||||
}; // class BaseClient
|
}; // class BaseClient
|
||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef __MINIO_S3_BASE_CLIENT_H
|
|
||||||
|
#endif // MINIO_CPP_BASECLIENT_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_CLIENT_H
|
#ifndef MINIO_CPP_CLIENT_H_INCLUDED
|
||||||
#define _MINIO_S3_CLIENT_H
|
#define MINIO_CPP_CLIENT_H_INCLUDED
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -28,6 +30,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace s3 {
|
namespace s3 {
|
||||||
|
|
||||||
class Client;
|
class Client;
|
||||||
|
|
||||||
class ListObjectsResult {
|
class ListObjectsResult {
|
||||||
@ -121,6 +124,8 @@ class Client : public BaseClient {
|
|||||||
UploadObjectResponse UploadObject(UploadObjectArgs args);
|
UploadObjectResponse UploadObject(UploadObjectArgs args);
|
||||||
RemoveObjectsResult RemoveObjects(RemoveObjectsArgs args);
|
RemoveObjectsResult RemoveObjects(RemoveObjectsArgs args);
|
||||||
}; // class Client
|
}; // class Client
|
||||||
|
|
||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef __MINIO_S3_CLIENT_H
|
|
||||||
|
#endif // MINIO_CPP_CLIENT_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,6 +12,8 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef MINIO_CPP_CONFIG_H_INCLUDED
|
#ifndef MINIO_CPP_CONFIG_H_INCLUDED
|
||||||
#define MINIO_CPP_CONFIG_H_INCLUDED
|
#define MINIO_CPP_CONFIG_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_CREDS_CREDENTIALS_H
|
#ifndef MINIO_CPP_CREDENTIALS_H_INCLUDED
|
||||||
#define _MINIO_CREDS_CREDENTIALS_H
|
#define MINIO_CPP_CREDENTIALS_H_INCLUDED
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
@ -24,6 +26,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace creds {
|
namespace creds {
|
||||||
|
|
||||||
bool expired(const utils::UtcTime& expiration);
|
bool expired(const utils::UtcTime& expiration);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,7 +75,8 @@ struct Credentials {
|
|||||||
|
|
||||||
static Credentials ParseXML(std::string_view data, const std::string& root);
|
static Credentials ParseXML(std::string_view data, const std::string& root);
|
||||||
}; // class Credentials
|
}; // class Credentials
|
||||||
|
|
||||||
} // namespace creds
|
} // namespace creds
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef _MINIO_CREDS_CREDENTIALS_H
|
#endif // MINIO_CPP_CREDENTIALS_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_ERROR_H
|
#ifndef MINIO_CPP_ERROR_H_INCLUDED
|
||||||
#define _MINIO_ERROR_H
|
#define MINIO_CPP_ERROR_H_INCLUDED
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -22,6 +24,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace error {
|
namespace error {
|
||||||
|
|
||||||
class Error {
|
class Error {
|
||||||
private:
|
private:
|
||||||
std::string msg_;
|
std::string msg_;
|
||||||
@ -52,7 +55,8 @@ template <typename T_RESULT, typename... TA>
|
|||||||
inline T_RESULT make(TA&&... args) {
|
inline T_RESULT make(TA&&... args) {
|
||||||
return T_RESULT{Error(std::forward<TA>(args)...)};
|
return T_RESULT{Error(std::forward<TA>(args)...)};
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace error
|
} // namespace error
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef _MINIO_ERROR_H
|
#endif // MINIO_CPP_ERROR_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_HTTP_H
|
#ifndef MINIO_CPP_HTTP_H_INCLUDED
|
||||||
#define _MINIO_HTTP_H
|
#define MINIO_CPP_HTTP_H_INCLUDED
|
||||||
|
|
||||||
#include <curlpp/Easy.hpp>
|
#include <curlpp/Easy.hpp>
|
||||||
#include <curlpp/Multi.hpp>
|
#include <curlpp/Multi.hpp>
|
||||||
@ -29,6 +31,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
enum class Method { kGet, kHead, kPost, kPut, kDelete };
|
enum class Method { kGet, kHead, kPost, kPut, kDelete };
|
||||||
|
|
||||||
// MethodToString converts http Method enum to string.
|
// MethodToString converts http Method enum to string.
|
||||||
@ -182,6 +185,8 @@ struct Response {
|
|||||||
error::Error ReadStatusCode();
|
error::Error ReadStatusCode();
|
||||||
error::Error ReadHeaders();
|
error::Error ReadHeaders();
|
||||||
}; // struct Response
|
}; // struct Response
|
||||||
|
|
||||||
} // namespace http
|
} // namespace http
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef _MINIO_HTTP_H
|
|
||||||
|
#endif // MINIO_CPP_HTTP_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_CREDS_PROVIDERS_H
|
#ifndef MINIO_CPP_PROVIDERS_H_INCLUDED
|
||||||
#define _MINIO_CREDS_PROVIDERS_H
|
#define MINIO_CPP_PROVIDERS_H_INCLUDED
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -31,6 +33,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace creds {
|
namespace creds {
|
||||||
|
|
||||||
struct Jwt {
|
struct Jwt {
|
||||||
std::string token;
|
std::string token;
|
||||||
unsigned int expiry = 0;
|
unsigned int expiry = 0;
|
||||||
@ -246,7 +249,8 @@ struct CertificateIdentityProvider : public Provider {
|
|||||||
|
|
||||||
virtual Credentials Fetch() override;
|
virtual Credentials Fetch() override;
|
||||||
}; // struct CertificateIdentityProvider
|
}; // struct CertificateIdentityProvider
|
||||||
|
|
||||||
} // namespace creds
|
} // namespace creds
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef _MINIO_CREDS_PROVIDERS_H
|
#endif // MINIO_CPP_PROVIDERS_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_REQUEST_H
|
#ifndef MINIO_CPP_REQUEST_H_INCLUDED
|
||||||
#define _MINIO_REQUEST_H
|
#define MINIO_CPP_REQUEST_H_INCLUDED
|
||||||
|
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -26,6 +28,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace s3 {
|
namespace s3 {
|
||||||
|
|
||||||
const std::string AWS_S3_PREFIX =
|
const std::string AWS_S3_PREFIX =
|
||||||
"^(((bucket\\.|accesspoint\\.)"
|
"^(((bucket\\.|accesspoint\\.)"
|
||||||
"vpce(-(?!_)[a-z_\\d]+)+\\.s3\\.)|"
|
"vpce(-(?!_)[a-z_\\d]+)+\\.s3\\.)|"
|
||||||
@ -136,6 +139,8 @@ struct Request {
|
|||||||
private:
|
private:
|
||||||
void BuildHeaders(http::Url& url, creds::Provider* const provider);
|
void BuildHeaders(http::Url& url, creds::Provider* const provider);
|
||||||
}; // struct Request
|
}; // struct Request
|
||||||
|
|
||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef __MINIO_REQUEST_H
|
|
||||||
|
#endif // MINIO_CPP_REQUEST_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_RESPONSE_H
|
#ifndef MINIO_CPP_RESPONSE_H_INCLUDED
|
||||||
#define _MINIO_S3_RESPONSE_H
|
#define MINIO_CPP_RESPONSE_H_INCLUDED
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -27,6 +29,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace s3 {
|
namespace s3 {
|
||||||
|
|
||||||
struct Response {
|
struct Response {
|
||||||
int status_code = 0;
|
int status_code = 0;
|
||||||
utils::Multimap headers;
|
utils::Multimap headers;
|
||||||
@ -565,7 +568,8 @@ struct GetPresignedPostFormDataResponse : public Response {
|
|||||||
|
|
||||||
#undef MINIO_S3_DERIVE_FROM_PUT_OBJECT_RESPONSE
|
#undef MINIO_S3_DERIVE_FROM_PUT_OBJECT_RESPONSE
|
||||||
#undef MINIO_S3_DERIVE_FROM_RESPONSE
|
#undef MINIO_S3_DERIVE_FROM_RESPONSE
|
||||||
|
|
||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef _MINIO_S3_RESPONSE_H
|
#endif // MINIO_CPP_RESPONSE_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_SELECT_H
|
#ifndef MINIO_CPP_SELECT_H_INCLUDED
|
||||||
#define _MINIO_S3_SELECT_H
|
#define MINIO_CPP_SELECT_H_INCLUDED
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -67,4 +69,4 @@ class SelectHandler {
|
|||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef _MINIO_S3_SELECT_H
|
#endif // MINIO_CPP_SELECT_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_SIGNER_H
|
#ifndef MINIO_CPP_SIGNER_H_INCLUDED
|
||||||
#define _MINIO_SIGNER_H
|
#define MINIO_CPP_SIGNER_H_INCLUDED
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -23,6 +25,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace signer {
|
namespace signer {
|
||||||
|
|
||||||
std::string GetScope(const utils::UtcTime& time, const std::string& region,
|
std::string GetScope(const utils::UtcTime& time, const std::string& region,
|
||||||
const std::string& service_name);
|
const std::string& service_name);
|
||||||
std::string GetCanonicalRequestHash(const std::string& method,
|
std::string GetCanonicalRequestHash(const std::string& method,
|
||||||
@ -77,4 +80,5 @@ std::string PostPresignV4(const std::string& data,
|
|||||||
const std::string& region);
|
const std::string& region);
|
||||||
} // namespace signer
|
} // namespace signer
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef __MINIO_SIGNER_H
|
|
||||||
|
#endif // MINIO_CPP_SIGNER_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_SSE_H
|
#ifndef MINIO_CPP_SSE_H_INCLUDED
|
||||||
#define _MINIO_S3_SSE_H
|
#define MINIO_CPP_SSE_H_INCLUDED
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -63,4 +65,4 @@ class SseS3 : public Sse {
|
|||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef __MINIO_S3_SSE_H
|
#endif // MINIO_CPP_SSE_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_S3_TYPES_H
|
#ifndef MINIO_CPP_TYPES_H_INCLUDED
|
||||||
#define _MINIO_S3_TYPES_H
|
#define MINIO_CPP_TYPES_H_INCLUDED
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@ -31,6 +33,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace s3 {
|
namespace s3 {
|
||||||
|
|
||||||
enum class RetentionMode { kGovernance, kCompliance };
|
enum class RetentionMode { kGovernance, kCompliance };
|
||||||
|
|
||||||
// StringToRetentionMode converts string to retention mode enum.
|
// StringToRetentionMode converts string to retention mode enum.
|
||||||
@ -763,6 +766,8 @@ struct ObjectLockConfig {
|
|||||||
|
|
||||||
error::Error Validate() const;
|
error::Error Validate() const;
|
||||||
}; // struct ObjectLockConfig
|
}; // struct ObjectLockConfig
|
||||||
|
|
||||||
} // namespace s3
|
} // namespace s3
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
#endif // #ifndef __MINIO_S3_TYPES_H
|
|
||||||
|
#endif // MINIO_CPP_TYPES_H_INCLUDED
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,9 +12,11 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifndef _MINIO_UTILS_H
|
#ifndef MINIO_CPP_UTILS_H_INCLUDED
|
||||||
#define _MINIO_UTILS_H
|
#define MINIO_CPP_UTILS_H_INCLUDED
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
@ -33,6 +35,7 @@
|
|||||||
|
|
||||||
namespace minio {
|
namespace minio {
|
||||||
namespace utils {
|
namespace utils {
|
||||||
|
|
||||||
inline constexpr unsigned int kMaxMultipartCount = 10000; // 10000 parts
|
inline constexpr unsigned int kMaxMultipartCount = 10000; // 10000 parts
|
||||||
inline constexpr uint64_t kMaxObjectSize = 5'497'558'138'880; // 5TiB
|
inline constexpr uint64_t kMaxObjectSize = 5'497'558'138'880; // 5TiB
|
||||||
inline constexpr uint64_t kMaxPartSize = 5'368'709'120; // 5GiB
|
inline constexpr uint64_t kMaxPartSize = 5'368'709'120; // 5GiB
|
||||||
@ -223,7 +226,8 @@ struct CharBuffer : std::streambuf {
|
|||||||
off_type off, std::ios_base::seekdir dir,
|
off_type off, std::ios_base::seekdir dir,
|
||||||
std::ios_base::openmode which = std::ios_base::in) override;
|
std::ios_base::openmode which = std::ios_base::in) override;
|
||||||
}; // struct CharBuffer
|
}; // struct CharBuffer
|
||||||
|
|
||||||
} // namespace utils
|
} // namespace utils
|
||||||
} // namespace minio
|
} // namespace minio
|
||||||
|
|
||||||
#endif // #ifndef _MINIO_UTILS_H
|
#endif // MINIO_CPP_UTILS_H_INCLUDED
|
16
src/args.cc
16
src/args.cc
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "args.h"
|
#include "miniocpp/args.h"
|
||||||
|
|
||||||
#include <curlpp/cURLpp.hpp>
|
#include <curlpp/cURLpp.hpp>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
@ -25,11 +27,11 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "http.h"
|
#include "miniocpp/http.h"
|
||||||
#include "signer.h"
|
#include "miniocpp/signer.h"
|
||||||
#include "types.h"
|
#include "miniocpp/types.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
minio::error::Error minio::s3::BucketArgs::Validate() const {
|
minio::error::Error minio::s3::BucketArgs::Validate() const {
|
||||||
return utils::CheckBucketName(bucket);
|
return utils::CheckBucketName(bucket);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "baseclient.h"
|
#include "miniocpp/baseclient.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
@ -28,18 +30,18 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "args.h"
|
#include "miniocpp/args.h"
|
||||||
#include "config.h"
|
#include "miniocpp/config.h"
|
||||||
#include "credentials.h"
|
#include "miniocpp/credentials.h"
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "http.h"
|
#include "miniocpp/http.h"
|
||||||
#include "providers.h"
|
#include "miniocpp/providers.h"
|
||||||
#include "request.h"
|
#include "miniocpp/request.h"
|
||||||
#include "response.h"
|
#include "miniocpp/response.h"
|
||||||
#include "select.h"
|
#include "miniocpp/select.h"
|
||||||
#include "signer.h"
|
#include "miniocpp/signer.h"
|
||||||
#include "types.h"
|
#include "miniocpp/types.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
minio::utils::Multimap minio::s3::GetCommonListObjectsQueryParams(
|
minio::utils::Multimap minio::s3::GetCommonListObjectsQueryParams(
|
||||||
const std::string& delimiter, const std::string& encoding_type,
|
const std::string& delimiter, const std::string& encoding_type,
|
||||||
@ -361,12 +363,8 @@ minio::s3::BaseClient::CompleteMultipartUpload(
|
|||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "<CompleteMultipartUpload>";
|
ss << "<CompleteMultipartUpload>";
|
||||||
for (auto& part : args.parts) {
|
for (auto& part : args.parts) {
|
||||||
ss << "<Part>"
|
ss << "<Part>" << "<PartNumber>" << part.number << "</PartNumber>"
|
||||||
<< "<PartNumber>" << part.number << "</PartNumber>"
|
<< "<ETag>" << "\"" << part.etag << "\"" << "</ETag>" << "</Part>";
|
||||||
<< "<ETag>"
|
|
||||||
<< "\"" << part.etag << "\""
|
|
||||||
<< "</ETag>"
|
|
||||||
<< "</Part>";
|
|
||||||
}
|
}
|
||||||
ss << "</CompleteMultipartUpload>";
|
ss << "</CompleteMultipartUpload>";
|
||||||
std::string body = ss.str();
|
std::string body = ss.str();
|
||||||
@ -1348,9 +1346,8 @@ minio::s3::MakeBucketResponse minio::s3::BaseClient::MakeBucket(
|
|||||||
std::string body;
|
std::string body;
|
||||||
if (region != "us-east-1") {
|
if (region != "us-east-1") {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "<CreateBucketConfiguration>"
|
ss << "<CreateBucketConfiguration>" << "<LocationConstraint>" << region
|
||||||
<< "<LocationConstraint>" << region << "</LocationConstraint>"
|
<< "</LocationConstraint>" << "</CreateBucketConfiguration>";
|
||||||
<< "</CreateBucketConfiguration>";
|
|
||||||
body = ss.str();
|
body = ss.str();
|
||||||
req.body = body;
|
req.body = body;
|
||||||
}
|
}
|
||||||
@ -1671,10 +1668,8 @@ minio::s3::SetBucketTagsResponse minio::s3::BaseClient::SetBucketTags(
|
|||||||
if (!args.tags.empty()) {
|
if (!args.tags.empty()) {
|
||||||
ss << "<TagSet>";
|
ss << "<TagSet>";
|
||||||
for (auto& [key, value] : args.tags) {
|
for (auto& [key, value] : args.tags) {
|
||||||
ss << "<Tag>"
|
ss << "<Tag>" << "<Key>" << key << "</Key>" << "<Value>" << value
|
||||||
<< "<Key>" << key << "</Key>"
|
<< "</Value>" << "</Tag>";
|
||||||
<< "<Value>" << value << "</Value>"
|
|
||||||
<< "</Tag>";
|
|
||||||
}
|
}
|
||||||
ss << "</TagSet>";
|
ss << "</TagSet>";
|
||||||
}
|
}
|
||||||
@ -1788,10 +1783,9 @@ minio::s3::SetObjectRetentionResponse minio::s3::BaseClient::SetObjectRetention(
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "<Retention>"
|
ss << "<Retention>" << "<Mode>" << RetentionModeToString(args.retention_mode)
|
||||||
<< "<Mode>" << RetentionModeToString(args.retention_mode) << "</Mode>"
|
<< "</Mode>" << "<RetainUntilDate>"
|
||||||
<< "<RetainUntilDate>" << args.retain_until_date.ToISO8601UTC()
|
<< args.retain_until_date.ToISO8601UTC() << "</RetainUntilDate>"
|
||||||
<< "</RetainUntilDate>"
|
|
||||||
<< "</Retention>";
|
<< "</Retention>";
|
||||||
|
|
||||||
std::string body = ss.str();
|
std::string body = ss.str();
|
||||||
@ -1828,10 +1822,8 @@ minio::s3::SetObjectTagsResponse minio::s3::BaseClient::SetObjectTags(
|
|||||||
if (!args.tags.empty()) {
|
if (!args.tags.empty()) {
|
||||||
ss << "<TagSet>";
|
ss << "<TagSet>";
|
||||||
for (auto& [key, value] : args.tags) {
|
for (auto& [key, value] : args.tags) {
|
||||||
ss << "<Tag>"
|
ss << "<Tag>" << "<Key>" << key << "</Key>" << "<Value>" << value
|
||||||
<< "<Key>" << key << "</Key>"
|
<< "</Value>" << "</Tag>";
|
||||||
<< "<Value>" << value << "</Value>"
|
|
||||||
<< "</Tag>";
|
|
||||||
}
|
}
|
||||||
ss << "</TagSet>";
|
ss << "</TagSet>";
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "client.h"
|
#include "miniocpp/client.h"
|
||||||
|
|
||||||
#include <curlpp/cURLpp.hpp>
|
#include <curlpp/cURLpp.hpp>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
@ -24,16 +26,16 @@
|
|||||||
#include <system_error>
|
#include <system_error>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "args.h"
|
#include "miniocpp/args.h"
|
||||||
#include "baseclient.h"
|
#include "miniocpp/baseclient.h"
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "http.h"
|
#include "miniocpp/http.h"
|
||||||
#include "providers.h"
|
#include "miniocpp/providers.h"
|
||||||
#include "request.h"
|
#include "miniocpp/request.h"
|
||||||
#include "response.h"
|
#include "miniocpp/response.h"
|
||||||
#include "sse.h"
|
#include "miniocpp/sse.h"
|
||||||
#include "types.h"
|
#include "miniocpp/types.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
minio::s3::ListObjectsResult::ListObjectsResult(error::Error err)
|
minio::s3::ListObjectsResult::ListObjectsResult(error::Error err)
|
||||||
: failed_(true) {
|
: failed_(true) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,15 +12,17 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "credentials.h"
|
#include "miniocpp/credentials.h"
|
||||||
|
|
||||||
#include <pugixml.hpp>
|
#include <pugixml.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
bool minio::creds::expired(const utils::UtcTime& expiration) {
|
bool minio::creds::expired(const utils::UtcTime& expiration) {
|
||||||
if (!expiration) return false;
|
if (!expiration) return false;
|
||||||
|
13
src/http.cc
13
src/http.cc
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,6 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
#include "miniocpp/http.h"
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@ -32,6 +36,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
#include "miniocpp/error.h"
|
||||||
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <ws2def.h> // NOTE needed for AF_INET6
|
#include <ws2def.h> // NOTE needed for AF_INET6
|
||||||
@ -41,10 +48,6 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "error.h"
|
|
||||||
#include "http.h"
|
|
||||||
#include "utils.h"
|
|
||||||
|
|
||||||
std::string minio::http::Url::String() const {
|
std::string minio::http::Url::String() const {
|
||||||
if (host.empty()) return {};
|
if (host.empty()) return {};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,11 +12,15 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "miniocpp/providers.h"
|
||||||
|
|
||||||
#include <INIReader.h>
|
#include <INIReader.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -26,6 +30,12 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
#include "miniocpp/credentials.h"
|
||||||
|
#include "miniocpp/error.h"
|
||||||
|
#include "miniocpp/http.h"
|
||||||
|
#include "miniocpp/signer.h"
|
||||||
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <ws2def.h>
|
#include <ws2def.h>
|
||||||
@ -36,13 +46,6 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "credentials.h"
|
|
||||||
#include "error.h"
|
|
||||||
#include "http.h"
|
|
||||||
#include "providers.h"
|
|
||||||
#include "signer.h"
|
|
||||||
#include "utils.h"
|
|
||||||
|
|
||||||
minio::error::Error minio::creds::checkLoopbackHost(const std::string& host) {
|
minio::error::Error minio::creds::checkLoopbackHost(const std::string& host) {
|
||||||
struct addrinfo hints = {};
|
struct addrinfo hints = {};
|
||||||
hints.ai_family = AF_INET;
|
hints.ai_family = AF_INET;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "request.h"
|
#include "miniocpp/request.h"
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
@ -25,12 +27,12 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "credentials.h"
|
#include "miniocpp/credentials.h"
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "http.h"
|
#include "miniocpp/http.h"
|
||||||
#include "providers.h"
|
#include "miniocpp/providers.h"
|
||||||
#include "signer.h"
|
#include "miniocpp/signer.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
#define EMPTY_SHA256 \
|
#define EMPTY_SHA256 \
|
||||||
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "response.h"
|
#include "miniocpp/response.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <curlpp/cURLpp.hpp>
|
#include <curlpp/cURLpp.hpp>
|
||||||
@ -23,9 +25,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "types.h"
|
#include "miniocpp/types.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
minio::s3::Response::Response() {}
|
minio::s3::Response::Response() {}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,17 +12,19 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "select.h"
|
#include "miniocpp/select.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <pugixml.hpp>
|
#include <pugixml.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
#include "http.h"
|
#include "miniocpp/http.h"
|
||||||
#include "types.h"
|
#include "miniocpp/types.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
void minio::s3::SelectHandler::Reset() {
|
void minio::s3::SelectHandler::Reset() {
|
||||||
prelude_.clear();
|
prelude_.clear();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "signer.h"
|
#include "miniocpp/signer.h"
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/hmac.h>
|
#include <openssl/hmac.h>
|
||||||
@ -23,8 +25,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "http.h"
|
#include "miniocpp/http.h"
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
const char* SIGN_V4_ALGORITHM = "AWS4-HMAC-SHA256";
|
const char* SIGN_V4_ALGORITHM = "AWS4-HMAC-SHA256";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,12 +12,14 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "sse.h"
|
#include "miniocpp/sse.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "utils.h"
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
minio::s3::Sse::Sse() {}
|
minio::s3::Sse::Sse() {}
|
||||||
|
|
||||||
|
32
src/types.cc
32
src/types.cc
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,8 +12,10 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
#include "types.h"
|
#include "miniocpp/types.h"
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
@ -23,7 +25,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "error.h"
|
#include "miniocpp/error.h"
|
||||||
|
|
||||||
minio::s3::RetentionMode minio::s3::StringToRetentionMode(
|
minio::s3::RetentionMode minio::s3::StringToRetentionMode(
|
||||||
std::string_view str) noexcept {
|
std::string_view str) noexcept {
|
||||||
@ -340,10 +342,8 @@ std::string minio::s3::ReplicationConfig::ToXML() const {
|
|||||||
|
|
||||||
auto tag_xml = [](std::string key, std::string value) -> std::string {
|
auto tag_xml = [](std::string key, std::string value) -> std::string {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "<Tag>"
|
ss << "<Tag>" << "<Key>" << key << "</Key>" << "<Value>" << value
|
||||||
<< "<Key>" << key << "</Key>"
|
<< "</Value>" << "</Tag>";
|
||||||
<< "<Value>" << value << "</Value>"
|
|
||||||
<< "</Tag>";
|
|
||||||
return ss.str();
|
return ss.str();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -373,8 +373,7 @@ std::string minio::s3::ReplicationConfig::ToXML() const {
|
|||||||
ss << "</EncryptionConfiguration>";
|
ss << "</EncryptionConfiguration>";
|
||||||
}
|
}
|
||||||
if (rule.destination.metrics) {
|
if (rule.destination.metrics) {
|
||||||
ss << "<Metrics>"
|
ss << "<Metrics>" << "<EventThreshold>";
|
||||||
<< "<EventThreshold>";
|
|
||||||
if (rule.destination.metrics.event_threshold_minutes > 0) {
|
if (rule.destination.metrics.event_threshold_minutes > 0) {
|
||||||
ss << minutes_xml(rule.destination.metrics.event_threshold_minutes);
|
ss << minutes_xml(rule.destination.metrics.event_threshold_minutes);
|
||||||
}
|
}
|
||||||
@ -382,8 +381,7 @@ std::string minio::s3::ReplicationConfig::ToXML() const {
|
|||||||
<< "</Metrics>";
|
<< "</Metrics>";
|
||||||
}
|
}
|
||||||
if (rule.destination.replication_time) {
|
if (rule.destination.replication_time) {
|
||||||
ss << "<ReplicationTime>"
|
ss << "<ReplicationTime>" << "<Time>";
|
||||||
<< "<Time>";
|
|
||||||
if (rule.destination.replication_time.time_minutes > 0) {
|
if (rule.destination.replication_time.time_minutes > 0) {
|
||||||
ss << minutes_xml(rule.destination.replication_time.time_minutes);
|
ss << minutes_xml(rule.destination.replication_time.time_minutes);
|
||||||
}
|
}
|
||||||
@ -543,10 +541,8 @@ std::string minio::s3::LifecycleConfig::ToXML() const {
|
|||||||
}
|
}
|
||||||
if (!rule.filter.and_operator.tags.empty()) {
|
if (!rule.filter.and_operator.tags.empty()) {
|
||||||
for (auto& [key, value] : rule.filter.and_operator.tags) {
|
for (auto& [key, value] : rule.filter.and_operator.tags) {
|
||||||
ss << "<Tag>"
|
ss << "<Tag>" << "<Key>" << key << "</Key>" << "<Value>" << value
|
||||||
<< "<Key>" << key << "</Key>"
|
<< "</Value>" << "</Tag>";
|
||||||
<< "<Value>" << value << "</Value>"
|
|
||||||
<< "</Tag>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ss << "</And>";
|
ss << "</And>";
|
||||||
@ -555,10 +551,8 @@ std::string minio::s3::LifecycleConfig::ToXML() const {
|
|||||||
ss << "<Prefix>" << rule.filter.prefix << "</Prefix>";
|
ss << "<Prefix>" << rule.filter.prefix << "</Prefix>";
|
||||||
}
|
}
|
||||||
if (rule.filter.tag) {
|
if (rule.filter.tag) {
|
||||||
ss << "<Tag>"
|
ss << "<Tag>" << "<Key>" << rule.filter.tag.key << "</Key>" << "<Value>"
|
||||||
<< "<Key>" << rule.filter.tag.key << "</Key>"
|
<< rule.filter.tag.value << "</Value>" << "</Tag>";
|
||||||
<< "<Value>" << rule.filter.tag.value << "</Value>"
|
|
||||||
<< "</Tag>";
|
|
||||||
}
|
}
|
||||||
ss << "</Filter>";
|
ss << "</Filter>";
|
||||||
|
|
||||||
|
17
src/utils.cc
17
src/utils.cc
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,6 +12,12 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
#include "miniocpp/utils.h"
|
||||||
|
|
||||||
|
#include "miniocpp/error.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
@ -53,9 +59,6 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "error.h"
|
|
||||||
#include "utils.h"
|
|
||||||
|
|
||||||
const std::string WEEK_DAYS[] = {"Sun", "Mon", "Tue", "Wed",
|
const std::string WEEK_DAYS[] = {"Sun", "Mon", "Tue", "Wed",
|
||||||
"Thu", "Fri", "Sat"};
|
"Thu", "Fri", "Sat"};
|
||||||
const std::string MONTHS[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
const std::string MONTHS[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||||
@ -139,10 +142,8 @@ bool minio::utils::StringToBool(const std::string& str) {
|
|||||||
|
|
||||||
std::string minio::utils::Trim(std::string_view str, char ch) {
|
std::string minio::utils::Trim(std::string_view str, char ch) {
|
||||||
std::size_t start, len;
|
std::size_t start, len;
|
||||||
for (start = 0; start < str.size() && str[start] == ch; start++)
|
for (start = 0; start < str.size() && str[start] == ch; start++);
|
||||||
;
|
for (len = str.size() - start; len > 0 && str[start + len - 1] == ch; len--);
|
||||||
for (len = str.size() - start; len > 0 && str[start + len - 1] == ch; len--)
|
|
||||||
;
|
|
||||||
return std::string(str.substr(start, len));
|
return std::string(str.substr(start, len));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
// MinIO C++ Library for Amazon S3 Compatible Cloud Storage
|
||||||
// Copyright 2022 MinIO, Inc.
|
// Copyright 2022-2024 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -12,6 +12,17 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
#include <miniocpp/args.h>
|
||||||
|
#include <miniocpp/client.h>
|
||||||
|
#include <miniocpp/http.h>
|
||||||
|
#include <miniocpp/providers.h>
|
||||||
|
#include <miniocpp/request.h>
|
||||||
|
#include <miniocpp/response.h>
|
||||||
|
#include <miniocpp/types.h>
|
||||||
|
#include <miniocpp/utils.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
@ -31,15 +42,6 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "args.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include "http.h"
|
|
||||||
#include "providers.h"
|
|
||||||
#include "request.h"
|
|
||||||
#include "response.h"
|
|
||||||
#include "types.h"
|
|
||||||
#include "utils.h"
|
|
||||||
|
|
||||||
thread_local static std::mt19937 rg{std::random_device{}()};
|
thread_local static std::mt19937 rg{std::random_device{}()};
|
||||||
|
|
||||||
const static std::string charset =
|
const static std::string charset =
|
||||||
|
Reference in New Issue
Block a user