From f6d3963f9a4be9fe69f24c46fe0cc9505646b434 Mon Sep 17 00:00:00 2001 From: web3-bot <81333946+web3-bot@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:55:16 +0200 Subject: [PATCH 01/39] ci: update Unified CI configuration (#78) Co-authored-by: web3-bot --- .github/workflows/automerge.yml | 11 +++++ .github/workflows/go-check.yml | 64 +++++++++++++++++++++++++++- .github/workflows/go-test.yml | 65 ++++++++++++++++++++++++++++- .github/workflows/release-check.yml | 7 +++- .github/workflows/releaser.yml | 5 ++- .github/workflows/tagpush.yml | 5 ++- go.mod | 2 +- version.json | 3 ++ 8 files changed, 154 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/automerge.yml create mode 100644 version.json diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000..3833fc22 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,11 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + +name: Automerge +on: [ pull_request ] + +jobs: + automerge: + uses: protocol/.github/.github/workflows/automerge.yml@master + with: + job: 'automerge' diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml index 6972415d..80d04905 100644 --- a/.github/workflows/go-check.yml +++ b/.github/workflows/go-check.yml @@ -1,3 +1,6 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + name: Go Checks on: @@ -14,5 +17,62 @@ concurrency: cancel-in-progress: true jobs: - go-check: - uses: ipdxco/unified-github-workflows/.github/workflows/go-check.yml@v1.0.22 + unit: + runs-on: ubuntu-latest + name: All + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - id: config + uses: protocol/.github/.github/actions/read-config@master + - uses: actions/setup-go@v3 + with: + go-version: 1.20.x + - name: Run repo-specific setup + uses: ./.github/actions/go-check-setup + if: hashFiles('./.github/actions/go-check-setup') != '' + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@4970552d932f48b71485287748246cf3237cebdf # 2023.1 (v0.4.0) + - name: Check that go.mod is tidy + uses: protocol/multiple-go-modules@v1.2 + with: + run: | + go mod tidy + if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then + echo "go.sum was added by go mod tidy" + exit 1 + fi + git diff --exit-code -- go.sum go.mod + - name: gofmt + if: success() || failure() # run this step even if the previous one failed + run: | + out=$(gofmt -s -l .) + if [[ -n "$out" ]]; then + echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}' + exit 1 + fi + - name: go vet + if: success() || failure() + uses: protocol/multiple-go-modules@v1.2 + with: + run: go vet ./... + - name: staticcheck + if: success() || failure() + uses: protocol/multiple-go-modules@v1.2 + with: + run: | + set -o pipefail + staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g' + - name: go generate + uses: protocol/multiple-go-modules@v1.2 + if: (success() || failure()) && fromJSON(steps.config.outputs.json).gogenerate == true + with: + run: | + git clean -fd + go generate -x ./... + if ! $(git add . && git diff-index HEAD --exit-code --quiet); then + echo "go generate caused changes to the repository:" + git status --short + exit 1 + fi diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index cb43a3ae..aefabf36 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -1,3 +1,6 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + name: Go Test on: @@ -14,5 +17,63 @@ concurrency: cancel-in-progress: true jobs: - go-test: - uses: ipdxco/unified-github-workflows/.github/workflows/go-test.yml@v1.0 + unit: + strategy: + fail-fast: false + matrix: + os: [ "ubuntu", "windows", "macos" ] + go: ["1.19.x", "1.20.x"] + env: + COVERAGES: "" + runs-on: ${{ fromJSON(vars[format('UCI_GO_TEST_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} + name: ${{ matrix.os }} (go ${{ matrix.go }}) + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - id: config + uses: protocol/.github/.github/actions/read-config@master + - uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + - name: Go information + run: | + go version + go env + - name: Use msys2 on windows + if: matrix.os == 'windows' + shell: bash + run: echo "C:/msys64/usr/bin" >> $GITHUB_PATH + - name: Run repo-specific setup + uses: ./.github/actions/go-test-setup + if: hashFiles('./.github/actions/go-test-setup') != '' + - name: Run tests + if: contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false + uses: protocol/multiple-go-modules@v1.2 + with: + run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./... + - name: Run tests (32 bit) + if: matrix.os != 'macos' && + fromJSON(steps.config.outputs.json).skip32bit != true && + contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false + uses: protocol/multiple-go-modules@v1.2 + env: + GOARCH: 386 + with: + run: | + export "PATH=$PATH_386:$PATH" + go test -v -shuffle=on ./... + - name: Run tests with race detector + if: matrix.os == 'ubuntu' && + contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false + uses: protocol/multiple-go-modules@v1.2 + with: + run: go test -v -race ./... + - name: Collect coverage files + shell: bash + run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV + - name: Upload coverage to Codecov + uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + files: '${{ env.COVERAGES }}' + env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml index 0dada63e..ca1cb7cc 100644 --- a/.github/workflows/release-check.yml +++ b/.github/workflows/release-check.yml @@ -1,3 +1,6 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + name: Release Checker on: @@ -16,4 +19,6 @@ concurrency: jobs: release-check: - uses: ipdxco/unified-github-workflows/.github/workflows/release-check.yml@v0.0 + uses: protocol/.github/.github/workflows/release-check.yml@master + with: + go-version: 1.20.x diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 2ebdbed3..cd0c06ef 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -1,3 +1,6 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + name: Releaser on: @@ -14,4 +17,4 @@ concurrency: jobs: releaser: - uses: ipdxco/unified-github-workflows/.github/workflows/releaser.yml@v1.0 + uses: protocol/.github/.github/workflows/releaser.yml@master diff --git a/.github/workflows/tagpush.yml b/.github/workflows/tagpush.yml index 72efb2d4..64b9c2b0 100644 --- a/.github/workflows/tagpush.yml +++ b/.github/workflows/tagpush.yml @@ -1,3 +1,6 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + name: Tag Push Checker on: @@ -15,4 +18,4 @@ concurrency: jobs: releaser: - uses: ipdxco/unified-github-workflows/.github/workflows/tagpush.yml@v0.0 + uses: protocol/.github/.github/workflows/tagpush.yml@master diff --git a/go.mod b/go.mod index 612b2d2d..ea0c1711 100644 --- a/go.mod +++ b/go.mod @@ -67,6 +67,7 @@ require ( github.com/rjNemo/underscore v0.5.0 github.com/robfig/cron/v3 v3.0.1 github.com/sashabaranov/go-openai v1.14.1 + github.com/shirou/gopsutil/v3 v3.23.3 // indirect github.com/stretchr/testify v1.10.0 github.com/swaggo/echo-swagger v1.4.0 github.com/swaggo/swag v1.16.1 @@ -309,7 +310,6 @@ require ( github.com/rfjakob/eme v1.1.2 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.3 // indirect github.com/shoenig/go-m1cpu v0.1.4 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect diff --git a/version.json b/version.json new file mode 100644 index 00000000..51b0d58d --- /dev/null +++ b/version.json @@ -0,0 +1,3 @@ +{ + "version": "v0.2.33" +} From ea9d6f6b91a7416c6478e94e0cfb71661e662e4e Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:16:34 -0700 Subject: [PATCH 02/39] Remove autobump and update version.json (#122) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 51b0d58d..47accd4b 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.2.33" + "version": "v0.2.47" } From c0418e09781bb80c7cee0459f1bff0654e98c66d Mon Sep 17 00:00:00 2001 From: hannahhoward Date: Fri, 25 Aug 2023 15:55:41 -0700 Subject: [PATCH 03/39] chore(version): update for v0.3.0 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 47accd4b..a654d65a 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.2.47" + "version": "v0.3.0" } From 6a8a07db99d6feecf42114e2476abdfbfda91421 Mon Sep 17 00:00:00 2001 From: "Masih H. Derkani" Date: Tue, 5 Sep 2023 13:21:37 +0100 Subject: [PATCH 04/39] Fix version file not matching latest release There seem to have been some manual releases which leaves version file inconsistent with what the latest release is. --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index a654d65a..9ed87d76 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.3.0" + "version": "v0.3.1" } From 805b6cc429aab89c33200093c1973a6a3012dcdd Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Fri, 8 Sep 2023 08:17:13 -0700 Subject: [PATCH 05/39] Update version.json to v0.4.0 (#279) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 9ed87d76..372b6eab 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.3.1" + "version": "v0.4.0" } From 7dd51299e08f68f127aeaa83129708bfbf08413d Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:02:50 -0700 Subject: [PATCH 06/39] Update version to v0.4.1 (#288) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 372b6eab..26a7d478 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.4.0" + "version": "v0.4.1" } From 8b10f7dbf7781ccf76b023d9cf45210026e60b83 Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:59:55 -0700 Subject: [PATCH 07/39] Bump version to v0.5.0 (#343) This is the version for MVP milestone --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 26a7d478..fc15ae01 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.4.1" + "version": "v0.5.0" } From 40ef30a0995380d928cd5e91c10434180139419b Mon Sep 17 00:00:00 2001 From: Andrew Gillis Date: Wed, 11 Oct 2023 18:55:21 -0700 Subject: [PATCH 08/39] new version (#380) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index fc15ae01..4ab5086b 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.0" + "version": "v0.5.1" } From b8d961e2443137734b80b8bdd9643c236c7bad80 Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:54:52 -0700 Subject: [PATCH 09/39] Update version.json to v0.5.2 (#390) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 4ab5086b..cdebeaba 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.1" + "version": "v0.5.2" } From add3d0a441ea198cfbf65eba568d2d97d333e0ab Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:30:32 -0700 Subject: [PATCH 10/39] Update version.json to v0.5.3 (#397) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index cdebeaba..ef97c9ca 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.2" + "version": "v0.5.3" } From 969cf0af861cdb4da9379ac67f9dd95640fc0c3b Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:18:07 -0700 Subject: [PATCH 11/39] Update version.json (#400) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index ef97c9ca..dd510e67 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.3" + "version": "v0.5.4" } From 551729c92276cc45563948de77159e73d9c2f054 Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:05:43 -0700 Subject: [PATCH 12/39] Update version.json to v0.5.5 (#403) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index dd510e67..ae6f1cf4 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.4" + "version": "v0.5.5" } From ffefcabe837c4bba4991b083d8ecddff490a77a3 Mon Sep 17 00:00:00 2001 From: Andrew Gillis Date: Fri, 27 Oct 2023 14:10:59 -0700 Subject: [PATCH 13/39] Update version (#407) New version includes retrieval optimization. --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index ae6f1cf4..2e827b06 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.5" + "version": "v0.5.6" } From 8d5ea7e76ac2c80ada41aab2be8b41166ffdd4f5 Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:04:29 -0700 Subject: [PATCH 14/39] Update version.json to v0.5.7 (#409) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 2e827b06..0f5f238d 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.6" + "version": "v0.5.7" } From 5e6c594bd3f41961a461eef5946efc33c6fee654 Mon Sep 17 00:00:00 2001 From: Andrew Gillis Date: Fri, 3 Nov 2023 14:47:01 -0700 Subject: [PATCH 15/39] Update version (#414) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 0f5f238d..d6f4b015 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.7" + "version": "v0.5.8" } From 1ee41a4c45b236b422f372b6c9d4c3ad3552dcd7 Mon Sep 17 00:00:00 2001 From: Andrew Gillis Date: Thu, 9 Nov 2023 11:55:32 -0800 Subject: [PATCH 16/39] New release version (#422) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index d6f4b015..d4f0d17f 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.8" + "version": "v0.5.9" } From 613ff66d8c5d982739bd3faff3d02bd5c08cdc1e Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:13:21 -0800 Subject: [PATCH 17/39] Update version.json to 0.5.10 (#424) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index d4f0d17f..c72f1b47 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.9" + "version": "v0.5.10" } From 7a35cb35d84f2b63018c3654e8bca3ecdd29db42 Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Wed, 6 Dec 2023 00:26:30 -0800 Subject: [PATCH 18/39] Update version.json (#426) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index c72f1b47..137c682a 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.10" + "version": "v0.5.11" } From 4bb77191993ab2af5d279279d65e14775eb1e23f Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:35:13 -0400 Subject: [PATCH 19/39] bump version to v0.5.12 (#429) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 137c682a..4f94c19e 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.11" + "version": "v0.5.12" } From 1828b631caa25172481f58d3ab026b16e329845c Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:51:17 -0800 Subject: [PATCH 20/39] Bump version to v0.5.13 (#432) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 4f94c19e..0fa1a3fd 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.12" + "version": "v0.5.13" } From d375d4c20324a5cc4fb4f107de284c395674dc78 Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:03:33 -0700 Subject: [PATCH 21/39] Update version.json (#435) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 0fa1a3fd..42a86479 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.13" + "version": "v0.5.14" } From 151fcc3f19eb0d135c763c83003cdbb79e305938 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Wed, 24 Jul 2024 11:26:09 -0700 Subject: [PATCH 22/39] Update version.json to v0.5.15 (#442) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 42a86479..70620068 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.14" + "version": "v0.5.15" } From 64bc3ff237ab9b3c9940fac9fdc8b15a724b7e69 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 26 Jul 2024 21:13:57 -0700 Subject: [PATCH 23/39] Bump version.json to 0.5.16 (#445) --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 70620068..d717fa4a 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.15" + "version": "v0.5.16" } From 1e85520236f76e4ee53cc3ea14d311ec2fd8cfb9 Mon Sep 17 00:00:00 2001 From: Arkadiy Kukarkin Date: Fri, 14 Feb 2025 23:25:17 +0100 Subject: [PATCH 24/39] v0.5.17 release - update go-libp2p to v0.39.1 - enable HTTP(S)_PROXY and TCP_PROXY --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index d717fa4a..e19d38da 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.16" + "version": "v0.5.17" } From 731aeab9442fbcce030e34c9394aaa803143aff0 Mon Sep 17 00:00:00 2001 From: Arkadiy Kukarkin Date: Fri, 14 Feb 2025 15:07:51 -0800 Subject: [PATCH 25/39] retry workflow --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index e19d38da..16e19ce2 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.17" + "version": "v0.5.17-RC1" } From 9763d507d9c43d79ee823305555766f64a0a743b Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Fri, 4 Apr 2025 15:12:28 -0400 Subject: [PATCH 26/39] Add create wallet handler, cmd, and API #469 --- api/api.go | 1 + api/api_test.go | 10 + .../http/wallet/create_wallet_parameters.go | 128 +++++++++ .../http/wallet/create_wallet_responses.go | 256 ++++++++++++++++++ client/swagger/http/wallet/wallet_client.go | 40 +++ cmd/app.go | 1 + cmd/wallet/create.go | 34 +++ cmd/wallet_test.go | 18 ++ docs/en/SUMMARY.md | 1 + docs/en/cli-reference/wallet/README.md | 1 + docs/en/cli-reference/wallet/create.md | 14 + docs/en/web-api-reference/wallet.md | 4 + docs/swagger/docs.go | 35 +++ docs/swagger/swagger.json | 35 +++ docs/swagger/swagger.yaml | 23 ++ handler/wallet/create.go | 84 ++++++ handler/wallet/create_test.go | 39 +++ handler/wallet/interface.go | 10 + 18 files changed, 734 insertions(+) create mode 100644 client/swagger/http/wallet/create_wallet_parameters.go create mode 100644 client/swagger/http/wallet/create_wallet_responses.go create mode 100644 cmd/wallet/create.go create mode 100644 docs/en/cli-reference/wallet/create.md create mode 100644 handler/wallet/create.go create mode 100644 handler/wallet/create_test.go diff --git a/api/api.go b/api/api.go index 41c63e33..3fee0f00 100644 --- a/api/api.go +++ b/api/api.go @@ -346,6 +346,7 @@ func (s *Server) setupRoutes(e *echo.Echo) { e.POST("/api/preparation/:id/piece", s.toEchoHandler(s.dataprepHandler.AddPieceHandler)) // Wallet + e.POST("/api/wallet/create", s.toEchoHandler(s.walletHandler.CreateHandler)) e.POST("/api/wallet", s.toEchoHandler(s.walletHandler.ImportHandler)) e.GET("/api/wallet", s.toEchoHandler(s.walletHandler.ListHandler)) e.DELETE("/api/wallet/:address", s.toEchoHandler(s.walletHandler.RemoveHandler)) diff --git a/api/api_test.go b/api/api_test.go index ac63411b..575df976 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -184,6 +184,8 @@ func setupMockWallet() wallet.Handler { m := new(wallet.MockWallet) m.On("AttachHandler", mock.Anything, mock.Anything, "id", "wallet"). Return(&model.Preparation{}, nil) + m.On("CreateHandler", mock.Anything, mock.Anything, mock.Anything). + Return(&model.Wallet{}, nil) m.On("DetachHandler", mock.Anything, mock.Anything, "id", "wallet"). Return(&model.Preparation{}, nil) m.On("ImportHandler", mock.Anything, mock.Anything, mock.Anything, mock.Anything). @@ -301,6 +303,14 @@ func TestAllAPIs(t *testing.T) { }) t.Run("wallet", func(t *testing.T) { + t.Run("CreateWallet", func(t *testing.T) { + resp, err := client.Wallet.CreateWallet(&wallet2.CreateWalletParams{ + Context: ctx, + }) + require.NoError(t, err) + require.True(t, resp.IsSuccess()) + require.NotNil(t, resp.Payload) + }) t.Run("ImportWallet", func(t *testing.T) { resp, err := client.Wallet.ImportWallet(&wallet2.ImportWalletParams{ Request: &models.WalletImportRequest{}, diff --git a/client/swagger/http/wallet/create_wallet_parameters.go b/client/swagger/http/wallet/create_wallet_parameters.go new file mode 100644 index 00000000..90f2e787 --- /dev/null +++ b/client/swagger/http/wallet/create_wallet_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package wallet + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCreateWalletParams creates a new CreateWalletParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCreateWalletParams() *CreateWalletParams { + return &CreateWalletParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateWalletParamsWithTimeout creates a new CreateWalletParams object +// with the ability to set a timeout on a request. +func NewCreateWalletParamsWithTimeout(timeout time.Duration) *CreateWalletParams { + return &CreateWalletParams{ + timeout: timeout, + } +} + +// NewCreateWalletParamsWithContext creates a new CreateWalletParams object +// with the ability to set a context for a request. +func NewCreateWalletParamsWithContext(ctx context.Context) *CreateWalletParams { + return &CreateWalletParams{ + Context: ctx, + } +} + +// NewCreateWalletParamsWithHTTPClient creates a new CreateWalletParams object +// with the ability to set a custom HTTPClient for a request. +func NewCreateWalletParamsWithHTTPClient(client *http.Client) *CreateWalletParams { + return &CreateWalletParams{ + HTTPClient: client, + } +} + +/* +CreateWalletParams contains all the parameters to send to the API endpoint + + for the create wallet operation. + + Typically these are written to a http.Request. +*/ +type CreateWalletParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create wallet params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateWalletParams) WithDefaults() *CreateWalletParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create wallet params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateWalletParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create wallet params +func (o *CreateWalletParams) WithTimeout(timeout time.Duration) *CreateWalletParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create wallet params +func (o *CreateWalletParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create wallet params +func (o *CreateWalletParams) WithContext(ctx context.Context) *CreateWalletParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create wallet params +func (o *CreateWalletParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create wallet params +func (o *CreateWalletParams) WithHTTPClient(client *http.Client) *CreateWalletParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create wallet params +func (o *CreateWalletParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateWalletParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/client/swagger/http/wallet/create_wallet_responses.go b/client/swagger/http/wallet/create_wallet_responses.go new file mode 100644 index 00000000..a424a6f1 --- /dev/null +++ b/client/swagger/http/wallet/create_wallet_responses.go @@ -0,0 +1,256 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package wallet + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/data-preservation-programs/singularity/client/swagger/models" +) + +// CreateWalletReader is a Reader for the CreateWallet structure. +type CreateWalletReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateWalletReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCreateWalletOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCreateWalletBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCreateWalletInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /wallet/create] CreateWallet", response, response.Code()) + } +} + +// NewCreateWalletOK creates a CreateWalletOK with default headers values +func NewCreateWalletOK() *CreateWalletOK { + return &CreateWalletOK{} +} + +/* +CreateWalletOK describes a response with status code 200, with default header values. + +OK +*/ +type CreateWalletOK struct { + Payload []*models.ModelWallet +} + +// IsSuccess returns true when this create wallet o k response has a 2xx status code +func (o *CreateWalletOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create wallet o k response has a 3xx status code +func (o *CreateWalletOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create wallet o k response has a 4xx status code +func (o *CreateWalletOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this create wallet o k response has a 5xx status code +func (o *CreateWalletOK) IsServerError() bool { + return false +} + +// IsCode returns true when this create wallet o k response a status code equal to that given +func (o *CreateWalletOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the create wallet o k response +func (o *CreateWalletOK) Code() int { + return 200 +} + +func (o *CreateWalletOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /wallet/create][%d] createWalletOK %s", 200, payload) +} + +func (o *CreateWalletOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /wallet/create][%d] createWalletOK %s", 200, payload) +} + +func (o *CreateWalletOK) GetPayload() []*models.ModelWallet { + return o.Payload +} + +func (o *CreateWalletOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateWalletBadRequest creates a CreateWalletBadRequest with default headers values +func NewCreateWalletBadRequest() *CreateWalletBadRequest { + return &CreateWalletBadRequest{} +} + +/* +CreateWalletBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CreateWalletBadRequest struct { + Payload *models.APIHTTPError +} + +// IsSuccess returns true when this create wallet bad request response has a 2xx status code +func (o *CreateWalletBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create wallet bad request response has a 3xx status code +func (o *CreateWalletBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create wallet bad request response has a 4xx status code +func (o *CreateWalletBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create wallet bad request response has a 5xx status code +func (o *CreateWalletBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create wallet bad request response a status code equal to that given +func (o *CreateWalletBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the create wallet bad request response +func (o *CreateWalletBadRequest) Code() int { + return 400 +} + +func (o *CreateWalletBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /wallet/create][%d] createWalletBadRequest %s", 400, payload) +} + +func (o *CreateWalletBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /wallet/create][%d] createWalletBadRequest %s", 400, payload) +} + +func (o *CreateWalletBadRequest) GetPayload() *models.APIHTTPError { + return o.Payload +} + +func (o *CreateWalletBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIHTTPError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateWalletInternalServerError creates a CreateWalletInternalServerError with default headers values +func NewCreateWalletInternalServerError() *CreateWalletInternalServerError { + return &CreateWalletInternalServerError{} +} + +/* +CreateWalletInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CreateWalletInternalServerError struct { + Payload *models.APIHTTPError +} + +// IsSuccess returns true when this create wallet internal server error response has a 2xx status code +func (o *CreateWalletInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create wallet internal server error response has a 3xx status code +func (o *CreateWalletInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create wallet internal server error response has a 4xx status code +func (o *CreateWalletInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this create wallet internal server error response has a 5xx status code +func (o *CreateWalletInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this create wallet internal server error response a status code equal to that given +func (o *CreateWalletInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the create wallet internal server error response +func (o *CreateWalletInternalServerError) Code() int { + return 500 +} + +func (o *CreateWalletInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /wallet/create][%d] createWalletInternalServerError %s", 500, payload) +} + +func (o *CreateWalletInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /wallet/create][%d] createWalletInternalServerError %s", 500, payload) +} + +func (o *CreateWalletInternalServerError) GetPayload() *models.APIHTTPError { + return o.Payload +} + +func (o *CreateWalletInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIHTTPError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/client/swagger/http/wallet/wallet_client.go b/client/swagger/http/wallet/wallet_client.go index 598b3d31..e3373fe6 100644 --- a/client/swagger/http/wallet/wallet_client.go +++ b/client/swagger/http/wallet/wallet_client.go @@ -56,6 +56,8 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + CreateWallet(params *CreateWalletParams, opts ...ClientOption) (*CreateWalletOK, error) + ImportWallet(params *ImportWalletParams, opts ...ClientOption) (*ImportWalletOK, error) ListWallets(params *ListWalletsParams, opts ...ClientOption) (*ListWalletsOK, error) @@ -65,6 +67,44 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* +CreateWallet creates new wallet +*/ +func (a *Client) CreateWallet(params *CreateWalletParams, opts ...ClientOption) (*CreateWalletOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCreateWalletParams() + } + op := &runtime.ClientOperation{ + ID: "CreateWallet", + Method: "POST", + PathPattern: "/wallet/create", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CreateWalletReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CreateWalletOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for CreateWallet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* ImportWallet imports a private key */ diff --git a/cmd/app.go b/cmd/app.go index 2d21eab7..85fbf516 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -165,6 +165,7 @@ Upgrading: Category: "Operations", Usage: "Wallet management", Subcommands: []*cli.Command{ + wallet.CreateCmd, wallet.ImportCmd, wallet.ListCmd, wallet.RemoveCmd, diff --git a/cmd/wallet/create.go b/cmd/wallet/create.go new file mode 100644 index 00000000..1b3d5ba3 --- /dev/null +++ b/cmd/wallet/create.go @@ -0,0 +1,34 @@ +package wallet + +import ( + "github.com/cockroachdb/errors" + "github.com/data-preservation-programs/singularity/cmd/cliutil" + "github.com/data-preservation-programs/singularity/database" + "github.com/data-preservation-programs/singularity/handler/wallet" + "github.com/data-preservation-programs/singularity/util" + "github.com/urfave/cli/v2" +) + +var CreateCmd = &cli.Command{ + Name: "create", + Usage: "Create a new wallet", + Action: func(c *cli.Context) error { + db, closer, err := database.OpenFromCLI(c) + if err != nil { + return errors.WithStack(err) + } + defer closer.Close() + + lotusClient := util.NewLotusClient(c.String("lotus-api"), c.String("lotus-token")) + w, err := wallet.Default.CreateHandler( + c.Context, + db, + lotusClient) + if err != nil { + return errors.WithStack(err) + } + + cliutil.Print(c, w) + return nil + }, +} diff --git a/cmd/wallet_test.go b/cmd/wallet_test.go index ff2892cd..52607911 100644 --- a/cmd/wallet_test.go +++ b/cmd/wallet_test.go @@ -23,6 +23,24 @@ func swapWalletHandler(mockHandler wallet.Handler) func() { } } +func TestWalletCreate(t *testing.T) { + testutil.OneWithoutReset(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { + runner := NewRunner() + defer runner.Save(t) + mockHandler := new(wallet.MockWallet) + defer swapWalletHandler(mockHandler)() + mockHandler.On("CreateHandler", mock.Anything, mock.Anything, mock.Anything).Return(&model.Wallet{ + ID: "id", + Address: "address", + PrivateKey: "private", + }, nil) + _, _, err := runner.Run(ctx, "singularity wallet create") + require.NoError(t, err) + _, _, err = runner.Run(ctx, "singularity --verbose wallet create") + require.NoError(t, err) + }) +} + func TestWalletImport(t *testing.T) { testutil.OneWithoutReset(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { tmp := t.TempDir() diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index f1b32fcc..3ff26e00 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -62,6 +62,7 @@ * [Deal Pusher](cli-reference/run/deal-pusher.md) * [Download Server](cli-reference/run/download-server.md) * [Wallet](cli-reference/wallet/README.md) + * [Create](cli-reference/wallet/create.md) * [Import](cli-reference/wallet/import.md) * [List](cli-reference/wallet/list.md) * [Remove](cli-reference/wallet/remove.md) diff --git a/docs/en/cli-reference/wallet/README.md b/docs/en/cli-reference/wallet/README.md index 7096416a..1710883b 100644 --- a/docs/en/cli-reference/wallet/README.md +++ b/docs/en/cli-reference/wallet/README.md @@ -9,6 +9,7 @@ USAGE: singularity wallet command [command options] COMMANDS: + create Create a new wallet import Import a wallet from exported private key list List all imported wallets remove Remove a wallet diff --git a/docs/en/cli-reference/wallet/create.md b/docs/en/cli-reference/wallet/create.md new file mode 100644 index 00000000..10852d5e --- /dev/null +++ b/docs/en/cli-reference/wallet/create.md @@ -0,0 +1,14 @@ +# Create a new wallet + +{% code fullWidth="true" %} +``` +NAME: + singularity wallet create - Create a new wallet + +USAGE: + singularity wallet create [command options] + +OPTIONS: + --help, -h show help +``` +{% endcode %} diff --git a/docs/en/web-api-reference/wallet.md b/docs/en/web-api-reference/wallet.md index 0aa3ad4f..28a14954 100644 --- a/docs/en/web-api-reference/wallet.md +++ b/docs/en/web-api-reference/wallet.md @@ -8,6 +8,10 @@ [https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml](https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml) {% endswagger %} +{% swagger src="https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml" path="/wallet/create" method="post" %} +[https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml](https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml) +{% endswagger %} + {% swagger src="https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml" path="/wallet/{address}" method="delete" %} [https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml](https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml) {% endswagger %} diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go index 424f209f..47b534cb 100644 --- a/docs/swagger/docs.go +++ b/docs/swagger/docs.go @@ -5532,6 +5532,41 @@ const docTemplate = `{ } } }, + "/wallet/create": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Wallet" + ], + "summary": "Create new wallet", + "operationId": "CreateWallet", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Wallet" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/api.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/api.HTTPError" + } + } + } + } + }, "/wallet/{address}": { "delete": { "tags": [ diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index 2bf8a3a6..537d0453 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -5526,6 +5526,41 @@ } } }, + "/wallet/create": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Wallet" + ], + "summary": "Create new wallet", + "operationId": "CreateWallet", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Wallet" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/api.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/api.HTTPError" + } + } + } + } + }, "/wallet/{address}": { "delete": { "tags": [ diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index 490d4d59..409ecc33 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -11847,6 +11847,29 @@ paths: summary: Remove a wallet tags: - Wallet + /wallet/create: + post: + operationId: CreateWallet + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/model.Wallet' + type: array + "400": + description: Bad Request + schema: + $ref: '#/definitions/api.HTTPError' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/api.HTTPError' + summary: Create new wallet + tags: + - Wallet produces: - application/json swagger: "2.0" diff --git a/handler/wallet/create.go b/handler/wallet/create.go new file mode 100644 index 00000000..e9f3a1d5 --- /dev/null +++ b/handler/wallet/create.go @@ -0,0 +1,84 @@ +package wallet + +import ( + "context" + + "github.com/cockroachdb/errors" + "github.com/data-preservation-programs/singularity/database" + "github.com/data-preservation-programs/singularity/handler/handlererror" + "github.com/data-preservation-programs/singularity/model" + "github.com/data-preservation-programs/singularity/util" + "github.com/filecoin-project/go-address" + "github.com/ybbus/jsonrpc/v3" + "gorm.io/gorm" +) + +type ExportResponse struct { + PrivateKey string `json:"privateKey"` // This is the exported private key from lotus wallet export +} + +// @ID CreateWallet +// @Summary Create new wallet +// @Tags Wallet +// @Produce json +// @Success 200 {array} model.Wallet +// @Failure 400 {object} api.HTTPError +// @Failure 500 {object} api.HTTPError +// @Router /wallet/create [post] +func _() {} + +// CreateHandler creates a new wallet using the provided Lotus RPC client and creates a new wallet record in the local database. +// +// Parameters: +// - ctx: The context for database transactions and other operations. +// - db: A pointer to the gorm.DB instance representing the database connection. +// - lotusClient: The RPC client used to interact with a Lotus node for actor lookup. +// +// Returns: +// - A pointer to the created Wallet model if successful. +// - An error, if any occurred during the database insert operation. +func (DefaultHandler) CreateHandler( + ctx context.Context, + db *gorm.DB, + lotusClient jsonrpc.RPCClient, +) (*model.Wallet, error) { + db = db.WithContext(ctx) + + var result string + err := lotusClient.CallFor(ctx, &result, "WalletNew") + if err != nil { + logger.Errorw("failed to create new wallet", "err", err) + return nil, errors.WithStack(err) + } + + addr, err := address.NewFromString(result) + if err != nil { + return nil, errors.Wrap(handlererror.ErrInvalidParameter, "invalid actor ID") + } + + var export ExportResponse + err = lotusClient.CallFor(ctx, &export, "WalletExport", addr.String()) + if err != nil { + logger.Errorw("failed to export wallet", "addr", addr, "err", err) + return nil, errors.WithStack(err) + } + + wallet := model.Wallet{ + ID: result, + // HACK: this ensures the address starts with the correct network prefix + // see ./import.go for more details + Address: result[:1] + addr.String()[1:], + PrivateKey: export.PrivateKey, + } + err = database.DoRetry(ctx, func() error { + return db.Create(&wallet).Error + }) + if util.IsDuplicateKeyError(err) { + return nil, errors.Wrap(handlererror.ErrDuplicateRecord, "wallet already exists") + } + if err != nil { + return nil, errors.WithStack(err) + } + + return &wallet, nil +} diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go new file mode 100644 index 00000000..e2180445 --- /dev/null +++ b/handler/wallet/create_test.go @@ -0,0 +1,39 @@ +package wallet + +import ( + "context" + "testing" + "time" + + "github.com/data-preservation-programs/singularity/handler/handlererror" + "github.com/data-preservation-programs/singularity/util" + "github.com/data-preservation-programs/singularity/util/testutil" + "github.com/stretchr/testify/require" + "gorm.io/gorm" +) + +func TestCreateHandler(t *testing.T) { + testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { + lotusClient := util.NewLotusClient("https://api.node.glif.io/rpc/v0", "") + + t.Run("success", func(t *testing.T) { + w, err := Default.CreateHandler(ctx, db, lotusClient) + require.NoError(t, err) + require.NotEmpty(t, w.Address) + require.NotEmpty(t, w.PrivateKey) + + _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ + PrivateKey: w.PrivateKey, + }) + require.ErrorIs(t, err, handlererror.ErrDuplicateRecord) + }) + + t.Run("invalid response", func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + lotusClient := util.NewLotusClient("http://127.0.0.1", "") + _, err := Default.CreateHandler(ctx, db, lotusClient) + require.ErrorIs(t, err, handlererror.ErrInvalidParameter) + }) + }) +} diff --git a/handler/wallet/interface.go b/handler/wallet/interface.go index 163dc1c6..e95a4963 100644 --- a/handler/wallet/interface.go +++ b/handler/wallet/interface.go @@ -17,6 +17,11 @@ type Handler interface { preparation string, wallet string, ) (*model.Preparation, error) + CreateHandler( + ctx context.Context, + db *gorm.DB, + lotusClient jsonrpc.RPCClient, + ) (*model.Wallet, error) DetachHandler( ctx context.Context, db *gorm.DB, @@ -60,6 +65,11 @@ func (m *MockWallet) AttachHandler(ctx context.Context, db *gorm.DB, preparation return args.Get(0).(*model.Preparation), args.Error(1) } +func (m *MockWallet) CreateHandler(ctx context.Context, db *gorm.DB, lotusClient jsonrpc.RPCClient) (*model.Wallet, error) { + args := m.Called(ctx, db, lotusClient) + return args.Get(0).(*model.Wallet), args.Error(1) +} + func (m *MockWallet) DetachHandler(ctx context.Context, db *gorm.DB, preparation string, wallet string) (*model.Preparation, error) { args := m.Called(ctx, db, preparation, wallet) return args.Get(0).(*model.Preparation), args.Error(1) From c6af3e0cf57f966c1278565ae479b29e9834ce95 Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Fri, 4 Apr 2025 15:25:30 -0400 Subject: [PATCH 27/39] Run linter --- api/api.go | 2 +- go.mod | 16 +++++++++++----- go.sum | 24 ++++++++++++++++++++++++ model/basetypes.go | 3 +-- replication/makedeal.go | 3 +-- store/piece_store.go | 2 +- testdb/main.go | 2 +- 7 files changed, 40 insertions(+), 12 deletions(-) diff --git a/api/api.go b/api/api.go index 3fee0f00..d4a6f974 100644 --- a/api/api.go +++ b/api/api.go @@ -201,7 +201,7 @@ func (s *Server) toEchoHandler(handlerFunc any) echo.HandlerFunc { var j int // Get path parameters - for i := 0; i < handlerFuncType.NumIn(); i++ { + for i := range handlerFuncType.NumIn() { paramType := handlerFuncType.In(i) if paramType.String() == "context.Context" { inputParams = append(inputParams, reflect.ValueOf(c.Request().Context())) diff --git a/go.mod b/go.mod index ea0c1711..265fd900 100644 --- a/go.mod +++ b/go.mod @@ -92,6 +92,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd // indirect @@ -102,6 +103,7 @@ require ( github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bep/debounce v1.2.1 // indirect + github.com/bitfield/gotestdox v0.2.2 // indirect github.com/calebcase/tmpfile v1.0.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -117,6 +119,7 @@ require ( github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/dchest/blake2b v1.0.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/dnephin/pflag v1.0.7 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.5+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -140,7 +143,7 @@ require ( github.com/filecoin-project/specs-actors v0.9.13 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/gammazero/deque v0.2.1 // indirect github.com/geoffgarside/ber v1.1.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -168,6 +171,7 @@ require ( github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20250202011525-fc3143867406 // indirect github.com/google/s2a-go v0.1.7 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect @@ -348,16 +352,16 @@ require ( go.uber.org/dig v1.18.0 // indirect go.uber.org/fx v1.23.0 // indirect go.uber.org/mock v0.5.0 // indirect - golang.org/x/crypto v0.32.0 // indirect + golang.org/x/crypto v0.33.0 // indirect golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.34.0 // indirect + golang.org/x/net v0.35.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sync v0.11.0 // indirect golang.org/x/sys v0.30.0 // indirect - golang.org/x/term v0.28.0 // indirect + golang.org/x/term v0.29.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.29.0 // indirect + golang.org/x/tools v0.30.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.149.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect @@ -365,7 +369,9 @@ require ( google.golang.org/protobuf v1.36.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/gotestsum v1.12.1 // indirect gotest.tools/v3 v3.5.1 // indirect + honnef.co/go/tools v0.6.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect modernc.org/libc v1.22.3 // indirect modernc.org/mathutil v1.5.0 // indirect diff --git a/go.sum b/go.sum index 74329b33..949870ce 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,8 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= @@ -97,6 +99,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= +github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE= +github.com/bitfield/gotestdox v0.2.2/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/brianvoe/gofakeit/v6 v6.23.2 h1:lVde18uhad5wII/f5RMVFLtdQNE0HaGFuBUXmYKk8i8= github.com/brianvoe/gofakeit/v6 v6.23.2/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= @@ -160,6 +164,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnN github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= +github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= @@ -272,6 +278,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= @@ -459,6 +467,8 @@ github.com/google/pprof v0.0.0-20250202011525-fc3143867406/go.mod h1:vavhavw2zAx github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1326,6 +1336,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1338,6 +1350,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= +golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ= +golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1413,6 +1427,8 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1532,6 +1548,8 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1613,6 +1631,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1750,6 +1770,8 @@ gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7 gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/gotestsum v1.12.1 h1:dvcxFBTFR1QsQmrCQa4k/vDXow9altdYz4CjdW+XeBE= +gotest.tools/gotestsum v1.12.1/go.mod h1:mwDmLbx9DIvr09dnAoGgQPLaSXszNpXpWo2bsQge5BE= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= @@ -1761,6 +1783,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= +honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= diff --git a/model/basetypes.go b/model/basetypes.go index 2341d85f..85527f00 100644 --- a/model/basetypes.go +++ b/model/basetypes.go @@ -8,10 +8,9 @@ import ( "strings" "time" - "slices" - "github.com/cockroachdb/errors" "github.com/ipfs/go-cid" + "slices" ) var ( diff --git a/replication/makedeal.go b/replication/makedeal.go index b074b2d7..f5ead40d 100644 --- a/replication/makedeal.go +++ b/replication/makedeal.go @@ -5,11 +5,10 @@ import ( "encoding/base64" "encoding/json" "fmt" + "slices" "strings" "time" - "slices" - "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/analytics" "github.com/data-preservation-programs/singularity/model" diff --git a/store/piece_store.go b/store/piece_store.go index 5ad724ed..6211b12e 100644 --- a/store/piece_store.go +++ b/store/piece_store.go @@ -178,7 +178,7 @@ func NewPieceReader( return nil, errors.Wrapf(ErrInvalidEndOffset, "expected %d, got %d", car.FileSize, lastBlock.CarOffset+int64(lastBlock.CarBlockLength)) } - for i := range carBlocks { + for i := range len(carBlocks) { if i != len(carBlocks)-1 { if carBlocks[i].CarOffset+int64(carBlocks[i].CarBlockLength) != carBlocks[i+1].CarOffset { return nil, errors.Wrapf(ErrIncontiguousBlocks, "previous offset %d, next offset %d", carBlocks[i].CarOffset+int64(carBlocks[i].CarBlockLength), carBlocks[i+1].CarOffset) diff --git a/testdb/main.go b/testdb/main.go index 26e92636..834d80b1 100644 --- a/testdb/main.go +++ b/testdb/main.go @@ -138,7 +138,7 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { } var files []model.File - for i := 0; i < r.Intn(10_000); i++ { + for i := range r.Intn(10_000) { size := r.Int63n(1 << 20) rCID := randomCID() files = append(files, model.File{ From ed03f563c9a2ee896596ece6748d281334ce9fca Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Wed, 23 Apr 2025 16:07:50 -0400 Subject: [PATCH 28/39] Refactor create wallet handler for offline key generation --- cmd/wallet/create.go | 14 ++++- go.mod | 35 ++++++----- go.sum | 107 ++++++++++++++++------------------ handler/wallet/create.go | 96 +++++++++++++++++++++--------- handler/wallet/create_test.go | 28 +++++---- handler/wallet/interface.go | 6 +- 6 files changed, 172 insertions(+), 114 deletions(-) diff --git a/cmd/wallet/create.go b/cmd/wallet/create.go index 1b3d5ba3..1ef6b5f6 100644 --- a/cmd/wallet/create.go +++ b/cmd/wallet/create.go @@ -5,13 +5,14 @@ import ( "github.com/data-preservation-programs/singularity/cmd/cliutil" "github.com/data-preservation-programs/singularity/database" "github.com/data-preservation-programs/singularity/handler/wallet" - "github.com/data-preservation-programs/singularity/util" "github.com/urfave/cli/v2" ) var CreateCmd = &cli.Command{ Name: "create", Usage: "Create a new wallet", + ArgsUsage: "[type]", + Before: cliutil.CheckNArgs, Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { @@ -19,11 +20,18 @@ var CreateCmd = &cli.Command{ } defer closer.Close() - lotusClient := util.NewLotusClient(c.String("lotus-api"), c.String("lotus-token")) + // Default to secp256k1 if no type is provided + keyType := c.Args().Get(0) + if keyType == ""{ + keyType = wallet.KTSecp256k1.String() + } + w, err := wallet.Default.CreateHandler( c.Context, db, - lotusClient) + wallet.CreateRequest{ + KeyType: keyType, + }) if err != nil { return errors.WithStack(err) } diff --git a/go.mod b/go.mod index 265fd900..625f205f 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,13 @@ require ( github.com/data-preservation-programs/table v0.0.3 github.com/dustin/go-humanize v1.0.1 github.com/fatih/color v1.17.0 - github.com/filecoin-project/go-address v1.1.0 + github.com/filecoin-project/go-address v1.2.0 github.com/filecoin-project/go-cbor-util v0.0.1 - github.com/filecoin-project/go-fil-commcid v0.1.0 + github.com/filecoin-project/go-crypto v0.1.0 + github.com/filecoin-project/go-fil-commcid v0.2.0 github.com/filecoin-project/go-fil-commp-hashhash v0.2.1-0.20230811065821-2e9c683db589 github.com/filecoin-project/go-fil-markets v1.28.3 - github.com/filecoin-project/go-state-types v0.12.0 + github.com/filecoin-project/go-state-types v0.16.0 github.com/filecoin-project/lassie v0.23.2 github.com/filecoin-shipyard/boostly v0.0.0-20230813165216-a449c35ece79 github.com/fxamacker/cbor/v2 v2.4.0 @@ -35,7 +36,7 @@ require ( github.com/ipfs/go-cid v0.5.0 github.com/ipfs/go-datastore v0.6.0 github.com/ipfs/go-ipfs-routing v0.3.0 - github.com/ipfs/go-ipld-cbor v0.1.0 + github.com/ipfs/go-ipld-cbor v0.2.0 github.com/ipfs/go-ipld-format v0.6.0 github.com/ipfs/go-ipld-legacy v0.2.1 github.com/ipfs/go-log v1.0.5 @@ -63,6 +64,7 @@ require ( github.com/multiformats/go-varint v0.0.7 github.com/orlangure/gnomock v0.30.0 github.com/parnurzeal/gorequest v0.2.16 + github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844 github.com/rclone/rclone v1.62.2 github.com/rjNemo/underscore v0.5.0 github.com/robfig/cron/v3 v3.0.1 @@ -76,7 +78,9 @@ require ( go.mongodb.org/mongo-driver v1.12.1 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/text v0.22.0 + golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c + golang.org/x/text v0.23.0 + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da gorm.io/driver/mysql v1.5.0 gorm.io/driver/postgres v1.5.0 gorm.io/driver/sqlite v1.5.2 @@ -92,7 +96,6 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect - github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd // indirect @@ -130,12 +133,12 @@ require ( github.com/elastic/gosigar v0.14.3 // indirect github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 // indirect + github.com/filecoin-project/go-amt-ipld/v4 v4.4.0 // indirect github.com/filecoin-project/go-bitfield v0.2.4 // indirect github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 // indirect github.com/filecoin-project/go-ds-versioning v0.1.2 // indirect github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect - github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 // indirect + github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0 // indirect github.com/filecoin-project/go-padreader v0.0.1 // indirect github.com/filecoin-project/go-retrieval-types v1.2.0 // indirect github.com/filecoin-project/go-statemachine v1.0.3 // indirect @@ -249,7 +252,6 @@ require ( github.com/miekg/dns v1.1.63 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect - github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/montanaflynn/stats v0.7.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -330,7 +332,7 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 // indirect github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect - github.com/whyrusleeping/cbor-gen v0.1.2 // indirect + github.com/whyrusleeping/cbor-gen v0.3.1 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect github.com/wlynxg/anet v0.0.5 // indirect github.com/x448/float16 v0.8.4 // indirect @@ -344,6 +346,8 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect github.com/zeebo/blake3 v0.2.3 // indirect github.com/zeebo/errs v1.3.0 // indirect + gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect + gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -352,17 +356,17 @@ require ( go.uber.org/dig v1.18.0 // indirect go.uber.org/fx v1.23.0 // indirect go.uber.org/mock v0.5.0 // indirect - golang.org/x/crypto v0.33.0 // indirect + golang.org/x/crypto v0.36.0 // indirect golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect + golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect golang.org/x/mod v0.23.0 // indirect golang.org/x/net v0.35.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/term v0.29.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/term v0.30.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.30.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.149.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/grpc v1.64.0 // indirect @@ -371,7 +375,6 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/gotestsum v1.12.1 // indirect gotest.tools/v3 v3.5.1 // indirect - honnef.co/go/tools v0.6.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect modernc.org/libc v1.22.3 // indirect modernc.org/mathutil v1.5.0 // indirect diff --git a/go.sum b/go.sum index 949870ce..677ac769 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,6 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= @@ -109,6 +107,7 @@ github.com/buengese/sgzip v0.1.1/go.mod h1:i5ZiXGF3fhV7gL1xaRRL1nDnmpNj0X061FQzO github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/calebcase/tmpfile v1.0.3 h1:BZrOWZ79gJqQ3XbAQlihYZf/YCV0H4KPIdM5K5oMpJo= github.com/calebcase/tmpfile v1.0.3/go.mod h1:UAUc01aHeC+pudPagY/lWvt2qS9ZO5Zzof6/tIUzqeI= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -162,6 +161,7 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPc github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210507181900-4e0be8d2fbb4/go.mod h1:UkVqoxmJlLgUvBjJD+GdJz6mgdSdf3UjX83xfwUAYDk= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dlespiau/covertool v0.0.0-20180314162135-b0c4c6d0583a/go.mod h1:/eQMcW3eA1bzKx23ZYI2H3tXPdJB5JWYTHzoUPBvQY4= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= @@ -207,12 +207,14 @@ github.com/filecoin-project/filecoin-ffi v0.30.4-0.20220519234331-bfd1f5f9fe38 h github.com/filecoin-project/filecoin-ffi v0.30.4-0.20220519234331-bfd1f5f9fe38/go.mod h1:GM5pXRYvQM7wyH6V2WtPnJ2k1jt+qotRkWLxBSRCOuE= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-address v1.1.0 h1:ofdtUtEsNxkIxkDw67ecSmvtzaVSdcea4boAmLbnHfE= github.com/filecoin-project/go-address v1.1.0/go.mod h1:5t3z6qPmIADZBtuE9EIzi0EwzcRy2nVhpo0I/c1r0OA= +github.com/filecoin-project/go-address v1.2.0 h1:NHmWUE/J7Pi2JZX3gZt32XuY69o9StVZeJxdBodIwOE= +github.com/filecoin-project/go-address v1.2.0/go.mod h1:kQEQ4qZ99a51X7DjT9HiMT4yR6UwLJ9kznlxsOIeDAg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= -github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 h1:XM81BJ4/6h3FV0WfFjh74cIDIgqMbJsMBLM0fIuLUUk= github.com/filecoin-project/go-amt-ipld/v4 v4.0.0/go.mod h1:gF053YQ4BIpzTNDoEwHZas7U3oAwncDVGvOHyY8oDpE= +github.com/filecoin-project/go-amt-ipld/v4 v4.4.0 h1:6kvvMeSpIy4GTU5t3vPHZgWYIMRzGRKLJ73s/cltsoc= +github.com/filecoin-project/go-amt-ipld/v4 v4.4.0/go.mod h1:msgmUxTyRBZ6iXt+5dnUDnIb7SEFqdPsbB1wyo/G3ts= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.4 h1:uZ7MeE+XfM5lqrHJZ93OnhQKc/rveW8p9au0C68JPgk= github.com/filecoin-project/go-bitfield v0.2.4/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= @@ -223,24 +225,26 @@ github.com/filecoin-project/go-commp-utils v0.1.3 h1:rTxbkNXZU7FLgdkBk8RsQIEOuPO github.com/filecoin-project/go-commp-utils v0.1.3/go.mod h1:3ENlD1pZySaUout0p9ANQrY3fDFoXdqyX04J+dWpK30= github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837/go.mod h1:e2YBjSblNVoBckkbv3PPqsq71q98oFkFqL7s1etViGo= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-crypto v0.0.1 h1:AcvpSGGCgjaY8y1az6AMfKQWreF/pWO2JJGLl6gCq6o= -github.com/filecoin-project/go-crypto v0.0.1/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= +github.com/filecoin-project/go-crypto v0.1.0 h1:Pob2MphoipMbe/ksxZOMcQvmBHAd3sI/WEqcbpIsGI0= +github.com/filecoin-project/go-crypto v0.1.0/go.mod h1:K9UFXvvoyAVvB+0Le7oGlKiT9mgA5FHOJdYQXEE8IhI= github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 h1:v+zJS5B6pA3ptWZS4t8tbt1Hz9qENnN4nVr1w99aSWc= github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7/go.mod h1:V3Y4KbttaCwyg1gwkP7iai8CbQx4mZUGjd3h9GZWLKE= github.com/filecoin-project/go-ds-versioning v0.1.2 h1:to4pTadv3IeV1wvgbCbN6Vqd+fu+7tveXgv/rCEZy6w= github.com/filecoin-project/go-ds-versioning v0.1.2/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= +github.com/filecoin-project/go-fil-commcid v0.2.0 h1:B+5UX8XGgdg/XsdUpST4pEBviKkFOw+Fvl2bLhSKGpI= +github.com/filecoin-project/go-fil-commcid v0.2.0/go.mod h1:8yigf3JDIil+/WpqR5zoKyP0jBPCOGtEqq/K1CcMy9Q= github.com/filecoin-project/go-fil-commp-hashhash v0.2.1-0.20230811065821-2e9c683db589 h1:PP5FU5JVVDb7zODWZlgzbdmQDtwu3Mm0bK9Bg/Om5yc= github.com/filecoin-project/go-fil-commp-hashhash v0.2.1-0.20230811065821-2e9c683db589/go.mod h1:VH3fAFOru4yyWar4626IoS5+VGE8SfZiBODJLUigEo4= github.com/filecoin-project/go-fil-markets v1.28.3 h1:2cFu7tLZYrfNz4LnxjgERaVD7k5+Wwp0H76mnnTGPBk= github.com/filecoin-project/go-fil-markets v1.28.3/go.mod h1:eryxo/oVgIxaR5g5CNr9PlvZOi+u/bak0IsPL/PT1hk= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= -github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 h1:rVVNq0x6RGQIzCo1iiJlGFm9AGIZzeifggxtKMU7zmI= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g= +github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0 h1:nYs6OPUF8KbZ3E8o9p9HJnQaE8iugjHR5WYVMcicDJc= +github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0/go.mod h1:s0qiHRhFyrgW0SvdQMSJFQxNa4xEIG5XvqCBZUEgcbc= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= github.com/filecoin-project/go-padreader v0.0.1 h1:8h2tVy5HpoNbr2gBRr+WD6zV6VD6XHig+ynSGJg8ZOs= github.com/filecoin-project/go-padreader v0.0.1/go.mod h1:VYVPJqwpsfmtoHnAmPx6MUwmrK6HIcDqZJiuZhtmfLQ= @@ -252,8 +256,8 @@ github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.10.0/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= -github.com/filecoin-project/go-state-types v0.12.0 h1:l+54FdFf3Exkzx7cpYCKoWUPReX7SUQlmT/h+9obVEM= -github.com/filecoin-project/go-state-types v0.12.0/go.mod h1:hm9GXjYuqB1xJs58Ei/ZKy8Nfb0532HP6bR9DI8a+kM= +github.com/filecoin-project/go-state-types v0.16.0 h1:ajIREDzTGfq71ofIQ29iZR1WXxmkvd2nQNc6ApcP1wI= +github.com/filecoin-project/go-state-types v0.16.0/go.mod h1:YCESyrqnyu17y0MazbV6Uwma5+BrMvEKEQp5QWeIf9g= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -272,12 +276,9 @@ github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= @@ -443,7 +444,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -456,6 +456,7 @@ github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190309163659-77426154d546/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -547,7 +548,6 @@ github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnO github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.2.0/go.mod h1:P+HXFDF4CVhaVayiEb4wkAy7zBHxBwsJyt0Y5U6MLro= -github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= github.com/ipfs/go-cid v0.5.0 h1:goEKKhaGm0ul11IHA7I6p1GmKz8kEYniqFopaB5Otwg= github.com/ipfs/go-cid v0.5.0/go.mod h1:0L7vmeNXpQpUS9vt+yEARkJ8rOg43DF3iPgn4GIN0mk= github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= @@ -594,8 +594,8 @@ github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9 github.com/ipfs/go-ipld-cbor v0.0.5/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.6-0.20211211231443-5d9b9e1f6fa8/go.mod h1:ssdxxaLJPXH7OjF5V4NSjBbcfh+evoR4ukuru0oPXMA= github.com/ipfs/go-ipld-cbor v0.0.6/go.mod h1:ssdxxaLJPXH7OjF5V4NSjBbcfh+evoR4ukuru0oPXMA= -github.com/ipfs/go-ipld-cbor v0.1.0 h1:dx0nS0kILVivGhfWuB6dUpMa/LAwElHPw1yOGYopoYs= -github.com/ipfs/go-ipld-cbor v0.1.0/go.mod h1:U2aYlmVrJr2wsUBU67K4KgepApSZddGRDWBYR0H4sCk= +github.com/ipfs/go-ipld-cbor v0.2.0 h1:VHIW3HVIjcMd8m4ZLZbrYpwjzqlVUfjLM7oK4T5/YF0= +github.com/ipfs/go-ipld-cbor v0.2.0/go.mod h1:Cp8T7w1NKcu4AQJLqK0tWpd1nkgTxEVB5C6kVpLW6/0= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= @@ -638,7 +638,6 @@ github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6 github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 h1:QAI/Ridj0+foHD6epbxmB4ugxz9B4vmNdYSmQLGa05E= github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0/go.mod h1:odxGcpiQZLzP5+yGu84Ljo8y3EzCvNAQKEodHNsHLXA= -github.com/ipld/go-ipld-prime v0.19.0/go.mod h1:Q9j3BaVXwaA3o5JUDNvptDDr/x8+F7FG6XJ8WI3ILg4= github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd h1:gMlw/MhNr2Wtp5RwGdsW23cs+yCuj9k2ON7i9MiJlRo= @@ -651,7 +650,6 @@ github.com/ipni/go-libipni v0.6.6 h1:Ms2a0AkPgv1pCblSgqM8tKUz9NHmzn8JP0PO8fYUYZM github.com/ipni/go-libipni v0.6.6/go.mod h1:jh/TDrsKlKuwzHfaYIGTuHudFkX4ioe9zx0835x1fiQ= github.com/ipni/index-provider v0.12.0 h1:R3F6dxxKNv4XkE4GJZNLOG0bDEbBQ/S5iztXwSD8jhQ= github.com/ipni/index-provider v0.12.0/go.mod h1:GhyrADJp7n06fqoc1djzkvL4buZYHzV8SoWrlxEo5F4= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= @@ -730,9 +728,7 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -838,6 +834,7 @@ github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mmcloughlin/avo v0.0.0-20190318053554-7a0eb66183da/go.mod h1:lf5GMZxA5kz8dnCweJuER5Rmbx6dDu6qvw0fO3uYKK8= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -869,7 +866,6 @@ github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/g github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= -github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= @@ -879,7 +875,6 @@ github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpK github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= -github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= github.com/multiformats/go-multistream v0.6.0 h1:ZaHKbsL404720283o4c/IHQXiS6gb8qAN5EIJ4PN5EA= @@ -934,6 +929,8 @@ github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 h1:XeOYlK9W1uC github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14/go.mod h1:jVblp62SafmidSkvWrXyxAme3gaTfEtWwRPGz5cpvHg= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= +github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844 h1:Yflyn+XFLEu7RPzxovgEVLP6Es8JLJrHqdXunpm2ak4= +github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pion/datachannel v1.5.10 h1:ly0Q26K1i6ZkGf42W7D4hQYR90pZwzFOjTq5AuCKk4o= @@ -1002,7 +999,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= @@ -1101,7 +1097,6 @@ github.com/smartystreets/assertions v1.13.0 h1:Dx1kYM01xsSqKPno3aqLnrwac2LetPvN2 github.com/smartystreets/assertions v1.13.0/go.mod h1:wDmR7qL282YbGsPy6H/yAsesrxfxaaSlJazyFLYVFx8= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= @@ -1154,6 +1149,7 @@ github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYm github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= @@ -1168,12 +1164,10 @@ github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49u github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 h1:zMsHhfK9+Wdl1F7sIKLyx3wrOFofpb3rWFbA4HgcK5k= github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3/go.mod h1:R0Gbuw7ElaGSLOZUSwBm/GgVwMd30jWxBDdAyMOeTuc= -github.com/warpfork/go-testmark v0.10.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 h1:5HZfQkwe0mIfyDmc1Em5GqlNRzcdtlv4HTNmdpt7XH0= @@ -1191,8 +1185,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.1.2 h1:WQFlrPhpcQl+M2/3dP5cvlTLWPVsL6LGBb9jJt6l/cA= -github.com/whyrusleeping/cbor-gen v0.1.2/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= +github.com/whyrusleeping/cbor-gen v0.3.1 h1:82ioxmhEYut7LBVGhGq8xoRkXPLElVuh5mV67AFfdv0= +github.com/whyrusleeping/cbor-gen v0.3.1/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= @@ -1244,6 +1238,10 @@ github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= github.com/zeebo/errs v1.3.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1305,6 +1303,8 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= +golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= +golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1312,6 +1312,7 @@ golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1327,17 +1328,15 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= -golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1350,8 +1349,6 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= -golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ= -golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1388,6 +1385,7 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190326090315-15845e8f865b/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1425,8 +1423,6 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1454,8 +1450,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1467,6 +1463,7 @@ golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1522,7 +1519,6 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1533,10 +1529,11 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1544,12 +1541,11 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1562,10 +1558,11 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1577,11 +1574,13 @@ golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190106171756-3ef68632349c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190325223049-1d95b17f1b04/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1629,16 +1628,14 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -1783,9 +1780,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= -honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= -lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= @@ -1804,6 +1798,7 @@ modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= diff --git a/handler/wallet/create.go b/handler/wallet/create.go index e9f3a1d5..d3d192a9 100644 --- a/handler/wallet/create.go +++ b/handler/wallet/create.go @@ -2,6 +2,8 @@ package wallet import ( "context" + "crypto/rand" + "encoding/hex" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/database" @@ -9,14 +11,72 @@ import ( "github.com/data-preservation-programs/singularity/model" "github.com/data-preservation-programs/singularity/util" "github.com/filecoin-project/go-address" - "github.com/ybbus/jsonrpc/v3" + "github.com/filecoin-project/go-crypto" + g1 "github.com/phoreproject/bls/g1pubs" + "golang.org/x/xerrors" "gorm.io/gorm" ) -type ExportResponse struct { - PrivateKey string `json:"privateKey"` // This is the exported private key from lotus wallet export +type KeyType string + +const ( + KTSecp256k1 KeyType = "secp256k1" + KTBLS KeyType = "bls" + // TODO: add support for "delegated" or "secp256k1-ledger" types? +) + +func (kt KeyType) String() string { + return string(kt) +} + +// GenerateKey generates a new keypair and returns the private key and address. +// The keypair is generated using the specified key type (secp256k1 or BLS). +func GenerateKey(keyType string) (string, string, error) { + var privKey string + var addr address.Address + var err error + + switch keyType { + case KTSecp256k1.String(): + kb := make([]byte, 32) + _, err = rand.Read(kb) + if err != nil { + return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) + } + privKey = hex.EncodeToString(kb) + + // Get the public key from private key + pubKey := crypto.PublicKey(kb) + addr, err = address.NewSecp256k1Address(pubKey) + if err != nil { + return "", "", xerrors.Errorf("failed to generate address from %s key: %w", keyType, err) + } + case KTBLS.String(): + priv, err := g1.RandKey(rand.Reader) + if err != nil { + return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) + } + privKey = priv.String() + + // Get the public key from private key + pub := g1.PrivToPub(priv) + pubKey := pub.Serialize() + addr, err = address.NewBLSAddress(pubKey[:]) + if err != nil { + return "", "", xerrors.Errorf("failed to generate address from %s key: %w", keyType, err) + } + default: + return "", "", xerrors.Errorf("unsupported key type: %s", keyType) + } + + return privKey, addr.String(), nil } +type CreateRequest struct { + KeyType string `json:"keyType"` // This is either "secp256k1" or "bls" +} + + // @ID CreateWallet // @Summary Create new wallet // @Tags Wallet @@ -27,12 +87,11 @@ type ExportResponse struct { // @Router /wallet/create [post] func _() {} -// CreateHandler creates a new wallet using the provided Lotus RPC client and creates a new wallet record in the local database. +// CreateHandler creates a new wallet using offline keypair generation and a new record in the local database. // // Parameters: // - ctx: The context for database transactions and other operations. // - db: A pointer to the gorm.DB instance representing the database connection. -// - lotusClient: The RPC client used to interact with a Lotus node for actor lookup. // // Returns: // - A pointer to the created Wallet model if successful. @@ -40,35 +99,20 @@ func _() {} func (DefaultHandler) CreateHandler( ctx context.Context, db *gorm.DB, - lotusClient jsonrpc.RPCClient, + request CreateRequest, ) (*model.Wallet, error) { db = db.WithContext(ctx) - var result string - err := lotusClient.CallFor(ctx, &result, "WalletNew") - if err != nil { - logger.Errorw("failed to create new wallet", "err", err) - return nil, errors.WithStack(err) - } - - addr, err := address.NewFromString(result) - if err != nil { - return nil, errors.Wrap(handlererror.ErrInvalidParameter, "invalid actor ID") - } - - var export ExportResponse - err = lotusClient.CallFor(ctx, &export, "WalletExport", addr.String()) + // Generate a new keypair + privateKey, address, err := GenerateKey(request.KeyType) if err != nil { - logger.Errorw("failed to export wallet", "addr", addr, "err", err) return nil, errors.WithStack(err) } wallet := model.Wallet{ - ID: result, - // HACK: this ensures the address starts with the correct network prefix - // see ./import.go for more details - Address: result[:1] + addr.String()[1:], - PrivateKey: export.PrivateKey, + ID: address, + Address: address, + PrivateKey: privateKey, } err = database.DoRetry(ctx, func() error { return db.Create(&wallet).Error diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go index e2180445..605a9f46 100644 --- a/handler/wallet/create_test.go +++ b/handler/wallet/create_test.go @@ -3,7 +3,6 @@ package wallet import ( "context" "testing" - "time" "github.com/data-preservation-programs/singularity/handler/handlererror" "github.com/data-preservation-programs/singularity/util" @@ -16,8 +15,8 @@ func TestCreateHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { lotusClient := util.NewLotusClient("https://api.node.glif.io/rpc/v0", "") - t.Run("success", func(t *testing.T) { - w, err := Default.CreateHandler(ctx, db, lotusClient) + t.Run("success-secp256k1", func(t *testing.T) { + w, err := Default.CreateHandler(ctx, db, CreateRequest{ KeyType: KTSecp256k1.String() }) require.NoError(t, err) require.NotEmpty(t, w.Address) require.NotEmpty(t, w.PrivateKey) @@ -28,12 +27,21 @@ func TestCreateHandler(t *testing.T) { require.ErrorIs(t, err, handlererror.ErrDuplicateRecord) }) - t.Run("invalid response", func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - lotusClient := util.NewLotusClient("http://127.0.0.1", "") - _, err := Default.CreateHandler(ctx, db, lotusClient) - require.ErrorIs(t, err, handlererror.ErrInvalidParameter) + t.Run("success-bls", func(t *testing.T) { + w, err := Default.CreateHandler(ctx, db, CreateRequest{ KeyType: KTBLS.String() }) + require.NoError(t, err) + require.NotEmpty(t, w.Address) + require.NotEmpty(t, w.PrivateKey) + + _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ + PrivateKey: w.PrivateKey, + }) + require.ErrorIs(t, err, handlererror.ErrDuplicateRecord) + }) + + t.Run("invalid-key-type", func(t *testing.T) { + _, err := Default.CreateHandler(ctx, db, CreateRequest{ KeyType: "invalid-type" }) + require.Error(t, err) }) }) -} +} \ No newline at end of file diff --git a/handler/wallet/interface.go b/handler/wallet/interface.go index e95a4963..0a88d848 100644 --- a/handler/wallet/interface.go +++ b/handler/wallet/interface.go @@ -20,7 +20,7 @@ type Handler interface { CreateHandler( ctx context.Context, db *gorm.DB, - lotusClient jsonrpc.RPCClient, + request CreateRequest, ) (*model.Wallet, error) DetachHandler( ctx context.Context, @@ -65,8 +65,8 @@ func (m *MockWallet) AttachHandler(ctx context.Context, db *gorm.DB, preparation return args.Get(0).(*model.Preparation), args.Error(1) } -func (m *MockWallet) CreateHandler(ctx context.Context, db *gorm.DB, lotusClient jsonrpc.RPCClient) (*model.Wallet, error) { - args := m.Called(ctx, db, lotusClient) +func (m *MockWallet) CreateHandler(ctx context.Context, db *gorm.DB, request CreateRequest) (*model.Wallet, error) { + args := m.Called(ctx, db, request) return args.Get(0).(*model.Wallet), args.Error(1) } From c77c8ffb344a084d09b47dd87e67155deb4991b7 Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Wed, 23 Apr 2025 16:21:07 -0400 Subject: [PATCH 29/39] Run fmt --- cmd/wallet/create.go | 6 +++--- go.mod | 2 ++ go.sum | 6 ++++++ handler/wallet/create.go | 7 +++---- handler/wallet/create_test.go | 8 ++++---- store/piece_store.go | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/cmd/wallet/create.go b/cmd/wallet/create.go index 1ef6b5f6..23dbd8a3 100644 --- a/cmd/wallet/create.go +++ b/cmd/wallet/create.go @@ -9,8 +9,8 @@ import ( ) var CreateCmd = &cli.Command{ - Name: "create", - Usage: "Create a new wallet", + Name: "create", + Usage: "Create a new wallet", ArgsUsage: "[type]", Before: cliutil.CheckNArgs, Action: func(c *cli.Context) error { @@ -22,7 +22,7 @@ var CreateCmd = &cli.Command{ // Default to secp256k1 if no type is provided keyType := c.Args().Get(0) - if keyType == ""{ + if keyType == "" { keyType = wallet.KTSecp256k1.String() } diff --git a/go.mod b/go.mod index 625f205f..e1c8527c 100644 --- a/go.mod +++ b/go.mod @@ -96,6 +96,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd // indirect @@ -375,6 +376,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/gotestsum v1.12.1 // indirect gotest.tools/v3 v3.5.1 // indirect + honnef.co/go/tools v0.6.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect modernc.org/libc v1.22.3 // indirect modernc.org/mathutil v1.5.0 // indirect diff --git a/go.sum b/go.sum index 677ac769..22cd3570 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,8 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= @@ -1349,6 +1351,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= +golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ= +golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1780,6 +1784,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= +honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= diff --git a/handler/wallet/create.go b/handler/wallet/create.go index d3d192a9..d65f1660 100644 --- a/handler/wallet/create.go +++ b/handler/wallet/create.go @@ -21,7 +21,7 @@ type KeyType string const ( KTSecp256k1 KeyType = "secp256k1" - KTBLS KeyType = "bls" + KTBLS KeyType = "bls" // TODO: add support for "delegated" or "secp256k1-ledger" types? ) @@ -68,7 +68,7 @@ func GenerateKey(keyType string) (string, string, error) { default: return "", "", xerrors.Errorf("unsupported key type: %s", keyType) } - + return privKey, addr.String(), nil } @@ -76,7 +76,6 @@ type CreateRequest struct { KeyType string `json:"keyType"` // This is either "secp256k1" or "bls" } - // @ID CreateWallet // @Summary Create new wallet // @Tags Wallet @@ -110,7 +109,7 @@ func (DefaultHandler) CreateHandler( } wallet := model.Wallet{ - ID: address, + ID: address, Address: address, PrivateKey: privateKey, } diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go index 605a9f46..7fc84f72 100644 --- a/handler/wallet/create_test.go +++ b/handler/wallet/create_test.go @@ -16,7 +16,7 @@ func TestCreateHandler(t *testing.T) { lotusClient := util.NewLotusClient("https://api.node.glif.io/rpc/v0", "") t.Run("success-secp256k1", func(t *testing.T) { - w, err := Default.CreateHandler(ctx, db, CreateRequest{ KeyType: KTSecp256k1.String() }) + w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTSecp256k1.String()}) require.NoError(t, err) require.NotEmpty(t, w.Address) require.NotEmpty(t, w.PrivateKey) @@ -28,7 +28,7 @@ func TestCreateHandler(t *testing.T) { }) t.Run("success-bls", func(t *testing.T) { - w, err := Default.CreateHandler(ctx, db, CreateRequest{ KeyType: KTBLS.String() }) + w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTBLS.String()}) require.NoError(t, err) require.NotEmpty(t, w.Address) require.NotEmpty(t, w.PrivateKey) @@ -40,8 +40,8 @@ func TestCreateHandler(t *testing.T) { }) t.Run("invalid-key-type", func(t *testing.T) { - _, err := Default.CreateHandler(ctx, db, CreateRequest{ KeyType: "invalid-type" }) + _, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: "invalid-type"}) require.Error(t, err) }) }) -} \ No newline at end of file +} diff --git a/store/piece_store.go b/store/piece_store.go index 6211b12e..5ad724ed 100644 --- a/store/piece_store.go +++ b/store/piece_store.go @@ -178,7 +178,7 @@ func NewPieceReader( return nil, errors.Wrapf(ErrInvalidEndOffset, "expected %d, got %d", car.FileSize, lastBlock.CarOffset+int64(lastBlock.CarBlockLength)) } - for i := range len(carBlocks) { + for i := range carBlocks { if i != len(carBlocks)-1 { if carBlocks[i].CarOffset+int64(carBlocks[i].CarBlockLength) != carBlocks[i+1].CarOffset { return nil, errors.Wrapf(ErrIncontiguousBlocks, "previous offset %d, next offset %d", carBlocks[i].CarOffset+int64(carBlocks[i].CarBlockLength), carBlocks[i+1].CarOffset) From 709f193a9f43d51ecc0dc329bb1d6da1e9cd32d1 Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Thu, 24 Apr 2025 09:20:11 -0400 Subject: [PATCH 30/39] Generate swagger docs --- api/api_test.go | 1 + .../http/wallet/create_wallet_parameters.go | 25 ++++++++++ .../swagger/models/wallet_create_request.go | 50 +++++++++++++++++++ docs/en/cli-reference/wallet/create.md | 2 +- docs/swagger/docs.go | 23 +++++++++ docs/swagger/swagger.json | 23 +++++++++ docs/swagger/swagger.yaml | 15 ++++++ handler/wallet/create.go | 2 + 8 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 client/swagger/models/wallet_create_request.go diff --git a/api/api_test.go b/api/api_test.go index 575df976..da4f2ab1 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -305,6 +305,7 @@ func TestAllAPIs(t *testing.T) { t.Run("wallet", func(t *testing.T) { t.Run("CreateWallet", func(t *testing.T) { resp, err := client.Wallet.CreateWallet(&wallet2.CreateWalletParams{ + Request: &models.WalletCreateRequest{}, Context: ctx, }) require.NoError(t, err) diff --git a/client/swagger/http/wallet/create_wallet_parameters.go b/client/swagger/http/wallet/create_wallet_parameters.go index 90f2e787..bb53489c 100644 --- a/client/swagger/http/wallet/create_wallet_parameters.go +++ b/client/swagger/http/wallet/create_wallet_parameters.go @@ -14,6 +14,8 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + + "github.com/data-preservation-programs/singularity/client/swagger/models" ) // NewCreateWalletParams creates a new CreateWalletParams object, @@ -60,6 +62,13 @@ CreateWalletParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateWalletParams struct { + + /* Request. + + Request body + */ + Request *models.WalletCreateRequest + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -113,6 +122,17 @@ func (o *CreateWalletParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithRequest adds the request to the create wallet params +func (o *CreateWalletParams) WithRequest(request *models.WalletCreateRequest) *CreateWalletParams { + o.SetRequest(request) + return o +} + +// SetRequest adds the request to the create wallet params +func (o *CreateWalletParams) SetRequest(request *models.WalletCreateRequest) { + o.Request = request +} + // WriteToRequest writes these params to a swagger request func (o *CreateWalletParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -120,6 +140,11 @@ func (o *CreateWalletParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. return err } var res []error + if o.Request != nil { + if err := r.SetBodyParam(o.Request); err != nil { + return err + } + } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/client/swagger/models/wallet_create_request.go b/client/swagger/models/wallet_create_request.go new file mode 100644 index 00000000..a1411264 --- /dev/null +++ b/client/swagger/models/wallet_create_request.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// WalletCreateRequest wallet create request +// +// swagger:model wallet.CreateRequest +type WalletCreateRequest struct { + + // This is either "secp256k1" or "bls" + KeyType string `json:"keyType,omitempty"` +} + +// Validate validates this wallet create request +func (m *WalletCreateRequest) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this wallet create request based on context it is used +func (m *WalletCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WalletCreateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WalletCreateRequest) UnmarshalBinary(b []byte) error { + var res WalletCreateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/docs/en/cli-reference/wallet/create.md b/docs/en/cli-reference/wallet/create.md index 10852d5e..1fb91430 100644 --- a/docs/en/cli-reference/wallet/create.md +++ b/docs/en/cli-reference/wallet/create.md @@ -6,7 +6,7 @@ NAME: singularity wallet create - Create a new wallet USAGE: - singularity wallet create [command options] + singularity wallet create [command options] [type] OPTIONS: --help, -h show help diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go index 47b534cb..86bd17d2 100644 --- a/docs/swagger/docs.go +++ b/docs/swagger/docs.go @@ -5534,6 +5534,9 @@ const docTemplate = `{ }, "/wallet/create": { "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -5542,6 +5545,17 @@ const docTemplate = `{ ], "summary": "Create new wallet", "operationId": "CreateWallet", + "parameters": [ + { + "description": "Request body", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wallet.CreateRequest" + } + } + ], "responses": { "200": { "description": "OK", @@ -16438,6 +16452,15 @@ const docTemplate = `{ "store.PieceReader": { "type": "object" }, + "wallet.CreateRequest": { + "type": "object", + "properties": { + "keyType": { + "description": "This is either \"secp256k1\" or \"bls\"", + "type": "string" + } + } + }, "wallet.ImportRequest": { "type": "object", "properties": { diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index 537d0453..ef2e912c 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -5528,6 +5528,9 @@ }, "/wallet/create": { "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -5536,6 +5539,17 @@ ], "summary": "Create new wallet", "operationId": "CreateWallet", + "parameters": [ + { + "description": "Request body", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wallet.CreateRequest" + } + } + ], "responses": { "200": { "description": "OK", @@ -16432,6 +16446,15 @@ "store.PieceReader": { "type": "object" }, + "wallet.CreateRequest": { + "type": "object", + "properties": { + "keyType": { + "description": "This is either \"secp256k1\" or \"bls\"", + "type": "string" + } + } + }, "wallet.ImportRequest": { "type": "object", "properties": { diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index 409ecc33..88d77e26 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -8177,6 +8177,12 @@ definitions: type: object store.PieceReader: type: object + wallet.CreateRequest: + properties: + keyType: + description: This is either "secp256k1" or "bls" + type: string + type: object wallet.ImportRequest: properties: privateKey: @@ -11849,7 +11855,16 @@ paths: - Wallet /wallet/create: post: + consumes: + - application/json operationId: CreateWallet + parameters: + - description: Request body + in: body + name: request + required: true + schema: + $ref: '#/definitions/wallet.CreateRequest' produces: - application/json responses: diff --git a/handler/wallet/create.go b/handler/wallet/create.go index d65f1660..b40c8ee0 100644 --- a/handler/wallet/create.go +++ b/handler/wallet/create.go @@ -79,7 +79,9 @@ type CreateRequest struct { // @ID CreateWallet // @Summary Create new wallet // @Tags Wallet +// @Accept json // @Produce json +// @Param request body CreateRequest true "Request body" // @Success 200 {array} model.Wallet // @Failure 400 {object} api.HTTPError // @Failure 500 {object} api.HTTPError From 85a32d903e8ba7f21a1884838964df4d451fdd0d Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Mon, 12 May 2025 12:01:44 -0400 Subject: [PATCH 31/39] Create versioned migration process --- cmd/admin/init.go | 2 +- cmd/admin/migrate.go | 54 ++++ cmd/app.go | 1 + cmd/dataprep_test.go | 2 +- cmd/deal_test.go | 2 +- cmd/wallet_test.go | 8 +- go.mod | 9 +- go.sum | 11 + handler/admin/init.go | 3 +- handler/admin/reset.go | 2 +- handler/deal/list_test.go | 2 +- handler/deal/schedule/create_test.go | 8 +- handler/deal/schedule/list_test.go | 2 +- handler/deal/schedule/pause_test.go | 2 +- handler/deal/schedule/remove_test.go | 4 +- handler/deal/schedule/resume_test.go | 2 +- handler/deal/send-manual_test.go | 18 +- handler/file/retrieve_test.go | 2 +- handler/wallet/attach_test.go | 2 +- handler/wallet/create.go | 2 +- handler/wallet/create_test.go | 6 +- handler/wallet/detach.go | 2 +- handler/wallet/detach_test.go | 2 +- handler/wallet/import.go | 2 +- handler/wallet/listattached_test.go | 2 +- handler/wallet/remove_test.go | 2 +- migrate/migrate-dataset.go | 4 +- .../migrations/202505010830_initial_schema.go | 247 ++++++++++++++++++ .../202505010840_wallet_actor_id.go | 103 ++++++++ migrate/migrations/migrations.go | 13 + model/migrate.go | 84 +++--- model/replication.go | 20 +- replication/makedeal.go | 15 +- replication/makedeal_test.go | 2 +- replication/wallet_test.go | 12 +- service/dealpusher/dealpusher_test.go | 14 +- service/dealtracker/dealtracker.go | 2 +- service/dealtracker/dealtracker_test.go | 2 +- testdb/main.go | 6 +- util/testutil/testutils.go | 2 +- 40 files changed, 567 insertions(+), 113 deletions(-) create mode 100644 cmd/admin/migrate.go create mode 100644 migrate/migrations/202505010830_initial_schema.go create mode 100644 migrate/migrations/202505010840_wallet_actor_id.go create mode 100644 migrate/migrations/migrations.go diff --git a/cmd/admin/init.go b/cmd/admin/init.go index 59cf0eaf..ad3a0213 100644 --- a/cmd/admin/init.go +++ b/cmd/admin/init.go @@ -16,7 +16,7 @@ var InitCmd = &cli.Command{ Usage: "Name of the user or service that is running the Singularity for tracking and logging purpose", }, }, - Description: "This commands need to be run before running any singularity daemon or after any version upgrade", + Description: "This command needs to be run before running any singularity daemon or after any version upgrade", Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { diff --git a/cmd/admin/migrate.go b/cmd/admin/migrate.go new file mode 100644 index 00000000..168e1cb6 --- /dev/null +++ b/cmd/admin/migrate.go @@ -0,0 +1,54 @@ +package admin + +import ( + "github.com/cockroachdb/errors" + "github.com/data-preservation-programs/singularity/cmd/cliutil" + "github.com/data-preservation-programs/singularity/database" + "github.com/data-preservation-programs/singularity/model" + "github.com/urfave/cli/v2" +) + +var MigrateCmd = &cli.Command{ + Name: "migrate", + Usage: "Migrate database up, down, or to a certain version", + Subcommands: []*cli.Command{ + { + Name: "up", + Usage: "Execute any unrun migrations", + Action: func(c *cli.Context) error { + db, closer, err := database.OpenFromCLI(c) + if err != nil { + return errors.WithStack(err) + } + defer closer.Close() + return model.Migrator(db).Migrate() + }, + }, + { + Name: "down", + Usage: "Rollback to previous migration", + Action: func(c *cli.Context) error { + db, closer, err := database.OpenFromCLI(c) + if err != nil { + return errors.WithStack(err) + } + defer closer.Close() + return model.Migrator(db).RollbackLast() + }, + }, + { + Name: "to", + Usage: "Migrate to specified version", + ArgsUsage: "", + Before: cliutil.CheckNArgs, + Action: func(c *cli.Context) error { + db, closer, err := database.OpenFromCLI(c) + if err != nil { + return errors.WithStack(err) + } + defer closer.Close() + return model.Migrator(db).MigrateTo(c.Args().Get(0)) + }, + }, + }, +} diff --git a/cmd/app.go b/cmd/app.go index 85fbf516..d59a6319 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -120,6 +120,7 @@ Upgrading: Subcommands: []*cli.Command{ admin.InitCmd, admin.ResetCmd, + admin.MigrateCmd, admin.MigrateDatasetCmd, admin.MigrateScheduleCmd, }, diff --git a/cmd/dataprep_test.go b/cmd/dataprep_test.go index 3bea7156..9c7b6664 100644 --- a/cmd/dataprep_test.go +++ b/cmd/dataprep_test.go @@ -24,7 +24,7 @@ var testPreparation = model.Preparation{ MaxSize: 100, PieceSize: 200, Wallets: []model.Wallet{{ - ID: "client_id", + ActorID: "client_id", Address: "client_address", PrivateKey: "private_key", }}, diff --git a/cmd/deal_test.go b/cmd/deal_test.go index 4430543b..055ab051 100644 --- a/cmd/deal_test.go +++ b/cmd/deal_test.go @@ -24,7 +24,7 @@ func swapDealHandler(mockHandler deal.Handler) func() { func TestSendDealHandler(t *testing.T) { testutil.One(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - err := db.Create(&model.Wallet{ID: "client_id"}).Error + err := db.Create(&model.Wallet{ActorID: "client_id"}).Error require.NoError(t, err) runner := NewRunner() defer runner.Save(t) diff --git a/cmd/wallet_test.go b/cmd/wallet_test.go index 52607911..f10061d0 100644 --- a/cmd/wallet_test.go +++ b/cmd/wallet_test.go @@ -30,7 +30,7 @@ func TestWalletCreate(t *testing.T) { mockHandler := new(wallet.MockWallet) defer swapWalletHandler(mockHandler)() mockHandler.On("CreateHandler", mock.Anything, mock.Anything, mock.Anything).Return(&model.Wallet{ - ID: "id", + ActorID: "id", Address: "address", PrivateKey: "private", }, nil) @@ -51,7 +51,7 @@ func TestWalletImport(t *testing.T) { mockHandler := new(wallet.MockWallet) defer swapWalletHandler(mockHandler)() mockHandler.On("ImportHandler", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&model.Wallet{ - ID: "id", + ActorID: "id", Address: "address", PrivateKey: "private", }, nil) @@ -69,11 +69,11 @@ func TestWalletList(t *testing.T) { mockHandler := new(wallet.MockWallet) defer swapWalletHandler(mockHandler)() mockHandler.On("ListHandler", mock.Anything, mock.Anything).Return([]model.Wallet{{ - ID: "id1", + ActorID: "id1", Address: "address1", PrivateKey: "private1", }, { - ID: "id2", + ActorID: "id2", Address: "address2", PrivateKey: "private2", }}, nil) diff --git a/go.mod b/go.mod index e1c8527c..faff5983 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/cockroachdb/errors v1.11.3 github.com/data-preservation-programs/table v0.0.3 github.com/dustin/go-humanize v1.0.1 - github.com/fatih/color v1.17.0 + github.com/fatih/color v1.18.0 github.com/filecoin-project/go-address v1.2.0 github.com/filecoin-project/go-cbor-util v0.0.1 github.com/filecoin-project/go-crypto v0.1.0 @@ -84,7 +84,7 @@ require ( gorm.io/driver/mysql v1.5.0 gorm.io/driver/postgres v1.5.0 gorm.io/driver/sqlite v1.5.2 - gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 + gorm.io/gorm v1.25.12 ) require ( @@ -153,6 +153,7 @@ require ( github.com/getsentry/sentry-go v0.27.0 // indirect github.com/glebarez/go-sqlite v1.21.1 // indirect github.com/go-chi/chi/v5 v5.0.8 // indirect + github.com/go-gormigrate/gormigrate/v2 v2.1.4 github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -374,8 +375,8 @@ require ( google.golang.org/protobuf v1.36.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/gotestsum v1.12.1 // indirect - gotest.tools/v3 v3.5.1 // indirect + gotest.tools/gotestsum v1.12.2 // indirect + gotest.tools/v3 v3.5.2 // indirect honnef.co/go/tools v0.6.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect modernc.org/libc v1.22.3 // indirect diff --git a/go.sum b/go.sum index 22cd3570..1fa691d5 100644 --- a/go.sum +++ b/go.sum @@ -202,6 +202,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/filecoin-project/dagstore v0.5.2 h1:Nd6oXdnolbbVhpMpkYT5PJHOjQp4OBSntHpMV5pxj3c= github.com/filecoin-project/dagstore v0.5.2/go.mod h1:mdqKzYrRBHf1pRMthYfMv3n37oOw0Tkx7+TxPt240M0= github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200910194244-f640612a1a1f/go.mod h1:+If3s2VxyjZn+KGGZIoRXBDSFQ9xL404JBJGf4WhEj0= @@ -310,6 +312,8 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gormigrate/gormigrate/v2 v2.1.4 h1:KOPEt27qy1cNzHfMZbp9YTmEuzkY4F4wrdsJW9WFk1U= +github.com/go-gormigrate/gormigrate/v2 v2.1.4/go.mod h1:y/6gPAH6QGAgP1UfHMiXcqGeJ88/GRQbfCReE1JJD5Y= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -449,6 +453,7 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -1769,12 +1774,18 @@ gorm.io/driver/sqlite v1.5.2/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7wJM0gzgcm8jkIkECQ= gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= +gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v1.12.1 h1:dvcxFBTFR1QsQmrCQa4k/vDXow9altdYz4CjdW+XeBE= gotest.tools/gotestsum v1.12.1/go.mod h1:mwDmLbx9DIvr09dnAoGgQPLaSXszNpXpWo2bsQge5BE= +gotest.tools/gotestsum v1.12.2 h1:eli4tu9Q2D/ogDsEGSr8XfQfl7mT0JsGOG6DFtUiZ/Q= +gotest.tools/gotestsum v1.12.2/go.mod h1:kjRtCglPZVsSU0hFHX3M5VWBM6Y63emHuB14ER1/sow= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/handler/admin/init.go b/handler/admin/init.go index 27b860ad..445c3df9 100644 --- a/handler/admin/init.go +++ b/handler/admin/init.go @@ -18,7 +18,8 @@ import ( // - An error, if any occurred during the operation. func (DefaultHandler) InitHandler(ctx context.Context, db *gorm.DB) error { db = db.WithContext(ctx) - err := model.AutoMigrate(db) + + err := model.Migrator(db).Migrate() if err != nil { return errors.WithStack(err) } diff --git a/handler/admin/reset.go b/handler/admin/reset.go index 4a2da222..24cad3e5 100644 --- a/handler/admin/reset.go +++ b/handler/admin/reset.go @@ -26,7 +26,7 @@ func (DefaultHandler) ResetHandler(ctx context.Context, db *gorm.DB) error { return errors.WithStack(err) } - err = model.AutoMigrate(db) + err = model.Migrator(db).Migrate() if err != nil { return errors.WithStack(err) } diff --git a/handler/deal/list_test.go b/handler/deal/list_test.go index 96005ebf..146131d9 100644 --- a/handler/deal/list_test.go +++ b/handler/deal/list_test.go @@ -14,7 +14,7 @@ func TestListHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, SourceStorages: []model.Storage{{ Name: "storage", diff --git a/handler/deal/schedule/create_test.go b/handler/deal/schedule/create_test.go index 4e1da85f..843adf39 100644 --- a/handler/deal/schedule/create_test.go +++ b/handler/deal/schedule/create_test.go @@ -190,7 +190,7 @@ func TestCreateHandler_InvalidProvider(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) @@ -207,7 +207,7 @@ func TestCreateHandler_DealSizeNotSetForCron(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) @@ -227,7 +227,7 @@ func TestCreateHandler_ScheduleDealSizeSetForNonCron(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) @@ -248,7 +248,7 @@ func TestCreateHandler_Success(t *testing.T) { err := db.Create(&model.Preparation{ Name: "name", Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/list_test.go b/handler/deal/schedule/list_test.go index e0c906f2..8169eedd 100644 --- a/handler/deal/schedule/list_test.go +++ b/handler/deal/schedule/list_test.go @@ -14,7 +14,7 @@ func TestListHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/pause_test.go b/handler/deal/schedule/pause_test.go index 17090f82..b7238460 100644 --- a/handler/deal/schedule/pause_test.go +++ b/handler/deal/schedule/pause_test.go @@ -15,7 +15,7 @@ func TestPauseHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/remove_test.go b/handler/deal/schedule/remove_test.go index afd825d3..de855d51 100644 --- a/handler/deal/schedule/remove_test.go +++ b/handler/deal/schedule/remove_test.go @@ -16,7 +16,7 @@ func TestRemoveSchedule_Success(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) @@ -57,7 +57,7 @@ func TestRemoveSchedule_StillActive(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/resume_test.go b/handler/deal/schedule/resume_test.go index 85d87b95..eb4c20fc 100644 --- a/handler/deal/schedule/resume_test.go +++ b/handler/deal/schedule/resume_test.go @@ -15,7 +15,7 @@ func TestResumeHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "f01", + ActorID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/send-manual_test.go b/handler/deal/send-manual_test.go index 0d55f66a..b7272971 100644 --- a/handler/deal/send-manual_test.go +++ b/handler/deal/send-manual_test.go @@ -41,7 +41,7 @@ var proposal = Proposal{ func TestSendManualHandler_WalletNotFound(t *testing.T) { wallet := model.Wallet{ - ID: "f09999", + ActorID: "f09999", Address: "f10000", } @@ -59,7 +59,7 @@ func TestSendManualHandler_WalletNotFound(t *testing.T) { func TestSendManualHandler_InvalidPieceCID(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -79,7 +79,7 @@ func TestSendManualHandler_InvalidPieceCID(t *testing.T) { func TestSendManualHandler_InvalidPieceCID_NOTCOMMP(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -99,7 +99,7 @@ func TestSendManualHandler_InvalidPieceCID_NOTCOMMP(t *testing.T) { func TestSendManualHandler_InvalidPieceSize(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -119,7 +119,7 @@ func TestSendManualHandler_InvalidPieceSize(t *testing.T) { func TestSendManualHandler_InvalidPieceSize_NotPowerOfTwo(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -139,7 +139,7 @@ func TestSendManualHandler_InvalidPieceSize_NotPowerOfTwo(t *testing.T) { func TestSendManualHandler_InvalidRootCID(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -159,7 +159,7 @@ func TestSendManualHandler_InvalidRootCID(t *testing.T) { func TestSendManualHandler_InvalidDuration(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -179,7 +179,7 @@ func TestSendManualHandler_InvalidDuration(t *testing.T) { func TestSendManualHandler_InvalidStartDelay(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } @@ -199,7 +199,7 @@ func TestSendManualHandler_InvalidStartDelay(t *testing.T) { func TestSendManualHandler(t *testing.T) { wallet := model.Wallet{ - ID: "f01000", + ActorID: "f01000", Address: "f10000", } diff --git a/handler/file/retrieve_test.go b/handler/file/retrieve_test.go index 46ea5b35..89d8bb51 100644 --- a/handler/file/retrieve_test.go +++ b/handler/file/retrieve_test.go @@ -409,7 +409,7 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) defer cancel() db = db.WithContext(ctx) - require.NoError(b, model.AutoMigrate(db)) + require.NoError(b, model.Migrator(db).Migrate()) path := b.TempDir() lsys := cidlink.DefaultLinkSystem() diff --git a/handler/wallet/attach_test.go b/handler/wallet/attach_test.go index 1a0ee203..9a8ddca9 100644 --- a/handler/wallet/attach_test.go +++ b/handler/wallet/attach_test.go @@ -14,7 +14,7 @@ import ( func TestAttachHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Wallet{ - ID: "test", + ActorID: "test", }).Error require.NoError(t, err) err = db.Create(&model.Preparation{}).Error diff --git a/handler/wallet/create.go b/handler/wallet/create.go index b40c8ee0..a1fc2fc2 100644 --- a/handler/wallet/create.go +++ b/handler/wallet/create.go @@ -111,7 +111,7 @@ func (DefaultHandler) CreateHandler( } wallet := model.Wallet{ - ID: address, + ActorID: address, Address: address, PrivateKey: privateKey, } diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go index 7fc84f72..3adbfb5c 100644 --- a/handler/wallet/create_test.go +++ b/handler/wallet/create_test.go @@ -19,7 +19,9 @@ func TestCreateHandler(t *testing.T) { w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTSecp256k1.String()}) require.NoError(t, err) require.NotEmpty(t, w.Address) - require.NotEmpty(t, w.PrivateKey) + require.Equal(t, "f1", w.Address[:2]) + require.Equal(t, "hello", w.PrivateKey) + _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ PrivateKey: w.PrivateKey, @@ -31,7 +33,7 @@ func TestCreateHandler(t *testing.T) { w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTBLS.String()}) require.NoError(t, err) require.NotEmpty(t, w.Address) - require.NotEmpty(t, w.PrivateKey) + require.Equal(t, "f3", w.Address[:2]) _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ PrivateKey: w.PrivateKey, diff --git a/handler/wallet/detach.go b/handler/wallet/detach.go index 7dee510f..6ea3d8d6 100644 --- a/handler/wallet/detach.go +++ b/handler/wallet/detach.go @@ -39,7 +39,7 @@ func (DefaultHandler) DetachHandler( } found, err := underscore.Find(preparation.Wallets, func(w model.Wallet) bool { - return w.ID == wallet || w.Address == wallet + return w.ActorID == wallet || w.Address == wallet }) if err != nil { return nil, errors.Wrapf(handlererror.ErrNotFound, "wallet %s not attached to preparation %d", wallet, preparationID) diff --git a/handler/wallet/detach_test.go b/handler/wallet/detach_test.go index 268da587..eba0205f 100644 --- a/handler/wallet/detach_test.go +++ b/handler/wallet/detach_test.go @@ -15,7 +15,7 @@ func TestDetachHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "test", + ActorID: "test", }}, }).Error require.NoError(t, err) diff --git a/handler/wallet/import.go b/handler/wallet/import.go index 3775d8cc..e27c162c 100644 --- a/handler/wallet/import.go +++ b/handler/wallet/import.go @@ -73,7 +73,7 @@ func (DefaultHandler) ImportHandler( } wallet := model.Wallet{ - ID: result, + ActorID: result, Address: result[:1] + addr.String()[1:], PrivateKey: request.PrivateKey, } diff --git a/handler/wallet/listattached_test.go b/handler/wallet/listattached_test.go index 26fb17fc..9f830d84 100644 --- a/handler/wallet/listattached_test.go +++ b/handler/wallet/listattached_test.go @@ -15,7 +15,7 @@ func TestListAttachedHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ID: "test", + ActorID: "test", }}, }).Error require.NoError(t, err) diff --git a/handler/wallet/remove_test.go b/handler/wallet/remove_test.go index dd52ecc0..8539cc96 100644 --- a/handler/wallet/remove_test.go +++ b/handler/wallet/remove_test.go @@ -15,7 +15,7 @@ func TestRemoveHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { t.Run("success", func(t *testing.T) { err := db.Create(&model.Wallet{ - ID: "test", + ActorID: "test", }).Error require.NoError(t, err) err = Default.RemoveHandler(ctx, db, "test") diff --git a/migrate/migrate-dataset.go b/migrate/migrate-dataset.go index db3c5c74..01661cac 100644 --- a/migrate/migrate-dataset.go +++ b/migrate/migrate-dataset.go @@ -263,9 +263,9 @@ func MigrateDataset(cctx *cli.Context) error { return errors.Wrap(err, "failed to connect to mongo") } - err = model.AutoMigrate(db) + err = model.Migrator(db).Migrate() if err != nil { - return errors.Wrap(err, "failed to auto-migrate database") + return errors.Wrap(err, "failed to migrate database") } resp, err := mg.Database("singularity").Collection("scanningrequests").Find(ctx, bson.M{}) diff --git a/migrate/migrations/202505010830_initial_schema.go b/migrate/migrations/202505010830_initial_schema.go new file mode 100644 index 00000000..ee42b3b9 --- /dev/null +++ b/migrate/migrations/202505010830_initial_schema.go @@ -0,0 +1,247 @@ +package migrations + +import ( + "strconv" + "time" + + "github.com/go-gormigrate/gormigrate/v2" + "github.com/ipfs/go-cid" + "github.com/pkg/errors" + "gorm.io/gorm" +) + +// NOTE: This recreates original models at time of transition from AutoMigrate +// to versioned migrations so that future modifications to the actual models +// don't change this initial schema definition. +type StringSlice []string +type ConfigMap map[string]string +type CID cid.Cid +type ClientConfig struct { + ConnectTimeout *time.Duration `cbor:"1,keyasint,omitempty" json:"connectTimeout,omitempty" swaggertype:"primitive,integer"` // HTTP Client Connect timeout + Timeout *time.Duration `cbor:"2,keyasint,omitempty" json:"timeout,omitempty" swaggertype:"primitive,integer"` // IO idle timeout + ExpectContinueTimeout *time.Duration `cbor:"3,keyasint,omitempty" json:"expectContinueTimeout,omitempty" swaggertype:"primitive,integer"` // Timeout when using expect / 100-continue in HTTP + InsecureSkipVerify *bool `cbor:"4,keyasint,omitempty" json:"insecureSkipVerify,omitempty"` // Do not verify the server SSL certificate (insecure) + NoGzip *bool `cbor:"5,keyasint,omitempty" json:"noGzip,omitempty"` // Don't set Accept-Encoding: gzip + UserAgent *string `cbor:"6,keyasint,omitempty" json:"userAgent,omitempty"` // Set the user-agent to a specified string + CaCert []string `cbor:"7,keyasint,omitempty" json:"caCert,omitempty"` // Paths to CA certificate used to verify servers + ClientCert *string `cbor:"8,keyasint,omitempty" json:"clientCert,omitempty"` // Path to Client SSL certificate (PEM) for mutual TLS auth + ClientKey *string `cbor:"9,keyasint,omitempty" json:"clientKey,omitempty"` // Path to Client SSL private key (PEM) for mutual TLS auth + Headers map[string]string `cbor:"10,keyasint,omitempty" json:"headers,omitempty"` // Set HTTP header for all transactions + DisableHTTP2 *bool `cbor:"11,keyasint,omitempty" json:"disableHttp2,omitempty"` // Disable HTTP/2 in the transport + DisableHTTPKeepAlives *bool `cbor:"12,keyasint,omitempty" json:"disableHttpKeepAlives,omitempty"` // Disable HTTP keep-alives and use each connection once. + RetryMaxCount *int `cbor:"13,keyasint,omitempty" json:"retryMaxCount,omitempty"` // Maximum number of retries. Default is 10 retries. + RetryDelay *time.Duration `cbor:"14,keyasint,omitempty" json:"retryDelay,omitempty" swaggertype:"primitive,integer"` // Delay between retries. Default is 1s. + RetryBackoff *time.Duration `cbor:"15,keyasint,omitempty" json:"retryBackoff,omitempty" swaggertype:"primitive,integer"` // Constant backoff between retries. Default is 1s. + RetryBackoffExponential *float64 `cbor:"16,keyasint,omitempty" json:"retryBackoffExponential,omitempty"` // Exponential backoff between retries. Default is 1.0. + SkipInaccessibleFile *bool `cbor:"17,keyasint,omitempty" json:"skipInaccessibleFile,omitempty"` // Skip inaccessible files. Default is false. + UseServerModTime *bool `cbor:"18,keyasint,omitempty" json:"useServerModTime,omitempty"` // Use server modified time instead of object metadata + LowLevelRetries *int `cbor:"19,keyasint,omitempty" json:"lowlevelRetries,omitempty"` // Maximum number of retries for low-level client errors. Default is 10 retries. + ScanConcurrency *int `cbor:"20,keyasint,omitempty" json:"scanConcurrency,omitempty"` // Maximum number of concurrent scan requests. Default is 1. +} +type WorkerType string +type Worker struct { + ID string `gorm:"primaryKey" json:"id"` + LastHeartbeat time.Time `json:"lastHeartbeat"` + Hostname string `json:"hostname"` + Type WorkerType `json:"type"` +} +type Global struct { + Key string `gorm:"primaryKey" json:"key"` + Value string `json:"value"` +} +type Wallet struct { + ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet +} +type PreparationID uint32 +type Preparation struct { + ID PreparationID `gorm:"primaryKey" json:"id"` + Name string `gorm:"unique" json:"name"` + CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + DeleteAfterExport bool `json:"deleteAfterExport"` // DeleteAfterExport is a flag that indicates whether the source files should be deleted after export. + MaxSize int64 `json:"maxSize"` + PieceSize int64 `json:"pieceSize"` + NoInline bool `json:"noInline"` + NoDag bool `json:"noDag"` + Wallets []Wallet `gorm:"many2many:wallet_assignments" json:"wallets,omitempty" swaggerignore:"true" table:"expand"` + SourceStorages []Storage `gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"sourceStorages,omitempty" table:"expand;header:Source Storages:"` + OutputStorages []Storage `gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"outputStorages,omitempty" table:"expand;header:Output Storages:"` +} + +func (s *Preparation) FindByIDOrName(db *gorm.DB, name string, preloads ...string) error { + id, err := strconv.ParseUint(name, 10, 32) + if err == nil { + for _, preload := range preloads { + db = db.Preload(preload) + } + return db.First(s, id).Error + } else { + for _, preload := range preloads { + db = db.Preload(preload) + } + return db.Where("name = ?", name).First(s).Error + } +} +func (s *Preparation) SourceAttachments(db *gorm.DB, preloads ...string) ([]SourceAttachment, error) { + for _, preload := range preloads { + db = db.Preload(preload) + } + var attachments []SourceAttachment + err := db.Where("preparation_id = ?", s.ID).Find(&attachments).Error + return attachments, errors.Wrap(err, "failed to find source attachments") +} + +type StorageID uint32 +type Storage struct { + ID StorageID `cbor:"-" gorm:"primaryKey" json:"id"` + Name string `cbor:"-" gorm:"unique" json:"name"` + CreatedAt time.Time `cbor:"-" json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `cbor:"-" json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + Type string `cbor:"1,keyasint,omitempty" json:"type"` + Path string `cbor:"2,keyasint,omitempty" json:"path"` // Path is the path to the storage root. + Config ConfigMap `cbor:"3,keyasint,omitempty" gorm:"type:JSON" json:"config" table:"verbose"` // Config is a map of key-value pairs that can be used to store RClone options. + ClientConfig ClientConfig `cbor:"4,keyasint,omitempty" gorm:"type:JSON" json:"clientConfig" table:"verbose"` // ClientConfig is the HTTP configuration for the storage, if applicable. + PreparationsAsSource []Preparation `cbor:"-" gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsSource,omitempty" table:"expand;header:As Source: "` + PreparationsAsOutput []Preparation `cbor:"-" gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsOutput,omitempty" table:"expand;header:As Output: "` +} +type ScheduleID uint32 +type ScheduleState string +type Schedule struct { + ID ScheduleID `gorm:"primaryKey" json:"id"` + CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + URLTemplate string `json:"urlTemplate" table:"verbose"` + HTTPHeaders ConfigMap `gorm:"type:JSON" json:"httpHeaders" table:"verbose"` + Provider string `json:"provider"` + PricePerGBEpoch float64 `json:"pricePerGbEpoch" table:"verbose"` + PricePerGB float64 `json:"pricePerGb" table:"verbose"` + PricePerDeal float64 `json:"pricePerDeal" table:"verbose"` + TotalDealNumber int `json:"totalDealNumber" table:"verbose"` + TotalDealSize int64 `json:"totalDealSize"` + Verified bool `json:"verified"` + KeepUnsealed bool `json:"keepUnsealed" table:"verbose"` + AnnounceToIPNI bool `gorm:"column:announce_to_ipni" json:"announceToIpni" table:"verbose"` + StartDelay time.Duration `json:"startDelay" swaggertype:"primitive,integer"` + Duration time.Duration `json:"duration" swaggertype:"primitive,integer"` + State ScheduleState `json:"state"` + ScheduleCron string `json:"scheduleCron"` + ScheduleCronPerpetual bool `json:"scheduleCronPerpetual"` + ScheduleDealNumber int `json:"scheduleDealNumber"` + ScheduleDealSize int64 `json:"scheduleDealSize"` + MaxPendingDealNumber int `json:"maxPendingDealNumber"` + MaxPendingDealSize int64 `json:"maxPendingDealSize"` + Notes string `json:"notes"` + ErrorMessage string `json:"errorMessage" table:"verbose"` + AllowedPieceCIDs StringSlice `gorm:"type:JSON;column:allowed_piece_cids" json:"allowedPieceCids" table:"verbose"` + Force bool `json:"force"` + PreparationID PreparationID `json:"preparationId"` + Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` +} +type DealState string +type DealID uint64 +type Deal struct { + ID DealID `gorm:"primaryKey" json:"id" table:"verbose"` + CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + LastVerifiedAt *time.Time `json:"lastVerifiedAt" table:"verbose;format:2006-01-02 15:04:05"` // LastVerifiedAt is the last time the deal was verified as active by the tracker + DealID *uint64 `gorm:"unique" json:"dealId"` + State DealState `gorm:"index:idx_pending" json:"state"` + Provider string `json:"provider"` + ProposalID string `json:"proposalId" table:"verbose"` + Label string `json:"label" table:"verbose"` + PieceCID CID `gorm:"column:piece_cid;index;size:255" json:"pieceCid" swaggertype:"string"` + PieceSize int64 `json:"pieceSize"` + StartEpoch int32 `json:"startEpoch"` + EndEpoch int32 `json:"endEpoch" table:"verbose"` + SectorStartEpoch int32 `json:"sectorStartEpoch" table:"verbose"` + Price string `json:"price"` + Verified bool `json:"verified"` + ErrorMessage string `json:"errorMessage" table:"verbose"` + ScheduleID *ScheduleID `json:"scheduleId" table:"verbose"` + Schedule *Schedule `gorm:"foreignKey:ScheduleID;constraint:OnDelete:SET NULL" json:"schedule,omitempty" swaggerignore:"true" table:"expand"` + ClientID string `gorm:"index:idx_pending" json:"clientId"` + Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` +} +type OutputAttachment struct { + ID uint32 `gorm:"primaryKey"` + PreparationID PreparationID + StorageID StorageID +} +type SourceAttachment struct { + ID uint32 `gorm:"primaryKey"` + PreparationID PreparationID + StorageID StorageID +} +type Job struct { + ID uint32 `gorm:"primaryKey"` + PreparationID PreparationID + Status string + CreatedAt time.Time +} +type File struct { + ID uint32 `gorm:"primaryKey"` + Path string + Size int64 + ModifiedAt time.Time +} +type FileRange struct { + ID uint32 `gorm:"primaryKey"` + FileID uint32 + Offset int64 + Length int64 +} +type Directory struct { + ID uint32 `gorm:"primaryKey"` + Path string + Size int64 +} +type Car struct { + ID uint32 `gorm:"primaryKey"` + RootCID CID + Size int64 +} +type CarBlock struct { + ID uint32 `gorm:"primaryKey"` + CarID uint32 + CID CID + Size int64 +} + +// Create migration for initial database schema +func _202505010830_initial_schema() *gormigrate.Migration { + var InitTables = []any{ + &Worker{}, + &Global{}, + &Preparation{}, + &Storage{}, + &OutputAttachment{}, + &SourceAttachment{}, + &Job{}, + &File{}, + &FileRange{}, + &Directory{}, + &Car{}, + &CarBlock{}, + &Deal{}, + &Schedule{}, + &Wallet{}, + } + + return &gormigrate.Migration{ + ID: "202505010830", + Migrate: func(tx *gorm.DB) error { + return tx.AutoMigrate(InitTables...) + }, + Rollback: func(tx *gorm.DB) error { + for _, table := range InitTables { + err := tx.Migrator().DropTable(table) + if err != nil { + return errors.Wrap(err, "failed to drop table") + } + } + return nil + }, + } +} diff --git a/migrate/migrations/202505010840_wallet_actor_id.go b/migrate/migrations/202505010840_wallet_actor_id.go new file mode 100644 index 00000000..50edd7ec --- /dev/null +++ b/migrate/migrations/202505010840_wallet_actor_id.go @@ -0,0 +1,103 @@ +package migrations + +import ( + "github.com/go-gormigrate/gormigrate/v2" + "gorm.io/gorm" +) + +// Create migration for initial database schema +func _202505010840_wallet_actor_id() *gormigrate.Migration { + // Table name + const WALLETS = "wallets" + + // Temporary struct for old schema + type OldWallet struct { + ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + } + + type WalletType string + const ( + UserWallet WalletType = "UserWallet" + SPWallet WalletType = "SPWallet" + ) + + // Temporary struct for new schema + type NewWallet struct { + ID uint `gorm:"primaryKey" json:"id"` + ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet + ActorName string `json:"actorName"` // ActorName is readable label for the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + Balance float64 `json:"balance"` // Balance is in Fil cached from chain + BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain + ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets + Location string `json:"location"` // Location is optional region, country for SP wallets + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + Type WalletType `json:"type"` // Type determines user or SP wallets + } + + return &gormigrate.Migration{ + ID: "202505010840", + Migrate: func(tx *gorm.DB) error { + // Create new table + err := tx.Migrator().CreateTable(&NewWallet{}) + if err != nil { + return err + } + + // Copy data from old to new table + var oldWallets []OldWallet + if err := tx.Table(WALLETS).Find(&oldWallets).Error; err != nil { + return err + } + + for _, oldWallet := range oldWallets { + newWallet := NewWallet{ + ActorID: oldWallet.ID, + Address: oldWallet.Address, + PrivateKey: oldWallet.PrivateKey, + } + if err := tx.Create(&newWallet).Error; err != nil { + return err + } + } + + // Drop old table and rename new table + if err := tx.Migrator().DropTable(&OldWallet{}); err != nil { + return err + } + return tx.Migrator().RenameTable(&NewWallet{}, WALLETS) + }, + Rollback: func(tx *gorm.DB) error { + // Create old table + err := tx.Migrator().CreateTable(&OldWallet{}) + if err != nil { + return err + } + + // Copy data from new to old table + var newWallets []NewWallet + if err := tx.Table(WALLETS).Find(&newWallets).Error; err != nil { + return err + } + + for _, newWallet := range newWallets { + oldWallet := OldWallet{ + ID: newWallet.ActorID, + Address: newWallet.Address, + PrivateKey: newWallet.PrivateKey, + } + if err := tx.Create(&oldWallet).Error; err != nil { + return err + } + } + + // Drop new table and rename old table + if err := tx.Migrator().DropTable(&NewWallet{}); err != nil { + return err + } + return tx.Migrator().RenameTable(&OldWallet{}, WALLETS) + }, + } +} diff --git a/migrate/migrations/migrations.go b/migrate/migrations/migrations.go new file mode 100644 index 00000000..8931f781 --- /dev/null +++ b/migrate/migrations/migrations.go @@ -0,0 +1,13 @@ +package migrations + +import ( + "github.com/go-gormigrate/gormigrate/v2" +) + +// Get collection of all migrations in order +func GetMigrations() []*gormigrate.Migration { + return []*gormigrate.Migration{ + _202505010830_initial_schema(), + _202505010840_wallet_actor_id(), + } +} diff --git a/model/migrate.go b/model/migrate.go index b2953c42..b7c73f34 100644 --- a/model/migrate.go +++ b/model/migrate.go @@ -5,6 +5,8 @@ import ( "encoding/base64" "github.com/cockroachdb/errors" + "github.com/data-preservation-programs/singularity/migrate/migrations" + "github.com/go-gormigrate/gormigrate/v2" "github.com/google/uuid" logging "github.com/ipfs/go-log/v2" "gorm.io/gorm" @@ -31,57 +33,61 @@ var Tables = []any{ var logger = logging.Logger("model") -// AutoMigrate attempts to automatically migrate the database schema. +// Create new Gormigrate instance // -// This function performs a few operations: -// 1. Automatically migrates the tables in the database to match the structures defined in the application. +// If no migrations are found, an init function performs a few operations: +// 1. Automatically migrates the tables in the database to match the current structures defined in the application. // 2. Creates an instance ID if it doesn't already exist. // 3. Generates a new encryption salt and stores it in the database if it doesn't already exist. // -// The purpose of the auto-migration feature is to simplify schema changes and manage -// basic system configurations without manually altering the database. This is especially -// useful during development or when deploying updates that include schema changes. -// // Parameters: // - db: A pointer to a gorm.DB object, which provides database access. // // Returns: -// - An error if any issues arise during the process, otherwise nil. -func AutoMigrate(db *gorm.DB) error { - logger.Info("Auto migrating tables") - err := db.AutoMigrate(Tables...) - if err != nil { - return errors.Wrap(err, "failed to auto migrate") - } +// - A migration interface +func Migrator(db *gorm.DB) *gormigrate.Gormigrate { + m := gormigrate.New(db, gormigrate.DefaultOptions, migrations.GetMigrations()) - logger.Debug("Creating instance id") - err = db.Clauses(clause.OnConflict{ - DoNothing: true, - }).Create(&Global{Key: "instance_id", Value: uuid.NewString()}).Error - if err != nil { - return errors.Wrap(err, "failed to create instance id") - } + // Initialize database with current schema if no previous migrations are found + m.InitSchema(func(tx *gorm.DB) error { + logger.Info("Auto migrating tables") - salt := make([]byte, 8) - _, err = rand.Read(salt) - if err != nil { - return errors.Wrap(err, "failed to generate salt") - } - encoded := base64.StdEncoding.EncodeToString(salt) - row := Global{ - Key: "salt", - Value: encoded, - } + err := db.AutoMigrate(Tables...) + if err != nil { + return errors.Wrap(err, "failed to auto migrate") + } - logger.Debug("Creating encryption salt") - err = db.Clauses(clause.OnConflict{ - DoNothing: true, - }).Create(row).Error - if err != nil { - return errors.Wrap(err, "failed to create salt") - } + logger.Debug("Creating instance id") + err = db.Clauses(clause.OnConflict{ + DoNothing: true, + }).Create(&Global{Key: "instance_id", Value: uuid.NewString()}).Error + if err != nil { + return errors.Wrap(err, "failed to create instance id") + } - return nil + salt := make([]byte, 8) + _, err = rand.Read(salt) + if err != nil { + return errors.Wrap(err, "failed to generate salt") + } + encoded := base64.StdEncoding.EncodeToString(salt) + row := Global{ + Key: "salt", + Value: encoded, + } + + logger.Debug("Creating encryption salt") + err = db.Clauses(clause.OnConflict{ + DoNothing: true, + }).Create(row).Error + if err != nil { + return errors.Wrap(err, "failed to create salt") + } + + return nil + }) + + return m } // DropAll removes all tables specified in the Tables slice from the database. diff --git a/model/replication.go b/model/replication.go index 4bcada94..b8edc550 100644 --- a/model/replication.go +++ b/model/replication.go @@ -141,8 +141,22 @@ type Schedule struct { Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` } +type WalletType string + +const ( + UserWallet WalletType = "UserWallet" + SPWallet WalletType = "SPWallet" +) + type Wallet struct { - ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + ID uint `gorm:"primaryKey" json:"id"` + ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet + ActorName string `json:"actorName"` // ActorName is readable label for the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + Balance float64 `json:"balance"` // Balance is in Fil cached from chain + BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain + ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets + Location string `json:"location"` // Location is optional region, country for SP wallets + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + Type WalletType `json:"type"` // Type determines user or SP wallets } diff --git a/replication/makedeal.go b/replication/makedeal.go index f5ead40d..de4ad8ae 100644 --- a/replication/makedeal.go +++ b/replication/makedeal.go @@ -9,6 +9,8 @@ import ( "strings" "time" + "slices" + "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/analytics" "github.com/data-preservation-programs/singularity/model" @@ -588,13 +590,12 @@ func (d DealMakerImpl) MakeDeal(ctx context.Context, walletObj model.Wallet, } dealModel := &model.Deal{ - State: model.DealProposed, - ClientID: walletObj.ID, - Provider: dealConfig.Provider, - Label: cid.Cid(car.RootCID).String(), - PieceCID: car.PieceCID, - PieceSize: car.PieceSize, - //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 + State: model.DealProposed, + ClientID: walletObj.ActorID, + Provider: dealConfig.Provider, + Label: cid.Cid(car.RootCID).String(), + PieceCID: car.PieceCID, + PieceSize: car.PieceSize, StartEpoch: int32(startEpoch), //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 EndEpoch: int32(endEpoch), diff --git a/replication/makedeal_test.go b/replication/makedeal_test.go index b1496c2f..81ca77ee 100644 --- a/replication/makedeal_test.go +++ b/replication/makedeal_test.go @@ -116,7 +116,7 @@ func TestDealMaker_MakeDeal(t *testing.T) { maker := NewDealMaker(nil, client, time.Hour, time.Second) defer maker.Close() wallet := model.Wallet{ - ID: "f047684", + ActorID: "f047684", Address: addr, PrivateKey: key, } diff --git a/replication/wallet_test.go b/replication/wallet_test.go index cc41d3d9..ce20a96f 100644 --- a/replication/wallet_test.go +++ b/replication/wallet_test.go @@ -48,10 +48,10 @@ func TestDatacapWalletChooser_Choose(t *testing.T) { // Set up the test data wallets := []model.Wallet{ - {ID: "1", Address: "address1"}, - {ID: "2", Address: "address2"}, - {ID: "3", Address: "address3"}, - {ID: "4", Address: "address4"}, + {ActorID: "1", Address: "address1"}, + {ActorID: "2", Address: "address2"}, + {ActorID: "3", Address: "address3"}, + {ActorID: "4", Address: "address4"}, } // Set up expectations for the lotusClient mock @@ -111,8 +111,8 @@ func TestRandomWalletChooser(t *testing.T) { chooser := &RandomWalletChooser{} ctx := context.Background() wallet, err := chooser.Choose(ctx, []model.Wallet{ - {ID: "1", Address: "address1"}, - {ID: "2", Address: "address2"}, + {ActorID: "1", Address: "address1"}, + {ActorID: "2", Address: "address2"}, }) require.NoError(t, err) require.Contains(t, wallet.Address, "address") diff --git a/service/dealpusher/dealpusher_test.go b/service/dealpusher/dealpusher_test.go index 909d5ec4..12e77d9c 100644 --- a/service/dealpusher/dealpusher_test.go +++ b/service/dealpusher/dealpusher_test.go @@ -41,7 +41,7 @@ func (m *MockDealMaker) MakeDeal(ctx context.Context, walletObj model.Wallet, ca deal.ID = 0 deal.PieceCID = car.PieceCID deal.PieceSize = car.PieceSize - deal.ClientID = walletObj.ID + deal.ClientID = walletObj.ActorID deal.Provider = dealConfig.Provider deal.Verified = dealConfig.Verified deal.ProposalID = uuid.NewString() @@ -112,7 +112,7 @@ func TestDealMakerService_FailtoSend(t *testing.T) { SourceStorages: []model.Storage{{}}, Wallets: []model.Wallet{ { - ID: client, Address: "f0xx", + ActorID: client, Address: "f0xx", }, }}, State: model.ScheduleActive, @@ -168,7 +168,7 @@ func TestDealMakerService_Cron(t *testing.T) { SourceStorages: []model.Storage{{}}, Wallets: []model.Wallet{ { - ID: client, Address: "f0xx", + ActorID: client, Address: "f0xx", }, }}, State: model.ScheduleActive, @@ -263,7 +263,7 @@ func TestDealMakerService_ScheduleWithConstraints(t *testing.T) { SourceStorages: []model.Storage{{}}, Wallets: []model.Wallet{ { - ID: client, Address: "f0xx", + ActorID: client, Address: "f0xx", }, }}, State: model.ScheduleActive, @@ -372,7 +372,7 @@ func TestDealmakerService_Force(t *testing.T) { Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ID: client, Address: "f0xx", + ActorID: client, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -431,7 +431,7 @@ func TestDealMakerService_MaxReplica(t *testing.T) { Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ID: client, Address: "f0xx", + ActorID: client, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -497,7 +497,7 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ID: client, Address: "f0xx", + ActorID: client, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, diff --git a/service/dealtracker/dealtracker.go b/service/dealtracker/dealtracker.go index 36a2714c..c3d85048 100644 --- a/service/dealtracker/dealtracker.go +++ b/service/dealtracker/dealtracker.go @@ -433,7 +433,7 @@ func (d *DealTracker) runOnce(ctx context.Context) error { walletIDs := make(map[string]struct{}) for _, wallet := range wallets { Logger.Infof("tracking deals for wallet %s", wallet.ID) - walletIDs[wallet.ID] = struct{}{} + walletIDs[wallet.ActorID] = struct{}{} } knownDeals := make(map[uint64]model.DealState) diff --git a/service/dealtracker/dealtracker_test.go b/service/dealtracker/dealtracker_test.go index eb2444d9..e4b77301 100644 --- a/service/dealtracker/dealtracker_test.go +++ b/service/dealtracker/dealtracker_test.go @@ -152,7 +152,7 @@ func TestTrackDeal(t *testing.T) { func TestRunOnce(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Wallet{ - ID: "t0100", + ActorID: "t0100", Address: "t3xxx", }).Error require.NoError(t, err) diff --git a/testdb/main.go b/testdb/main.go index 834d80b1..a8c37103 100644 --- a/testdb/main.go +++ b/testdb/main.go @@ -47,7 +47,7 @@ func run() error { return errors.WithStack(err) } - err = model.AutoMigrate(db) + err = model.Migrator(db).Migrate() if err != nil { return errors.WithStack(err) } @@ -76,7 +76,7 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { } // Setup wallet wallet := model.Wallet{ - ID: fmt.Sprintf("f0%d", r.Intn(10000)), + ActorID: fmt.Sprintf("f0%d", r.Intn(10000)), Address: "f1" + randomLetterString(39), } @@ -342,7 +342,7 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { Price: "0", Verified: true, ScheduleID: ptr.Of(schedule.ID), - ClientID: wallet.ID, + ClientID: wallet.ActorID, } if state == model.DealActive { //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 diff --git a/util/testutil/testutils.go b/util/testutil/testutils.go index 064fdbe5..2e3c2009 100644 --- a/util/testutil/testutils.go +++ b/util/testutil/testutils.go @@ -144,7 +144,7 @@ func doOne(t *testing.T, backend string, testFunc func(ctx context.Context, t *t defer cancel() db = db.WithContext(ctx) - err := model.AutoMigrate(db) + err := model.Migrator(db).Migrate() require.NoError(t, err) t.Run(backend, func(t *testing.T) { From 4dc7e2b20f7d3dd2fc81ea026c55aa0e3a55860d Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Mon, 19 May 2025 22:51:21 -0400 Subject: [PATCH 32/39] Fix versioned migration schemas - Add init function to create full current schema on brand new clean databases and run missing migrations on any databases using old auto-migrate strategy with existing data. - Add CLI commands to migrate up, down, or to a specified version by ID - Add utility functions to get list of migration IDs ran on current database, check if migration has run by ID, etc. --- cmd/admin/migrate.go | 22 ++- handler/admin/init.go | 2 +- handler/admin/reset.go | 5 +- migrate/migrate-dataset.go | 2 +- .../migrations/202505010830_initial_schema.go | 2 + .../202505010840_wallet_actor_id.go | 14 +- model/migrate.go | 132 ++++++++++++++---- 7 files changed, 134 insertions(+), 45 deletions(-) diff --git a/cmd/admin/migrate.go b/cmd/admin/migrate.go index 168e1cb6..6ecb69f6 100644 --- a/cmd/admin/migrate.go +++ b/cmd/admin/migrate.go @@ -1,6 +1,7 @@ package admin import ( + "fmt" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/cmd/cliutil" "github.com/data-preservation-programs/singularity/database" @@ -21,7 +22,7 @@ var MigrateCmd = &cli.Command{ return errors.WithStack(err) } defer closer.Close() - return model.Migrator(db).Migrate() + return model.GetMigrator(db).Migrate() }, }, { @@ -33,7 +34,7 @@ var MigrateCmd = &cli.Command{ return errors.WithStack(err) } defer closer.Close() - return model.Migrator(db).RollbackLast() + return model.GetMigrator(db).RollbackLast() }, }, { @@ -47,7 +48,22 @@ var MigrateCmd = &cli.Command{ return errors.WithStack(err) } defer closer.Close() - return model.Migrator(db).MigrateTo(c.Args().Get(0)) + + id := c.Args().Get(0) + + migrator := model.GetMigrator(db) + last, err := migrator.GetLastMigration() + if last == id { + fmt.Println("Already at requested migration") + return nil + } + + alreadyRan, err := migrator.HasRunMigration(id) + if alreadyRan { + return migrator.RollbackTo(id) + } else { + return migrator.MigrateTo(id) + } }, }, }, diff --git a/handler/admin/init.go b/handler/admin/init.go index 445c3df9..2bec942d 100644 --- a/handler/admin/init.go +++ b/handler/admin/init.go @@ -19,7 +19,7 @@ import ( func (DefaultHandler) InitHandler(ctx context.Context, db *gorm.DB) error { db = db.WithContext(ctx) - err := model.Migrator(db).Migrate() + err := model.GetMigrator(db).Migrate() if err != nil { return errors.WithStack(err) } diff --git a/handler/admin/reset.go b/handler/admin/reset.go index 24cad3e5..5af42778 100644 --- a/handler/admin/reset.go +++ b/handler/admin/reset.go @@ -21,12 +21,13 @@ import ( // - An error, if any occurred during the operation. func (DefaultHandler) ResetHandler(ctx context.Context, db *gorm.DB) error { db = db.WithContext(ctx) - err := model.DropAll(db) + migrator := model.GetMigrator(db) + err := migrator.RollbackAll() if err != nil { return errors.WithStack(err) } - err = model.Migrator(db).Migrate() + err = migrator.Migrate() if err != nil { return errors.WithStack(err) } diff --git a/migrate/migrate-dataset.go b/migrate/migrate-dataset.go index 01661cac..38c97b54 100644 --- a/migrate/migrate-dataset.go +++ b/migrate/migrate-dataset.go @@ -263,7 +263,7 @@ func MigrateDataset(cctx *cli.Context) error { return errors.Wrap(err, "failed to connect to mongo") } - err = model.Migrator(db).Migrate() + err = model.GetMigrator(db).Migrate() if err != nil { return errors.Wrap(err, "failed to migrate database") } diff --git a/migrate/migrations/202505010830_initial_schema.go b/migrate/migrations/202505010830_initial_schema.go index ee42b3b9..009c8d2e 100644 --- a/migrate/migrations/202505010830_initial_schema.go +++ b/migrate/migrations/202505010830_initial_schema.go @@ -232,6 +232,8 @@ func _202505010830_initial_schema() *gormigrate.Migration { return &gormigrate.Migration{ ID: "202505010830", Migrate: func(tx *gorm.DB) error { + // NOTE: this should match any existing database at the time of transition + // to versioned migration strategy return tx.AutoMigrate(InitTables...) }, Rollback: func(tx *gorm.DB) error { diff --git a/migrate/migrations/202505010840_wallet_actor_id.go b/migrate/migrations/202505010840_wallet_actor_id.go index 50edd7ec..46355584 100644 --- a/migrate/migrations/202505010840_wallet_actor_id.go +++ b/migrate/migrations/202505010840_wallet_actor_id.go @@ -8,7 +8,7 @@ import ( // Create migration for initial database schema func _202505010840_wallet_actor_id() *gormigrate.Migration { // Table name - const WALLETS = "wallets" + const WALLET_TABLE_NAME = "wallets" // Temporary struct for old schema type OldWallet struct { @@ -48,7 +48,7 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { // Copy data from old to new table var oldWallets []OldWallet - if err := tx.Table(WALLETS).Find(&oldWallets).Error; err != nil { + if err := tx.Table(WALLET_TABLE_NAME).Find(&oldWallets).Error; err != nil { return err } @@ -64,10 +64,10 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { } // Drop old table and rename new table - if err := tx.Migrator().DropTable(&OldWallet{}); err != nil { + if err := tx.Migrator().DropTable(WALLET_TABLE_NAME); err != nil { return err } - return tx.Migrator().RenameTable(&NewWallet{}, WALLETS) + return tx.Migrator().RenameTable(&NewWallet{}, WALLET_TABLE_NAME) }, Rollback: func(tx *gorm.DB) error { // Create old table @@ -78,7 +78,7 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { // Copy data from new to old table var newWallets []NewWallet - if err := tx.Table(WALLETS).Find(&newWallets).Error; err != nil { + if err := tx.Table(WALLET_TABLE_NAME).Find(&newWallets).Error; err != nil { return err } @@ -94,10 +94,10 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { } // Drop new table and rename old table - if err := tx.Migrator().DropTable(&NewWallet{}); err != nil { + if err := tx.Migrator().DropTable(WALLET_TABLE_NAME); err != nil { return err } - return tx.Migrator().RenameTable(&OldWallet{}, WALLETS) + return tx.Migrator().RenameTable(&OldWallet{}, WALLET_TABLE_NAME) }, } } diff --git a/model/migrate.go b/model/migrate.go index b7c73f34..de7453c3 100644 --- a/model/migrate.go +++ b/model/migrate.go @@ -3,6 +3,7 @@ package model import ( "crypto/rand" "encoding/base64" + "fmt" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/migrate/migrations" @@ -33,25 +34,62 @@ var Tables = []any{ var logger = logging.Logger("model") -// Create new Gormigrate instance +// Options for gormigrate instance +var options = &gormigrate.Options{ + TableName: "migrations", + IDColumnName: "id", + IDColumnSize: 255, + UseTransaction: false, + ValidateUnknownMigrations: false, +} + +// NOTE: this NEEDS to match the values in MigrationOptions above +// +// type struct { +// ID string `gorm:"primaryKey;column:;size:"` +// } +type migration struct { + ID string `gorm:"primaryKey;column:id;size:255"` +} + +// Handle initializing any database if no migrations are found // -// If no migrations are found, an init function performs a few operations: +// In the case of existing database: +// 1. Migrations table is created and first migration is inserted, which should match the existing, if outdated, data +// 2. Any remaining migrations are run +// +// In the case of a new database: // 1. Automatically migrates the tables in the database to match the current structures defined in the application. // 2. Creates an instance ID if it doesn't already exist. // 3. Generates a new encryption salt and stores it in the database if it doesn't already exist. -// -// Parameters: -// - db: A pointer to a gorm.DB object, which provides database access. -// -// Returns: -// - A migration interface -func Migrator(db *gorm.DB) *gormigrate.Gormigrate { - m := gormigrate.New(db, gormigrate.DefaultOptions, migrations.GetMigrations()) +func _init(db *gorm.DB) error { + logger.Info("Initializing database") - // Initialize database with current schema if no previous migrations are found - m.InitSchema(func(tx *gorm.DB) error { - logger.Info("Auto migrating tables") + // If this is an existing database before versioned migration strategy was implemented + if db.Migrator().HasTable("wallets") && !db.Migrator().HasColumn("wallets", "actor_id") { + // NOTE: We're going to have to recreate some internals of Gormigrate. It would be cleaner + // to use them directly but they're private methods. The general idea is to run all the + // migration functions _except_ the first which is hopefully the state of the database + // when they were on the older automigrate strategy. + logger.Info("Manually creating versioned migration table in existing database") + // Create migrations table + err := db.Table(options.TableName).AutoMigrate(&migration{}) + if err != nil { + return errors.Wrap(err, "failed to create migrations table on init") + } + + logger.Info("Manually running missing migrations") + // Skip first migration, run the rest to get current + for _, m := range migrations.GetMigrations()[1:] { + err = m.Migrate(db) + if err != nil { + return errors.Wrap(err, fmt.Sprintf("failed to run migration with ID: %s", m.ID)) + } + } + } else { + logger.Info("Auto migrating tables in clean database") + // This is a brand new database, run automigrate script on current schema err := db.AutoMigrate(Tables...) if err != nil { return errors.Wrap(err, "failed to auto migrate") @@ -83,32 +121,64 @@ func Migrator(db *gorm.DB) *gormigrate.Gormigrate { if err != nil { return errors.Wrap(err, "failed to create salt") } + } + + return nil +} - return nil - }) +type migrator struct { + gormigrate.Gormigrate + db *gorm.DB + Options gormigrate.Options +} - return m +// Rollback to first initial schema +func (m *migrator) RollbackAll() error { + return m.RollbackTo("SCHEMA_INIT") } -// DropAll removes all tables specified in the Tables slice from the database. -// -// This function is typically used during development or testing where a clean database -// slate is required. It iterates over the predefined Tables list and drops each table. -// Care should be taken when using this function in production environments as it will -// result in data loss. +// Get all migrations run +func (m *migrator) GetMigrationsRun() ([]migration, error) { + var migrations []migration + err := m.db.Find(&migrations).Error + if err != nil { + return nil, err + } + return migrations, nil +} + +// Get ID of last migration ran +func (m *migrator) GetLastMigration() (string, error) { + migrations, err := m.GetMigrationsRun() + if len(migrations) == 0 || err != nil { + return "", err + } + return migrations[len(migrations)-1].ID, nil +} + +// Has migration ID ran +func (m *migrator) HasRunMigration(id string) (bool, error) { + var count int64 + err := m.db.Table(m.Options.TableName).Where(fmt.Sprintf("%s = ?", m.Options.IDColumnName), id).Count(&count).Error + return count > 0, err +} + +// Setup new Gormigrate instance // // Parameters: // - db: A pointer to a gorm.DB object, which provides database access. // // Returns: -// - An error if any issues arise during the table drop process, otherwise nil. -func DropAll(db *gorm.DB) error { - logger.Info("Dropping all tables") - for _, table := range Tables { - err := db.Migrator().DropTable(table) - if err != nil { - return errors.Wrap(err, "failed to drop table") - } +// - A migration interface +func GetMigrator(db *gorm.DB) *migrator { + g := gormigrate.New(db, options, migrations.GetMigrations()) + + // Initialize database with current schema if no previous migrations are found + g.InitSchema(_init) + + return &migrator{ + *g, + db, + *options, } - return nil } From cae1b8ff7f994b560f730023077c2fce68c8d937 Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Tue, 20 May 2025 13:46:18 -0400 Subject: [PATCH 33/39] Generate docs --- client/swagger/models/model_wallet.go | 61 ++++++++++++++- client/swagger/models/model_wallet_type.go | 78 +++++++++++++++++++ docs/en/SUMMARY.md | 4 + docs/en/cli-reference/admin/README.md | 1 + docs/en/cli-reference/admin/init.md | 2 +- docs/en/cli-reference/admin/migrate/README.md | 20 +++++ docs/en/cli-reference/admin/migrate/down.md | 14 ++++ docs/en/cli-reference/admin/migrate/to.md | 14 ++++ docs/en/cli-reference/admin/migrate/up.md | 14 ++++ docs/swagger/docs.go | 44 ++++++++++- docs/swagger/swagger.json | 44 ++++++++++- docs/swagger/swagger.yaml | 31 +++++++- handler/admin/reset.go | 2 +- handler/file/retrieve_test.go | 2 +- model/migrate.go | 16 +++- testdb/main.go | 4 +- util/testutil/testutils.go | 2 +- 17 files changed, 338 insertions(+), 15 deletions(-) create mode 100644 client/swagger/models/model_wallet_type.go create mode 100644 docs/en/cli-reference/admin/migrate/README.md create mode 100644 docs/en/cli-reference/admin/migrate/down.md create mode 100644 docs/en/cli-reference/admin/migrate/to.md create mode 100644 docs/en/cli-reference/admin/migrate/up.md diff --git a/client/swagger/models/model_wallet.go b/client/swagger/models/model_wallet.go index dc2ff9fe..1b18a08a 100644 --- a/client/swagger/models/model_wallet.go +++ b/client/swagger/models/model_wallet.go @@ -8,6 +8,7 @@ package models import ( "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -17,23 +18,77 @@ import ( // swagger:model model.Wallet type ModelWallet struct { + // ActorID is the short ID of the wallet + ActorID string `json:"actorId,omitempty"` + + // ActorName is readable label for the wallet + ActorName string `json:"actorName,omitempty"` + // Address is the Filecoin full address of the wallet Address string `json:"address,omitempty"` - // ID is the short ID of the wallet - ID string `json:"id,omitempty"` + // Balance is in Fil cached from chain + Balance float64 `json:"balance,omitempty"` + + // BalancePlus is in Fil+ cached from chain + BalancePlus float64 `json:"balancePlus,omitempty"` + + // ContactInfo is optional email for SP wallets + ContactInfo string `json:"contactInfo,omitempty"` + + // id + ID int64 `json:"id,omitempty"` + + // Location is optional region, country for SP wallets + Location string `json:"location,omitempty"` // PrivateKey is the private key of the wallet PrivateKey string `json:"privateKey,omitempty"` + + // Type determines user or SP wallets + Type struct { + ModelWalletType + } `json:"type,omitempty"` } // Validate validates this model wallet func (m *ModelWallet) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModelWallet) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + return nil } -// ContextValidate validates this model wallet based on context it is used +// ContextValidate validate this model wallet based on the context it is used func (m *ModelWallet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModelWallet) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + return nil } diff --git a/client/swagger/models/model_wallet_type.go b/client/swagger/models/model_wallet_type.go new file mode 100644 index 00000000..9e33fae9 --- /dev/null +++ b/client/swagger/models/model_wallet_type.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ModelWalletType model wallet type +// +// swagger:model model.WalletType +type ModelWalletType string + +func NewModelWalletType(value ModelWalletType) *ModelWalletType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ModelWalletType. +func (m ModelWalletType) Pointer() *ModelWalletType { + return &m +} + +const ( + + // ModelWalletTypeUserWallet captures enum value "UserWallet" + ModelWalletTypeUserWallet ModelWalletType = "UserWallet" + + // ModelWalletTypeSPWallet captures enum value "SPWallet" + ModelWalletTypeSPWallet ModelWalletType = "SPWallet" +) + +// for schema +var modelWalletTypeEnum []interface{} + +func init() { + var res []ModelWalletType + if err := json.Unmarshal([]byte(`["UserWallet","SPWallet"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + modelWalletTypeEnum = append(modelWalletTypeEnum, v) + } +} + +func (m ModelWalletType) validateModelWalletTypeEnum(path, location string, value ModelWalletType) error { + if err := validate.EnumCase(path, location, value, modelWalletTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this model wallet type +func (m ModelWalletType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateModelWalletTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this model wallet type based on context it is used +func (m ModelWalletType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index 3ff26e00..e8e2393c 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -40,6 +40,10 @@ * [Admin](cli-reference/admin/README.md) * [Init](cli-reference/admin/init.md) * [Reset](cli-reference/admin/reset.md) + * [Migrate](cli-reference/admin/migrate/README.md) + * [Up](cli-reference/admin/migrate/up.md) + * [Down](cli-reference/admin/migrate/down.md) + * [To](cli-reference/admin/migrate/to.md) * [Migrate Dataset](cli-reference/admin/migrate-dataset.md) * [Migrate Schedule](cli-reference/admin/migrate-schedule.md) * [Download](cli-reference/download.md) diff --git a/docs/en/cli-reference/admin/README.md b/docs/en/cli-reference/admin/README.md index f7e036d6..a0a6900a 100644 --- a/docs/en/cli-reference/admin/README.md +++ b/docs/en/cli-reference/admin/README.md @@ -11,6 +11,7 @@ USAGE: COMMANDS: init Initialize or upgrade the database reset Reset the database + migrate Migrate database up, down, or to a certain version migrate-dataset Migrate dataset from old singularity mongodb migrate-schedule Migrate schedule from old singularity mongodb help, h Shows a list of commands or help for one command diff --git a/docs/en/cli-reference/admin/init.md b/docs/en/cli-reference/admin/init.md index cb59e97a..b321cbf2 100644 --- a/docs/en/cli-reference/admin/init.md +++ b/docs/en/cli-reference/admin/init.md @@ -9,7 +9,7 @@ USAGE: singularity admin init [command options] DESCRIPTION: - This commands need to be run before running any singularity daemon or after any version upgrade + This command needs to be run before running any singularity daemon or after any version upgrade OPTIONS: --identity value Name of the user or service that is running the Singularity for tracking and logging purpose diff --git a/docs/en/cli-reference/admin/migrate/README.md b/docs/en/cli-reference/admin/migrate/README.md new file mode 100644 index 00000000..0c7774c3 --- /dev/null +++ b/docs/en/cli-reference/admin/migrate/README.md @@ -0,0 +1,20 @@ +# Migrate database up, down, or to a certain version + +{% code fullWidth="true" %} +``` +NAME: + singularity admin migrate - Migrate database up, down, or to a certain version + +USAGE: + singularity admin migrate command [command options] + +COMMANDS: + up Execute any unrun migrations + down Rollback to previous migration + to Migrate to specified version + help, h Shows a list of commands or help for one command + +OPTIONS: + --help, -h show help +``` +{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/down.md b/docs/en/cli-reference/admin/migrate/down.md new file mode 100644 index 00000000..bd8d6db8 --- /dev/null +++ b/docs/en/cli-reference/admin/migrate/down.md @@ -0,0 +1,14 @@ +# Rollback to previous migration + +{% code fullWidth="true" %} +``` +NAME: + singularity admin migrate down - Rollback to previous migration + +USAGE: + singularity admin migrate down [command options] + +OPTIONS: + --help, -h show help +``` +{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/to.md b/docs/en/cli-reference/admin/migrate/to.md new file mode 100644 index 00000000..3b1f802e --- /dev/null +++ b/docs/en/cli-reference/admin/migrate/to.md @@ -0,0 +1,14 @@ +# Migrate to specified version + +{% code fullWidth="true" %} +``` +NAME: + singularity admin migrate to - Migrate to specified version + +USAGE: + singularity admin migrate to [command options] + +OPTIONS: + --help, -h show help +``` +{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/up.md b/docs/en/cli-reference/admin/migrate/up.md new file mode 100644 index 00000000..1abb1970 --- /dev/null +++ b/docs/en/cli-reference/admin/migrate/up.md @@ -0,0 +1,14 @@ +# Execute any unrun migrations + +{% code fullWidth="true" %} +``` +NAME: + singularity admin migrate up - Execute any unrun migrations + +USAGE: + singularity admin migrate up [command options] + +OPTIONS: + --help, -h show help +``` +{% endcode %} diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go index 86bd17d2..dd7d77b7 100644 --- a/docs/swagger/docs.go +++ b/docs/swagger/docs.go @@ -6550,20 +6550,62 @@ const docTemplate = `{ "model.Wallet": { "type": "object", "properties": { + "actorId": { + "description": "ActorID is the short ID of the wallet", + "type": "string" + }, + "actorName": { + "description": "ActorName is readable label for the wallet", + "type": "string" + }, "address": { "description": "Address is the Filecoin full address of the wallet", "type": "string" }, + "balance": { + "description": "Balance is in Fil cached from chain", + "type": "number" + }, + "balancePlus": { + "description": "BalancePlus is in Fil+ cached from chain", + "type": "number" + }, + "contactInfo": { + "description": "ContactInfo is optional email for SP wallets", + "type": "string" + }, "id": { - "description": "ID is the short ID of the wallet", + "type": "integer" + }, + "location": { + "description": "Location is optional region, country for SP wallets", "type": "string" }, "privateKey": { "description": "PrivateKey is the private key of the wallet", "type": "string" + }, + "type": { + "description": "Type determines user or SP wallets", + "allOf": [ + { + "$ref": "#/definitions/model.WalletType" + } + ] } } }, + "model.WalletType": { + "type": "string", + "enum": [ + "UserWallet", + "SPWallet" + ], + "x-enum-varnames": [ + "UserWallet", + "SPWallet" + ] + }, "schedule.CreateRequest": { "type": "object", "properties": { diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index ef2e912c..cee8cf76 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -6544,20 +6544,62 @@ "model.Wallet": { "type": "object", "properties": { + "actorId": { + "description": "ActorID is the short ID of the wallet", + "type": "string" + }, + "actorName": { + "description": "ActorName is readable label for the wallet", + "type": "string" + }, "address": { "description": "Address is the Filecoin full address of the wallet", "type": "string" }, + "balance": { + "description": "Balance is in Fil cached from chain", + "type": "number" + }, + "balancePlus": { + "description": "BalancePlus is in Fil+ cached from chain", + "type": "number" + }, + "contactInfo": { + "description": "ContactInfo is optional email for SP wallets", + "type": "string" + }, "id": { - "description": "ID is the short ID of the wallet", + "type": "integer" + }, + "location": { + "description": "Location is optional region, country for SP wallets", "type": "string" }, "privateKey": { "description": "PrivateKey is the private key of the wallet", "type": "string" + }, + "type": { + "description": "Type determines user or SP wallets", + "allOf": [ + { + "$ref": "#/definitions/model.WalletType" + } + ] } } }, + "model.WalletType": { + "type": "string", + "enum": [ + "UserWallet", + "SPWallet" + ], + "x-enum-varnames": [ + "UserWallet", + "SPWallet" + ] + }, "schedule.CreateRequest": { "type": "object", "properties": { diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index 88d77e26..efdacc20 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -670,16 +670,45 @@ definitions: type: object model.Wallet: properties: + actorId: + description: ActorID is the short ID of the wallet + type: string + actorName: + description: ActorName is readable label for the wallet + type: string address: description: Address is the Filecoin full address of the wallet type: string + balance: + description: Balance is in Fil cached from chain + type: number + balancePlus: + description: BalancePlus is in Fil+ cached from chain + type: number + contactInfo: + description: ContactInfo is optional email for SP wallets + type: string id: - description: ID is the short ID of the wallet + type: integer + location: + description: Location is optional region, country for SP wallets type: string privateKey: description: PrivateKey is the private key of the wallet type: string + type: + allOf: + - $ref: '#/definitions/model.WalletType' + description: Type determines user or SP wallets type: object + model.WalletType: + enum: + - UserWallet + - SPWallet + type: string + x-enum-varnames: + - UserWallet + - SPWallet schedule.CreateRequest: properties: allowedPieceCids: diff --git a/handler/admin/reset.go b/handler/admin/reset.go index 5af42778..c88397a6 100644 --- a/handler/admin/reset.go +++ b/handler/admin/reset.go @@ -22,7 +22,7 @@ import ( func (DefaultHandler) ResetHandler(ctx context.Context, db *gorm.DB) error { db = db.WithContext(ctx) migrator := model.GetMigrator(db) - err := migrator.RollbackAll() + err := migrator.DropAll() if err != nil { return errors.WithStack(err) } diff --git a/handler/file/retrieve_test.go b/handler/file/retrieve_test.go index 89d8bb51..dd444765 100644 --- a/handler/file/retrieve_test.go +++ b/handler/file/retrieve_test.go @@ -409,7 +409,7 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) defer cancel() db = db.WithContext(ctx) - require.NoError(b, model.Migrator(db).Migrate()) + require.NoError(b, model.GetMigrator(db).Migrate()) path := b.TempDir() lsys := cidlink.DefaultLinkSystem() diff --git a/model/migrate.go b/model/migrate.go index de7453c3..ce44ba80 100644 --- a/model/migrate.go +++ b/model/migrate.go @@ -132,9 +132,19 @@ type migrator struct { Options gormigrate.Options } -// Rollback to first initial schema -func (m *migrator) RollbackAll() error { - return m.RollbackTo("SCHEMA_INIT") +// Drop all current database tables +func (m *migrator) DropAll() error { + tables, err := m.db.Migrator().GetTables() + if err != nil { + return errors.Wrap(err, "Failed to get tables") + } + for _, t := range tables { + err = m.db.Migrator().DropTable(t) + if err != nil { + return errors.Wrap(err, "Failed to drop all tables") + } + } + return nil } // Get all migrations run diff --git a/testdb/main.go b/testdb/main.go index a8c37103..d57a823a 100644 --- a/testdb/main.go +++ b/testdb/main.go @@ -42,12 +42,12 @@ func run() error { return errors.WithStack(err) } defer closer.Close() - err = model.DropAll(db) + err = model.GetMigrator(db).DropAll() if err != nil { return errors.WithStack(err) } - err = model.Migrator(db).Migrate() + err = model.GetMigrator(db).Migrate() if err != nil { return errors.WithStack(err) } diff --git a/util/testutil/testutils.go b/util/testutil/testutils.go index 2e3c2009..aaba3023 100644 --- a/util/testutil/testutils.go +++ b/util/testutil/testutils.go @@ -144,7 +144,7 @@ func doOne(t *testing.T, backend string, testFunc func(ctx context.Context, t *t defer cancel() db = db.WithContext(ctx) - err := model.Migrator(db).Migrate() + err := model.GetMigrator(db).Migrate() require.NoError(t, err) t.Run(backend, func(t *testing.T) { From 792cb49f5d20c84f5da79d8776fb3e2a64470ebc Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Thu, 22 May 2025 14:09:35 -0400 Subject: [PATCH 34/39] feat: add `admin migrate which` command --- cmd/admin/migrate.go | 25 +- go.mod | 16 +- go.sum | 25 +- handler/storage/types_gen.go | 3046 ++++++++--------- handler/wallet/create_test.go | 1 - .../migrations/202505010830_initial_schema.go | 92 +- .../202505010840_wallet_actor_id.go | 24 +- model/migrate.go | 5 +- model/replication.go | 21 +- replication/makedeal.go | 2 - 10 files changed, 1627 insertions(+), 1630 deletions(-) diff --git a/cmd/admin/migrate.go b/cmd/admin/migrate.go index 6ecb69f6..5f3f1761 100644 --- a/cmd/admin/migrate.go +++ b/cmd/admin/migrate.go @@ -53,18 +53,41 @@ var MigrateCmd = &cli.Command{ migrator := model.GetMigrator(db) last, err := migrator.GetLastMigration() + if err != nil { + return errors.WithStack(err) + } if last == id { fmt.Println("Already at requested migration") return nil } alreadyRan, err := migrator.HasRunMigration(id) - if alreadyRan { + if err != nil { + return errors.WithStack(err) + } else if alreadyRan { return migrator.RollbackTo(id) } else { return migrator.MigrateTo(id) } }, }, + { + Name: "which", + Usage: "Print current migration ID", + Action: func(c *cli.Context) error { + db, closer, err := database.OpenFromCLI(c) + if err != nil { + return errors.WithStack(err) + } + defer closer.Close() + + last, err := model.GetMigrator(db).GetLastMigration() + if err != nil { + return errors.WithStack(err) + } + fmt.Println(fmt.Sprintf("Current migration: %s", last)) + return nil + }, + }, }, } diff --git a/go.mod b/go.mod index faff5983..786ec682 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,6 @@ require ( go.mongodb.org/mongo-driver v1.12.1 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c golang.org/x/text v0.23.0 golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da gorm.io/driver/mysql v1.5.0 @@ -87,6 +86,11 @@ require ( gorm.io/gorm v1.25.12 ) +require ( + github.com/google/go-cmp v0.7.0 // indirect + golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect +) + require ( cloud.google.com/go/compute/metadata v0.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 // indirect @@ -96,7 +100,6 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect - github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd // indirect @@ -107,7 +110,6 @@ require ( github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bep/debounce v1.2.1 // indirect - github.com/bitfield/gotestdox v0.2.2 // indirect github.com/calebcase/tmpfile v1.0.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -123,7 +125,6 @@ require ( github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/dchest/blake2b v1.0.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect - github.com/dnephin/pflag v1.0.7 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.5+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -176,7 +177,6 @@ require ( github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20250202011525-fc3143867406 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect @@ -299,7 +299,7 @@ require ( github.com/pion/turn/v4 v4.0.0 // indirect github.com/pion/webrtc/v4 v4.0.8 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.6-0.20230213180117-971c283182b6 // indirect github.com/pkg/xattr v0.4.9 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -359,8 +359,6 @@ require ( go.uber.org/fx v1.23.0 // indirect go.uber.org/mock v0.5.0 // indirect golang.org/x/crypto v0.36.0 // indirect - golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect - golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect golang.org/x/mod v0.23.0 // indirect golang.org/x/net v0.35.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect @@ -375,9 +373,7 @@ require ( google.golang.org/protobuf v1.36.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/gotestsum v1.12.2 // indirect gotest.tools/v3 v3.5.2 // indirect - honnef.co/go/tools v0.6.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect modernc.org/libc v1.22.3 // indirect modernc.org/mathutil v1.5.0 // indirect diff --git a/go.sum b/go.sum index 1fa691d5..8d929c15 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,6 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= @@ -99,8 +97,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= -github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE= -github.com/bitfield/gotestdox v0.2.2/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/brianvoe/gofakeit/v6 v6.23.2 h1:lVde18uhad5wII/f5RMVFLtdQNE0HaGFuBUXmYKk8i8= github.com/brianvoe/gofakeit/v6 v6.23.2/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= @@ -166,8 +162,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3 github.com/dlespiau/covertool v0.0.0-20180314162135-b0c4c6d0583a/go.mod h1:/eQMcW3eA1bzKx23ZYI2H3tXPdJB5JWYTHzoUPBvQY4= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= -github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= @@ -200,8 +194,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/filecoin-project/dagstore v0.5.2 h1:Nd6oXdnolbbVhpMpkYT5PJHOjQp4OBSntHpMV5pxj3c= @@ -451,9 +443,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -475,8 +466,6 @@ github.com/google/pprof v0.0.0-20250202011525-fc3143867406/go.mod h1:vavhavw2zAx github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1356,8 +1345,6 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= -golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ= -golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1772,18 +1759,10 @@ gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1 gorm.io/driver/sqlite v1.5.2 h1:TpQ+/dqCY4uCigCFyrfnrJnrW9zjpelWVoEVNy5qJkc= gorm.io/driver/sqlite v1.5.2/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4= gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7wJM0gzgcm8jkIkECQ= -gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/gotestsum v1.12.1 h1:dvcxFBTFR1QsQmrCQa4k/vDXow9altdYz4CjdW+XeBE= -gotest.tools/gotestsum v1.12.1/go.mod h1:mwDmLbx9DIvr09dnAoGgQPLaSXszNpXpWo2bsQge5BE= -gotest.tools/gotestsum v1.12.2 h1:eli4tu9Q2D/ogDsEGSr8XfQfl7mT0JsGOG6DFtUiZ/Q= -gotest.tools/gotestsum v1.12.2/go.mod h1:kjRtCglPZVsSU0hFHX3M5VWBM6Y63emHuB14ER1/sow= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= @@ -1795,8 +1774,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= -honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= diff --git a/handler/storage/types_gen.go b/handler/storage/types_gen.go index 91408d6d..e8dc9b60 100644 --- a/handler/storage/types_gen.go +++ b/handler/storage/types_gen.go @@ -6,19 +6,19 @@ package storage import "github.com/data-preservation-programs/singularity/model" type acdConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). - UploadWaitPerGb string `json:"uploadWaitPerGb" default:"3m0s"` // Additional time per GiB to wait after a failed complete upload to see if it appears. - TemplinkThreshold string `json:"templinkThreshold" default:"9Gi"` // Files >= this size will be downloaded via their tempLink. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). + UploadWaitPerGb string `default:"3m0s" json:"uploadWaitPerGb"` // Additional time per GiB to wait after a failed complete upload to see if it appears. + TemplinkThreshold string `default:"9Gi" json:"templinkThreshold"` // Files >= this size will be downloaded via their tempLink. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createAcdStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config acdConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -37,42 +37,42 @@ type createAcdStorageRequest struct { func createAcdStorage() {} type azureblobConfig struct { - Account string `json:"account"` // Azure Storage Account Name. - EnvAuth bool `json:"envAuth" default:"false"` // Read credentials from runtime (environment variables, CLI or MSI). - Key string `json:"key"` // Storage Account Shared Key. - SasUrl string `json:"sasUrl"` // SAS URL for container level access only. - Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. - ClientId string `json:"clientId"` // The ID of the client in use. - ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets - ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. - ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). - ClientSendCertificateChain bool `json:"clientSendCertificateChain" default:"false"` // Send the certificate chain when using certificate auth. - Username string `json:"username"` // User name (usually an email address) - Password string `json:"password"` // The user's password - ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. - UseMsi bool `json:"useMsi" default:"false"` // Use a managed service identity to authenticate (only works in Azure). - MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. - MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. - MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. - UseEmulator bool `json:"useEmulator" default:"false"` // Uses local storage emulator if provided as 'true'. - Endpoint string `json:"endpoint"` // Endpoint for the service. - UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). - ChunkSize string `json:"chunkSize" default:"4Mi"` // Upload chunk size. - UploadConcurrency int `json:"uploadConcurrency" default:"16"` // Concurrency for multipart uploads. - ListChunk int `json:"listChunk" default:"5000"` // Size of blob list. - AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. - ArchiveTierDelete bool `json:"archiveTierDelete" default:"false"` // Delete archive tier blobs before overwriting. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8"` // The encoding for the backend. - PublicAccess string `json:"publicAccess" example:""` // Public access level of a container: blob or container. - NoCheckContainer bool `json:"noCheckContainer" default:"false"` // If set, don't attempt to check the container exists or create it. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Account string `json:"account"` // Azure Storage Account Name. + EnvAuth bool `default:"false" json:"envAuth"` // Read credentials from runtime (environment variables, CLI or MSI). + Key string `json:"key"` // Storage Account Shared Key. + SasUrl string `json:"sasUrl"` // SAS URL for container level access only. + Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. + ClientId string `json:"clientId"` // The ID of the client in use. + ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets + ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. + ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). + ClientSendCertificateChain bool `default:"false" json:"clientSendCertificateChain"` // Send the certificate chain when using certificate auth. + Username string `json:"username"` // User name (usually an email address) + Password string `json:"password"` // The user's password + ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. + UseMsi bool `default:"false" json:"useMsi"` // Use a managed service identity to authenticate (only works in Azure). + MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. + MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. + MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. + UseEmulator bool `default:"false" json:"useEmulator"` // Uses local storage emulator if provided as 'true'. + Endpoint string `json:"endpoint"` // Endpoint for the service. + UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). + ChunkSize string `default:"4Mi" json:"chunkSize"` // Upload chunk size. + UploadConcurrency int `default:"16" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ListChunk int `default:"5000" json:"listChunk"` // Size of blob list. + AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. + ArchiveTierDelete bool `default:"false" json:"archiveTierDelete"` // Delete archive tier blobs before overwriting. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + Encoding string `default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8" json:"encoding"` // The encoding for the backend. + PublicAccess string `example:"" json:"publicAccess"` // Public access level of a container: blob or container. + NoCheckContainer bool `default:"false" json:"noCheckContainer"` // If set, don't attempt to check the container exists or create it. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. } type createAzureblobStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config azureblobConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -91,26 +91,26 @@ type createAzureblobStorageRequest struct { func createAzureblobStorage() {} type b2Config struct { - Account string `json:"account"` // Account ID or Application Key ID. - Key string `json:"key"` // Application Key. - Endpoint string `json:"endpoint"` // Endpoint for the service. - TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files on remote removal, otherwise hide files. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - CopyCutoff string `json:"copyCutoff" default:"4Gi"` // Cutoff for switching to multipart copy. - ChunkSize string `json:"chunkSize" default:"96Mi"` // Upload chunk size. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Disable checksums for large (> upload cutoff) files. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - DownloadAuthDuration string `json:"downloadAuthDuration" default:"1w"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Account string `json:"account"` // Account ID or Application Key ID. + Key string `json:"key"` // Application Key. + Endpoint string `json:"endpoint"` // Endpoint for the service. + TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files on remote removal, otherwise hide files. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + CopyCutoff string `default:"4Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + ChunkSize string `default:"96Mi" json:"chunkSize"` // Upload chunk size. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Disable checksums for large (> upload cutoff) files. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + DownloadAuthDuration string `default:"1w" json:"downloadAuthDuration"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createB2StorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config b2Config `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -129,24 +129,24 @@ type createB2StorageRequest struct { func createB2Storage() {} type boxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - RootFolderId string `json:"rootFolderId" default:"0"` // Fill in for rclone to use a non root folder as its starting point. - BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location - AccessToken string `json:"accessToken"` // Box App Primary Access Token - BoxSubType string `json:"boxSubType" default:"user" example:"user"` // - UploadCutoff string `json:"uploadCutoff" default:"50Mi"` // Cutoff for switching to multipart upload (>= 50 MiB). - CommitRetries int `json:"commitRetries" default:"100"` // Max number of times to try committing a multipart file. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 1-1000. - OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + RootFolderId string `default:"0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. + BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location + AccessToken string `json:"accessToken"` // Box App Primary Access Token + BoxSubType string `default:"user" example:"user" json:"boxSubType"` // + UploadCutoff string `default:"50Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload (>= 50 MiB). + CommitRetries int `default:"100" json:"commitRetries"` // Max number of times to try committing a multipart file. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 1-1000. + OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. + Encoding string `default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createBoxStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config boxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -165,53 +165,53 @@ type createBoxStorageRequest struct { func createBoxStorage() {} type driveConfig struct { - ClientId string `json:"clientId"` // Google Application Client Id - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Scope string `json:"scope" example:"drive"` // Scope that rclone should use when requesting access from drive. - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). - AuthOwnerOnly bool `json:"authOwnerOnly" default:"false"` // Only consider files owned by the authenticated user. - UseTrash bool `json:"useTrash" default:"true"` // Send files to the trash instead of deleting permanently. - CopyShortcutContent bool `json:"copyShortcutContent" default:"false"` // Server side copy contents of shortcuts instead of the shortcut. - SkipGdocs bool `json:"skipGdocs" default:"false"` // Skip google documents in all listings. - SkipChecksumGphotos bool `json:"skipChecksumGphotos" default:"false"` // Skip MD5 checksum on Google photos and videos only. - SharedWithMe bool `json:"sharedWithMe" default:"false"` // Only show files that are shared with me. - TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. - StarredOnly bool `json:"starredOnly" default:"false"` // Only show files that are starred. - Formats string `json:"formats"` // Deprecated: See export_formats. - ExportFormats string `json:"exportFormats" default:"docx,xlsx,pptx,svg"` // Comma separated list of preferred formats for downloading Google docs. - ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. - AllowImportNameChange bool `json:"allowImportNameChange" default:"false"` // Allow the filetype to change when uploading Google docs. - UseCreatedDate bool `json:"useCreatedDate" default:"false"` // Use file created date instead of modified date. - UseSharedDate bool `json:"useSharedDate" default:"false"` // Use date file was shared instead of modified date. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 100-1000, 0 to disable. - Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. - AlternateExport bool `json:"alternateExport" default:"false"` // Deprecated: No longer needed. - UploadCutoff string `json:"uploadCutoff" default:"8Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"8Mi"` // Upload chunk size. - AcknowledgeAbuse bool `json:"acknowledgeAbuse" default:"false"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. - KeepRevisionForever bool `json:"keepRevisionForever" default:"false"` // Keep new head revision of each file forever. - SizeAsQuota bool `json:"sizeAsQuota" default:"false"` // Show sizes as storage quota usage, not actual size. - V2DownloadMinSize string `json:"v2DownloadMinSize" default:"off"` // If Object's are greater, use drive v2 API to download. - PacerMinSleep string `json:"pacerMinSleep" default:"100ms"` // Minimum time to sleep between API calls. - PacerBurst int `json:"pacerBurst" default:"100"` // Number of API calls to allow without sleeping. - ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different drive configs. - DisableHttp2 bool `json:"disableHttp2" default:"true"` // Disable drive using http2. - StopOnUploadLimit bool `json:"stopOnUploadLimit" default:"false"` // Make upload limit errors be fatal. - StopOnDownloadLimit bool `json:"stopOnDownloadLimit" default:"false"` // Make download limit errors be fatal. - SkipShortcuts bool `json:"skipShortcuts" default:"false"` // If set skip shortcut files. - SkipDanglingShortcuts bool `json:"skipDanglingShortcuts" default:"false"` // If set skip dangling shortcut files. - ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. - Encoding string `json:"encoding" default:"InvalidUtf8"` // The encoding for the backend. + ClientId string `json:"clientId"` // Google Application Client Id + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Scope string `example:"drive" json:"scope"` // Scope that rclone should use when requesting access from drive. + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). + AuthOwnerOnly bool `default:"false" json:"authOwnerOnly"` // Only consider files owned by the authenticated user. + UseTrash bool `default:"true" json:"useTrash"` // Send files to the trash instead of deleting permanently. + CopyShortcutContent bool `default:"false" json:"copyShortcutContent"` // Server side copy contents of shortcuts instead of the shortcut. + SkipGdocs bool `default:"false" json:"skipGdocs"` // Skip google documents in all listings. + SkipChecksumGphotos bool `default:"false" json:"skipChecksumGphotos"` // Skip MD5 checksum on Google photos and videos only. + SharedWithMe bool `default:"false" json:"sharedWithMe"` // Only show files that are shared with me. + TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. + StarredOnly bool `default:"false" json:"starredOnly"` // Only show files that are starred. + Formats string `json:"formats"` // Deprecated: See export_formats. + ExportFormats string `default:"docx,xlsx,pptx,svg" json:"exportFormats"` // Comma separated list of preferred formats for downloading Google docs. + ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. + AllowImportNameChange bool `default:"false" json:"allowImportNameChange"` // Allow the filetype to change when uploading Google docs. + UseCreatedDate bool `default:"false" json:"useCreatedDate"` // Use file created date instead of modified date. + UseSharedDate bool `default:"false" json:"useSharedDate"` // Use date file was shared instead of modified date. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 100-1000, 0 to disable. + Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. + AlternateExport bool `default:"false" json:"alternateExport"` // Deprecated: No longer needed. + UploadCutoff string `default:"8Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"8Mi" json:"chunkSize"` // Upload chunk size. + AcknowledgeAbuse bool `default:"false" json:"acknowledgeAbuse"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. + KeepRevisionForever bool `default:"false" json:"keepRevisionForever"` // Keep new head revision of each file forever. + SizeAsQuota bool `default:"false" json:"sizeAsQuota"` // Show sizes as storage quota usage, not actual size. + V2DownloadMinSize string `default:"off" json:"v2DownloadMinSize"` // If Object's are greater, use drive v2 API to download. + PacerMinSleep string `default:"100ms" json:"pacerMinSleep"` // Minimum time to sleep between API calls. + PacerBurst int `default:"100" json:"pacerBurst"` // Number of API calls to allow without sleeping. + ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different drive configs. + DisableHttp2 bool `default:"true" json:"disableHttp2"` // Disable drive using http2. + StopOnUploadLimit bool `default:"false" json:"stopOnUploadLimit"` // Make upload limit errors be fatal. + StopOnDownloadLimit bool `default:"false" json:"stopOnDownloadLimit"` // Make download limit errors be fatal. + SkipShortcuts bool `default:"false" json:"skipShortcuts"` // If set skip shortcut files. + SkipDanglingShortcuts bool `default:"false" json:"skipDanglingShortcuts"` // If set skip dangling shortcut files. + ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. + Encoding string `default:"InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createDriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config driveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -230,24 +230,24 @@ type createDriveStorageRequest struct { func createDriveStorage() {} type dropboxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ChunkSize string `json:"chunkSize" default:"48Mi"` // Upload chunk size (< 150Mi). - Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. - SharedFiles bool `json:"sharedFiles" default:"false"` // Instructs rclone to work on individual shared files. - SharedFolders bool `json:"sharedFolders" default:"false"` // Instructs rclone to work on shared folders. - BatchMode string `json:"batchMode" default:"sync"` // Upload file batching sync|async|off. - BatchSize int `json:"batchSize" default:"0"` // Max number of files in upload batch. - BatchTimeout string `json:"batchTimeout" default:"0s"` // Max time to allow an idle upload batch before uploading. - BatchCommitTimeout string `json:"batchCommitTimeout" default:"10m0s"` // Max time to wait for a batch to finish committing - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ChunkSize string `default:"48Mi" json:"chunkSize"` // Upload chunk size (< 150Mi). + Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. + SharedFiles bool `default:"false" json:"sharedFiles"` // Instructs rclone to work on individual shared files. + SharedFolders bool `default:"false" json:"sharedFolders"` // Instructs rclone to work on shared folders. + BatchMode string `default:"sync" json:"batchMode"` // Upload file batching sync|async|off. + BatchSize int `default:"0" json:"batchSize"` // Max number of files in upload batch. + BatchTimeout string `default:"0s" json:"batchTimeout"` // Max time to allow an idle upload batch before uploading. + BatchCommitTimeout string `default:"10m0s" json:"batchCommitTimeout"` // Max time to wait for a batch to finish committing + Encoding string `default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createDropboxStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config dropboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -270,11 +270,11 @@ type fichierConfig struct { SharedFolder string `json:"sharedFolder"` // If you want to download a shared folder, add this parameter. FilePassword string `json:"filePassword"` // If you want to download a shared file that is password protected, add this parameter. FolderPassword string `json:"folderPassword"` // If you want to list the files in a shared folder that is password protected, add this parameter. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createFichierStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config fichierConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -293,17 +293,17 @@ type createFichierStorageRequest struct { func createFichierStorage() {} type filefabricConfig struct { - Url string `json:"url" example:"https://storagemadeeasy.com"` // URL of the Enterprise File Fabric to connect to. + Url string `example:"https://storagemadeeasy.com" json:"url"` // URL of the Enterprise File Fabric to connect to. RootFolderId string `json:"rootFolderId"` // ID of the root folder. PermanentToken string `json:"permanentToken"` // Permanent Authentication Token. Token string `json:"token"` // Session Token. TokenExpiry string `json:"tokenExpiry"` // Token expiry time. Version string `json:"version"` // Version read from the file fabric. - Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createFilefabricStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config filefabricConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -323,29 +323,29 @@ func createFilefabricStorage() {} type ftpConfig struct { Host string `json:"host"` // FTP host to connect to. - User string `json:"user" default:"$USER"` // FTP username. - Port int `json:"port" default:"21"` // FTP port number. + User string `default:"$USER" json:"user"` // FTP username. + Port int `default:"21" json:"port"` // FTP port number. Pass string `json:"pass"` // FTP password. - Tls bool `json:"tls" default:"false"` // Use Implicit FTPS (FTP over TLS). - ExplicitTls bool `json:"explicitTls" default:"false"` // Use Explicit FTPS (FTP over TLS). - Concurrency int `json:"concurrency" default:"0"` // Maximum number of FTP simultaneous connections, 0 for unlimited. - NoCheckCertificate bool `json:"noCheckCertificate" default:"false"` // Do not verify the TLS certificate of the server. - DisableEpsv bool `json:"disableEpsv" default:"false"` // Disable using EPSV even if server advertises support. - DisableMlsd bool `json:"disableMlsd" default:"false"` // Disable using MLSD even if server advertises support. - DisableUtf8 bool `json:"disableUtf8" default:"false"` // Disable using UTF-8 even if server advertises support. - WritingMdtm bool `json:"writingMdtm" default:"false"` // Use MDTM to set modification time (VsFtpd quirk) - ForceListHidden bool `json:"forceListHidden" default:"false"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. - IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. - CloseTimeout string `json:"closeTimeout" default:"1m0s"` // Maximum time to wait for a response to close. - TlsCacheSize int `json:"tlsCacheSize" default:"32"` // Size of TLS session cache for all control and data connections. - DisableTls13 bool `json:"disableTls13" default:"false"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) - ShutTimeout string `json:"shutTimeout" default:"1m0s"` // Maximum time to wait for data connection closing status. - AskPassword bool `json:"askPassword" default:"false"` // Allow asking for FTP password when needed. - Encoding string `json:"encoding" default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash"` // The encoding for the backend. + Tls bool `default:"false" json:"tls"` // Use Implicit FTPS (FTP over TLS). + ExplicitTls bool `default:"false" json:"explicitTls"` // Use Explicit FTPS (FTP over TLS). + Concurrency int `default:"0" json:"concurrency"` // Maximum number of FTP simultaneous connections, 0 for unlimited. + NoCheckCertificate bool `default:"false" json:"noCheckCertificate"` // Do not verify the TLS certificate of the server. + DisableEpsv bool `default:"false" json:"disableEpsv"` // Disable using EPSV even if server advertises support. + DisableMlsd bool `default:"false" json:"disableMlsd"` // Disable using MLSD even if server advertises support. + DisableUtf8 bool `default:"false" json:"disableUtf8"` // Disable using UTF-8 even if server advertises support. + WritingMdtm bool `default:"false" json:"writingMdtm"` // Use MDTM to set modification time (VsFtpd quirk) + ForceListHidden bool `default:"false" json:"forceListHidden"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. + IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. + CloseTimeout string `default:"1m0s" json:"closeTimeout"` // Maximum time to wait for a response to close. + TlsCacheSize int `default:"32" json:"tlsCacheSize"` // Size of TLS session cache for all control and data connections. + DisableTls13 bool `default:"false" json:"disableTls13"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) + ShutTimeout string `default:"1m0s" json:"shutTimeout"` // Maximum time to wait for data connection closing status. + AskPassword bool `default:"false" json:"askPassword"` // Allow asking for FTP password when needed. + Encoding string `default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash" json:"encoding"` // The encoding for the backend. } type createFtpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config ftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -364,29 +364,29 @@ type createFtpStorageRequest struct { func createFtpStorage() {} type gcsConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ProjectNumber string `json:"projectNumber"` // Project number. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - Anonymous bool `json:"anonymous" default:"false"` // Access public buckets and objects without credentials. - ObjectAcl string `json:"objectAcl" example:"authenticatedRead"` // Access Control List for new objects. - BucketAcl string `json:"bucketAcl" example:"authenticatedRead"` // Access Control List for new buckets. - BucketPolicyOnly bool `json:"bucketPolicyOnly" default:"false"` // Access checks should use bucket-level IAM policies. - Location string `json:"location" example:""` // Location for the newly created buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing objects in Google Cloud Storage. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - Endpoint string `json:"endpoint"` // Endpoint for the service. - Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ProjectNumber string `json:"projectNumber"` // Project number. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + Anonymous bool `default:"false" json:"anonymous"` // Access public buckets and objects without credentials. + ObjectAcl string `example:"authenticatedRead" json:"objectAcl"` // Access Control List for new objects. + BucketAcl string `example:"authenticatedRead" json:"bucketAcl"` // Access Control List for new buckets. + BucketPolicyOnly bool `default:"false" json:"bucketPolicyOnly"` // Access checks should use bucket-level IAM policies. + Location string `example:"" json:"location"` // Location for the newly created buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing objects in Google Cloud Storage. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + Endpoint string `json:"endpoint"` // Endpoint for the service. + Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). } type createGcsStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gcsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -405,20 +405,20 @@ type createGcsStorageRequest struct { func createGcsStorage() {} type gphotosConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ReadOnly bool `json:"readOnly" default:"false"` // Set to make the Google Photos backend read only. - ReadSize bool `json:"readSize" default:"false"` // Set to read the size of media items. - StartYear int `json:"startYear" default:"2000"` // Year limits the photos to be downloaded to those which are uploaded after the given year. - IncludeArchived bool `json:"includeArchived" default:"false"` // Also view and download archived media. - Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ReadOnly bool `default:"false" json:"readOnly"` // Set to make the Google Photos backend read only. + ReadSize bool `default:"false" json:"readSize"` // Set to read the size of media items. + StartYear int `default:"2000" json:"startYear"` // Year limits the photos to be downloaded to those which are uploaded after the given year. + IncludeArchived bool `default:"false" json:"includeArchived"` // Also view and download archived media. + Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createGphotosStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gphotosConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -437,15 +437,15 @@ type createGphotosStorageRequest struct { func createGphotosStorage() {} type hdfsConfig struct { - Namenode string `json:"namenode"` // Hadoop name node and port. - Username string `json:"username" example:"root"` // Hadoop user name. - ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. - DataTransferProtection string `json:"dataTransferProtection" example:"privacy"` // Kerberos data transfer protection: authentication|integrity|privacy. - Encoding string `json:"encoding" default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Namenode string `json:"namenode"` // Hadoop name node and port. + Username string `example:"root" json:"username"` // Hadoop user name. + ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. + DataTransferProtection string `example:"privacy" json:"dataTransferProtection"` // Kerberos data transfer protection: authentication|integrity|privacy. + Encoding string `default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createHdfsStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hdfsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -464,24 +464,24 @@ type createHdfsStorageRequest struct { func createHdfsStorage() {} type hidriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ScopeAccess string `json:"scopeAccess" default:"rw" example:"rw"` // Access permissions that rclone should use when requesting access from HiDrive. - ScopeRole string `json:"scopeRole" default:"user" example:"user"` // User-level that rclone should use when requesting access from HiDrive. - RootPrefix string `json:"rootPrefix" default:"/" example:"/"` // The root/parent folder for all paths. - Endpoint string `json:"endpoint" default:"https://api.hidrive.strato.com/2.1"` // Endpoint for the service. - DisableFetchingMemberCount bool `json:"disableFetchingMemberCount" default:"false"` // Do not fetch number of objects in directories unless it is absolutely necessary. - ChunkSize string `json:"chunkSize" default:"48Mi"` // Chunksize for chunked uploads. - UploadCutoff string `json:"uploadCutoff" default:"96Mi"` // Cutoff/Threshold for chunked uploads. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for chunked uploads. - Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ScopeAccess string `default:"rw" example:"rw" json:"scopeAccess"` // Access permissions that rclone should use when requesting access from HiDrive. + ScopeRole string `default:"user" example:"user" json:"scopeRole"` // User-level that rclone should use when requesting access from HiDrive. + RootPrefix string `default:"/" example:"/" json:"rootPrefix"` // The root/parent folder for all paths. + Endpoint string `default:"https://api.hidrive.strato.com/2.1" json:"endpoint"` // Endpoint for the service. + DisableFetchingMemberCount bool `default:"false" json:"disableFetchingMemberCount"` // Do not fetch number of objects in directories unless it is absolutely necessary. + ChunkSize string `default:"48Mi" json:"chunkSize"` // Chunksize for chunked uploads. + UploadCutoff string `default:"96Mi" json:"uploadCutoff"` // Cutoff/Threshold for chunked uploads. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for chunked uploads. + Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. } type createHidriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hidriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -502,12 +502,12 @@ func createHidriveStorage() {} type httpConfig struct { Url string `json:"url"` // URL of HTTP host to connect to. Headers string `json:"headers"` // Set HTTP headers for all transactions. - NoSlash bool `json:"noSlash" default:"false"` // Set this if the site doesn't end directories with /. - NoHead bool `json:"noHead" default:"false"` // Don't use HEAD requests. + NoSlash bool `default:"false" json:"noSlash"` // Set this if the site doesn't end directories with /. + NoHead bool `default:"false" json:"noHead"` // Don't use HEAD requests. } type createHttpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config httpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -526,17 +526,17 @@ type createHttpStorageRequest struct { func createHttpStorage() {} type internetarchiveConfig struct { - AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. - SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). - Endpoint string `json:"endpoint" default:"https://s3.us.archive.org"` // IAS3 Endpoint. - FrontEndpoint string `json:"frontEndpoint" default:"https://archive.org"` // Host of InternetArchive Frontend. - DisableChecksum bool `json:"disableChecksum" default:"true"` // Don't ask the server to test against MD5 checksum calculated by rclone. - WaitArchive string `json:"waitArchive" default:"0s"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. - Encoding string `json:"encoding" default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. + SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). + Endpoint string `default:"https://s3.us.archive.org" json:"endpoint"` // IAS3 Endpoint. + FrontEndpoint string `default:"https://archive.org" json:"frontEndpoint"` // Host of InternetArchive Frontend. + DisableChecksum bool `default:"true" json:"disableChecksum"` // Don't ask the server to test against MD5 checksum calculated by rclone. + WaitArchive string `default:"0s" json:"waitArchive"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. + Encoding string `default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createInternetarchiveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config internetarchiveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -555,16 +555,16 @@ type createInternetarchiveStorageRequest struct { func createInternetarchiveStorage() {} type jottacloudConfig struct { - Md5MemoryLimit string `json:"md5MemoryLimit" default:"10Mi"` // Files bigger than this will be cached on disk to calculate the MD5 if required. - TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. - HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. - UploadResumeLimit string `json:"uploadResumeLimit" default:"10Mi"` // Files bigger than this can be resumed if the upload fail's. - NoVersions bool `json:"noVersions" default:"false"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Md5MemoryLimit string `default:"10Mi" json:"md5MemoryLimit"` // Files bigger than this will be cached on disk to calculate the MD5 if required. + TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. + HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. + UploadResumeLimit string `default:"10Mi" json:"uploadResumeLimit"` // Files bigger than this can be resumed if the upload fail's. + NoVersions bool `default:"false" json:"noVersions"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createJottacloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config jottacloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -584,14 +584,14 @@ func createJottacloudStorage() {} type koofrDigistorageConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. + Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password). - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createKoofrDigistorageStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrDigistorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -611,14 +611,14 @@ func createKoofrDigistorageStorage() {} type koofrKoofrConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. + Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createKoofrKoofrStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrKoofrConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -639,14 +639,14 @@ func createKoofrKoofrStorage() {} type koofrOtherConfig struct { Endpoint string `json:"endpoint"` // The Koofr API endpoint to use. Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. + Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at your service's settings page). - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createKoofrOtherStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrOtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -665,24 +665,24 @@ type createKoofrOtherStorageRequest struct { func createKoofrOtherStorage() {} type localConfig struct { - Nounc bool `json:"nounc" default:"false" example:"true"` // Disable UNC (long path names) conversion on Windows. - CopyLinks bool `json:"copyLinks" default:"false"` // Follow symlinks and copy the pointed to item. - Links bool `json:"links" default:"false"` // Translate symlinks to/from regular files with a '.rclonelink' extension. - SkipLinks bool `json:"skipLinks" default:"false"` // Don't warn about skipped symlinks. - ZeroSizeLinks bool `json:"zeroSizeLinks" default:"false"` // Assume the Stat size of links is zero (and read them instead) (deprecated). - UnicodeNormalization bool `json:"unicodeNormalization" default:"false"` // Apply unicode NFC normalization to paths and filenames. - NoCheckUpdated bool `json:"noCheckUpdated" default:"false"` // Don't check to see if the files change during upload. - OneFileSystem bool `json:"oneFileSystem" default:"false"` // Don't cross filesystem boundaries (unix/macOS only). - CaseSensitive bool `json:"caseSensitive" default:"false"` // Force the filesystem to report itself as case sensitive. - CaseInsensitive bool `json:"caseInsensitive" default:"false"` // Force the filesystem to report itself as case insensitive. - NoPreallocate bool `json:"noPreallocate" default:"false"` // Disable preallocation of disk space for transferred files. - NoSparse bool `json:"noSparse" default:"false"` // Disable sparse files for multi-thread downloads. - NoSetModtime bool `json:"noSetModtime" default:"false"` // Disable setting modtime. - Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. + Nounc bool `default:"false" example:"true" json:"nounc"` // Disable UNC (long path names) conversion on Windows. + CopyLinks bool `default:"false" json:"copyLinks"` // Follow symlinks and copy the pointed to item. + Links bool `default:"false" json:"links"` // Translate symlinks to/from regular files with a '.rclonelink' extension. + SkipLinks bool `default:"false" json:"skipLinks"` // Don't warn about skipped symlinks. + ZeroSizeLinks bool `default:"false" json:"zeroSizeLinks"` // Assume the Stat size of links is zero (and read them instead) (deprecated). + UnicodeNormalization bool `default:"false" json:"unicodeNormalization"` // Apply unicode NFC normalization to paths and filenames. + NoCheckUpdated bool `default:"false" json:"noCheckUpdated"` // Don't check to see if the files change during upload. + OneFileSystem bool `default:"false" json:"oneFileSystem"` // Don't cross filesystem boundaries (unix/macOS only). + CaseSensitive bool `default:"false" json:"caseSensitive"` // Force the filesystem to report itself as case sensitive. + CaseInsensitive bool `default:"false" json:"caseInsensitive"` // Force the filesystem to report itself as case insensitive. + NoPreallocate bool `default:"false" json:"noPreallocate"` // Disable preallocation of disk space for transferred files. + NoSparse bool `default:"false" json:"noSparse"` // Disable sparse files for multi-thread downloads. + NoSetModtime bool `default:"false" json:"noSetModtime"` // Disable setting modtime. + Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. } type createLocalStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config localConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -701,20 +701,20 @@ type createLocalStorageRequest struct { func createLocalStorage() {} type mailruConfig struct { - User string `json:"user"` // User name (usually email). - Pass string `json:"pass"` // Password. - SpeedupEnable bool `json:"speedupEnable" default:"true" example:"true"` // Skip full upload if there is another file with same data hash. - SpeedupFilePatterns string `json:"speedupFilePatterns" default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:""` // Comma separated list of file name patterns eligible for speedup (put by hash). - SpeedupMaxDisk string `json:"speedupMaxDisk" default:"3Gi" example:"0"` // This option allows you to disable speedup (put by hash) for large files. - SpeedupMaxMemory string `json:"speedupMaxMemory" default:"32Mi" example:"0"` // Files larger than the size given below will always be hashed on disk. - CheckHash bool `json:"checkHash" default:"true" example:"true"` // What should copy do if file checksum is mismatched or invalid. - UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. - Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + User string `json:"user"` // User name (usually email). + Pass string `json:"pass"` // Password. + SpeedupEnable bool `default:"true" example:"true" json:"speedupEnable"` // Skip full upload if there is another file with same data hash. + SpeedupFilePatterns string `default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:"" json:"speedupFilePatterns"` // Comma separated list of file name patterns eligible for speedup (put by hash). + SpeedupMaxDisk string `default:"3Gi" example:"0" json:"speedupMaxDisk"` // This option allows you to disable speedup (put by hash) for large files. + SpeedupMaxMemory string `default:"32Mi" example:"0" json:"speedupMaxMemory"` // Files larger than the size given below will always be hashed on disk. + CheckHash bool `default:"true" example:"true" json:"checkHash"` // What should copy do if file checksum is mismatched or invalid. + UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. + Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createMailruStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config mailruConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -733,16 +733,16 @@ type createMailruStorageRequest struct { func createMailruStorage() {} type megaConfig struct { - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - Debug bool `json:"debug" default:"false"` // Output more debug from Mega. - HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. - UseHttps bool `json:"useHttps" default:"false"` // Use HTTPS for transfers. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + Debug bool `default:"false" json:"debug"` // Output more debug from Mega. + HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. + UseHttps bool `default:"false" json:"useHttps"` // Use HTTPS for transfers. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createMegaStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config megaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -761,14 +761,14 @@ type createMegaStorageRequest struct { func createMegaStorage() {} type netstorageConfig struct { - Protocol string `json:"protocol" default:"https" example:"http"` // Select between HTTP or HTTPS protocol. + Protocol string `default:"https" example:"http" json:"protocol"` // Select between HTTP or HTTPS protocol. Host string `json:"host"` // Domain+path of NetStorage host to connect to. Account string `json:"account"` // Set the NetStorage account name Secret string `json:"secret"` // Set the NetStorage account secret/G2O key for authentication. } type createNetstorageStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config netstorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -787,31 +787,31 @@ type createNetstorageStorageRequest struct { func createNetstorageStorage() {} type onedriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `json:"region" default:"global" example:"global"` // Choose national cloud region for OneDrive. - ChunkSize string `json:"chunkSize" default:"10Mi"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). - DriveId string `json:"driveId"` // The ID of the drive to use. - DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - AccessScopes string `json:"accessScopes" default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access"` // Set scopes to be requested by rclone. - DisableSitePermission bool `json:"disableSitePermission" default:"false"` // Disable the request for Sites.Read.All permission. - ExposeOnenoteFiles bool `json:"exposeOnenoteFiles" default:"false"` // Set to make OneNote files show up in directory listings. - ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk. - NoVersions bool `json:"noVersions" default:"false"` // Remove all versions on modifying operations. - LinkScope string `json:"linkScope" default:"anonymous" example:"anonymous"` // Set the scope of the links created by the link command. - LinkType string `json:"linkType" default:"view" example:"view"` // Set the type of the links created by the link command. - LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. - HashType string `json:"hashType" default:"auto" example:"auto"` // Specify the hash in use for the backend. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Region string `default:"global" example:"global" json:"region"` // Choose national cloud region for OneDrive. + ChunkSize string `default:"10Mi" json:"chunkSize"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). + DriveId string `json:"driveId"` // The ID of the drive to use. + DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + AccessScopes string `default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" json:"accessScopes"` // Set scopes to be requested by rclone. + DisableSitePermission bool `default:"false" json:"disableSitePermission"` // Disable the request for Sites.Read.All permission. + ExposeOnenoteFiles bool `default:"false" json:"exposeOnenoteFiles"` // Set to make OneNote files show up in directory listings. + ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk. + NoVersions bool `default:"false" json:"noVersions"` // Remove all versions on modifying operations. + LinkScope string `default:"anonymous" example:"anonymous" json:"linkScope"` // Set the scope of the links created by the link command. + LinkType string `default:"view" example:"view" json:"linkType"` // Set the type of the links created by the link command. + LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. + HashType string `default:"auto" example:"auto" json:"hashType"` // Specify the hash in use for the backend. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createOnedriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config onedriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -830,29 +830,29 @@ type createOnedriveStorageRequest struct { func createOnedriveStorage() {} type oosEnv_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosEnv_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosEnv_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -871,29 +871,29 @@ type createOosEnv_authStorageRequest struct { func createOosEnv_authStorage() {} type oosInstance_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosInstance_principal_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosInstance_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -912,28 +912,28 @@ type createOosInstance_principal_authStorageRequest struct { func createOosInstance_principal_authStorage() {} type oosNo_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosNo_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosNo_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -952,29 +952,29 @@ type createOosNo_authStorageRequest struct { func createOosNo_authStorage() {} type oosResource_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosResource_principal_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosResource_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -993,31 +993,31 @@ type createOosResource_principal_authStorageRequest struct { func createOosResource_principal_authStorage() {} type oosUser_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - ConfigFile string `json:"configFile" default:"~/.oci/config" example:"~/.oci/config"` // Path to OCI config file - ConfigProfile string `json:"configProfile" default:"Default" example:"Default"` // Profile name inside the oci config file - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + ConfigFile string `default:"~/.oci/config" example:"~/.oci/config" json:"configFile"` // Path to OCI config file + ConfigProfile string `default:"Default" example:"Default" json:"configProfile"` // Profile name inside the oci config file + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosUser_principal_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosUser_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1036,14 +1036,14 @@ type createOosUser_principal_authStorageRequest struct { func createOosUser_principal_authStorage() {} type opendriveConfig struct { - Username string `json:"username"` // Username. - Password string `json:"password"` // Password. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot"` // The encoding for the backend. - ChunkSize string `json:"chunkSize" default:"10Mi"` // Files will be uploaded in chunks this size. + Username string `json:"username"` // Username. + Password string `json:"password"` // Password. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ChunkSize string `default:"10Mi" json:"chunkSize"` // Files will be uploaded in chunks this size. } type createOpendriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config opendriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1062,20 +1062,20 @@ type createOpendriveStorageRequest struct { func createOpendriveStorage() {} type pcloudConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. - RootFolderId string `json:"rootFolderId" default:"d0"` // Fill in for rclone to use a non root folder as its starting point. - Hostname string `json:"hostname" default:"api.pcloud.com" example:"api.pcloud.com"` // Hostname to connect to. - Username string `json:"username"` // Your pcloud username. - Password string `json:"password"` // Your pcloud password. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + RootFolderId string `default:"d0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. + Hostname string `default:"api.pcloud.com" example:"api.pcloud.com" json:"hostname"` // Hostname to connect to. + Username string `json:"username"` // Your pcloud username. + Password string `json:"password"` // Your pcloud password. } type createPcloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config pcloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1095,11 +1095,11 @@ func createPcloudStorage() {} type premiumizemeConfig struct { ApiKey string `json:"apiKey"` // API Key. - Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createPremiumizemeStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config premiumizemeConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1118,11 +1118,11 @@ type createPremiumizemeStorageRequest struct { func createPremiumizemeStorage() {} type putioConfig struct { - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createPutioStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config putioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1141,20 +1141,20 @@ type createPutioStorageRequest struct { func createPutioStorage() {} type qingstorConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get QingStor credentials from runtime. - AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). - Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. - Zone string `json:"zone" example:"pek3a"` // Zone to connect to. - ConnectionRetries int `json:"connectionRetries" default:"3"` // Number of connection retries. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"4Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"1"` // Concurrency for multipart uploads. - Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8"` // The encoding for the backend. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get QingStor credentials from runtime. + AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). + Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. + Zone string `example:"pek3a" json:"zone"` // Zone to connect to. + ConnectionRetries int `default:"3" json:"connectionRetries"` // Number of connection retries. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"4Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"1" json:"uploadConcurrency"` // Concurrency for multipart uploads. + Encoding string `default:"Slash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createQingstorStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config qingstorConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1173,58 +1173,58 @@ type createQingstorStorageRequest struct { func createQingstorStorage() {} type s3AWSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"us-east-1"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint" example:""` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - RequesterPays bool `json:"requesterPays" default:"false"` // Enables requester pays option when interacting with S3 bucket. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - UseAccelerateEndpoint bool `json:"useAccelerateEndpoint" default:"false"` // If true use the AWS S3 accelerated endpoint. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata - StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"us-east-1" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `example:"" json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + RequesterPays bool `default:"false" json:"requesterPays"` // Enables requester pays option when interacting with S3 bucket. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + UseAccelerateEndpoint bool `default:"false" json:"useAccelerateEndpoint"` // If true use the AWS S3 accelerated endpoint. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. } type createS3AWSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AWSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1243,46 +1243,46 @@ type createS3AWSStorageRequest struct { func createS3AWSStorage() {} type s3AlibabaConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"oss-accelerate.aliyuncs.com"` // Endpoint for OSS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in OSS. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"oss-accelerate.aliyuncs.com" json:"endpoint"` // Endpoint for OSS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in OSS. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3AlibabaStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AlibabaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1301,47 +1301,47 @@ type createS3AlibabaStorageRequest struct { func createS3AlibabaStorage() {} type s3ArvanCloudConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"s3.ir-thr-at1.arvanstorage.com"` // Endpoint for Arvan Cloud Object Storage (AOS) API. - LocationConstraint string `json:"locationConstraint" example:"ir-thr-at1"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in ArvanCloud. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"s3.ir-thr-at1.arvanstorage.com" json:"endpoint"` // Endpoint for Arvan Cloud Object Storage (AOS) API. + LocationConstraint string `example:"ir-thr-at1" json:"locationConstraint"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in ArvanCloud. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3ArvanCloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ArvanCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1360,53 +1360,53 @@ type createS3ArvanCloudStorageRequest struct { func createS3ArvanCloudStorage() {} type s3CephConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3CephStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CephConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1425,52 +1425,52 @@ type createS3CephStorageRequest struct { func createS3CephStorage() {} type s3ChinaMobileConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"eos-wuxi-1.cmecloud.cn"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. - LocationConstraint string `json:"locationConstraint" example:"wuxi1"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in ChinaMobile. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"eos-wuxi-1.cmecloud.cn" json:"endpoint"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. + LocationConstraint string `example:"wuxi1" json:"locationConstraint"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in ChinaMobile. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3ChinaMobileStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ChinaMobileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1489,45 +1489,45 @@ type createS3ChinaMobileStorageRequest struct { func createS3ChinaMobileStorage() {} type s3CloudflareConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"auto"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"auto" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3CloudflareStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CloudflareConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1546,47 +1546,47 @@ type createS3CloudflareStorageRequest struct { func createS3CloudflareStorage() {} type s3DigitalOceanConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"syd1.digitaloceanspaces.com"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"syd1.digitaloceanspaces.com" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3DigitalOceanStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DigitalOceanConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1605,47 +1605,47 @@ type createS3DigitalOceanStorageRequest struct { func createS3DigitalOceanStorage() {} type s3DreamhostConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"objects-us-east-1.dream.io"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"objects-us-east-1.dream.io" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3DreamhostStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DreamhostConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1664,46 +1664,46 @@ type createS3DreamhostStorageRequest struct { func createS3DreamhostStorage() {} type s3HuaweiOBSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"af-south-1"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. - Endpoint string `json:"endpoint" example:"obs.af-south-1.myhuaweicloud.com"` // Endpoint for OBS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"af-south-1" json:"region"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. + Endpoint string `example:"obs.af-south-1.myhuaweicloud.com" json:"endpoint"` // Endpoint for OBS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3HuaweiOBSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3HuaweiOBSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1722,47 +1722,47 @@ type createS3HuaweiOBSStorageRequest struct { func createS3HuaweiOBSStorage() {} type s3IBMCOSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.us.cloud-object-storage.appdomain.cloud"` // Endpoint for IBM COS S3 API. - LocationConstraint string `json:"locationConstraint" example:"us-standard"` // Location constraint - must match endpoint when using IBM Cloud Public. - Acl string `json:"acl" example:"private"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.us.cloud-object-storage.appdomain.cloud" json:"endpoint"` // Endpoint for IBM COS S3 API. + LocationConstraint string `example:"us-standard" json:"locationConstraint"` // Location constraint - must match endpoint when using IBM Cloud Public. + Acl string `example:"private" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3IBMCOSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IBMCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1781,44 +1781,44 @@ type createS3IBMCOSStorageRequest struct { func createS3IBMCOSStorage() {} type s3IDriveConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3IDriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IDriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1837,46 +1837,46 @@ type createS3IDriveStorageRequest struct { func createS3IDriveStorage() {} type s3IONOSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"de"` // Region where your bucket will be created and your data stored. - Endpoint string `json:"endpoint" example:"s3-eu-central-1.ionoscloud.com"` // Endpoint for IONOS S3 Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"de" json:"region"` // Region where your bucket will be created and your data stored. + Endpoint string `example:"s3-eu-central-1.ionoscloud.com" json:"endpoint"` // Endpoint for IONOS S3 Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3IONOSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IONOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1895,46 +1895,46 @@ type createS3IONOSStorageRequest struct { func createS3IONOSStorage() {} type s3LiaraConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"storage.iran.liara.space"` // Endpoint for Liara Object Storage API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Liara - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"storage.iran.liara.space" json:"endpoint"` // Endpoint for Liara Object Storage API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Liara + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3LiaraStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LiaraConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1953,47 +1953,47 @@ type createS3LiaraStorageRequest struct { func createS3LiaraStorage() {} type s3LyveCloudConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.us-east-1.lyvecloud.seagate.com"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.us-east-1.lyvecloud.seagate.com" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3LyveCloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LyveCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2012,53 +2012,53 @@ type createS3LyveCloudStorageRequest struct { func createS3LyveCloudStorage() {} type s3MinioConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3MinioStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3MinioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2077,47 +2077,47 @@ type createS3MinioStorageRequest struct { func createS3MinioStorage() {} type s3NeteaseConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3NeteaseStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3NeteaseConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2136,47 +2136,47 @@ type createS3NeteaseStorageRequest struct { func createS3NeteaseStorage() {} type s3OtherConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3OtherStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3OtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2195,48 +2195,48 @@ type createS3OtherStorageRequest struct { func createS3OtherStorage() {} type s3QiniuConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"cn-east-1"` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3-cn-east-1.qiniucs.com"` // Endpoint for Qiniu Object Storage. - LocationConstraint string `json:"locationConstraint" example:"cn-east-1"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Qiniu. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"cn-east-1" json:"region"` // Region to connect to. + Endpoint string `example:"s3-cn-east-1.qiniucs.com" json:"endpoint"` // Endpoint for Qiniu Object Storage. + LocationConstraint string `example:"cn-east-1" json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Qiniu. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3QiniuStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3QiniuConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2255,47 +2255,47 @@ type createS3QiniuStorageRequest struct { func createS3QiniuStorage() {} type s3RackCorpConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"global"` // region - the location where your bucket will be created and your data stored. - Endpoint string `json:"endpoint" example:"s3.rackcorp.com"` // Endpoint for RackCorp Object Storage. - LocationConstraint string `json:"locationConstraint" example:"global"` // Location constraint - the location where your bucket will be located and your data stored. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"global" json:"region"` // region - the location where your bucket will be created and your data stored. + Endpoint string `example:"s3.rackcorp.com" json:"endpoint"` // Endpoint for RackCorp Object Storage. + LocationConstraint string `example:"global" json:"locationConstraint"` // Location constraint - the location where your bucket will be located and your data stored. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3RackCorpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3RackCorpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2314,47 +2314,47 @@ type createS3RackCorpStorageRequest struct { func createS3RackCorpStorage() {} type s3ScalewayConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"nl-ams"` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.nl-ams.scw.cloud"` // Endpoint for Scaleway Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"nl-ams" json:"region"` // Region to connect to. + Endpoint string `example:"s3.nl-ams.scw.cloud" json:"endpoint"` // Endpoint for Scaleway Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3ScalewayStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ScalewayConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2373,47 +2373,47 @@ type createS3ScalewayStorageRequest struct { func createS3ScalewayStorage() {} type s3SeaweedFSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"localhost:8333"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"localhost:8333" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3SeaweedFSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3SeaweedFSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2432,46 +2432,46 @@ type createS3SeaweedFSStorageRequest struct { func createS3SeaweedFSStorage() {} type s3StackPathConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.us-east-2.stackpathstorage.com"` // Endpoint for StackPath Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.us-east-2.stackpathstorage.com" json:"endpoint"` // Endpoint for StackPath Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3StackPathStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StackPathConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2490,44 +2490,44 @@ type createS3StackPathStorageRequest struct { func createS3StackPathStorage() {} type s3StorjConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"gateway.storjshare.io"` // Endpoint for Storj Gateway. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"gateway.storjshare.io" json:"endpoint"` // Endpoint for Storj Gateway. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3StorjStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StorjConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2546,46 +2546,46 @@ type createS3StorjStorageRequest struct { func createS3StorjStorage() {} type s3TencentCOSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"cos.ap-beijing.myqcloud.com"` // Endpoint for Tencent COS API. - Acl string `json:"acl" example:"default"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in Tencent COS. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"cos.ap-beijing.myqcloud.com" json:"endpoint"` // Endpoint for Tencent COS API. + Acl string `example:"default" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in Tencent COS. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3TencentCOSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3TencentCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2604,47 +2604,47 @@ type createS3TencentCOSStorageRequest struct { func createS3TencentCOSStorage() {} type s3WasabiConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.wasabisys.com"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.wasabisys.com" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3WasabiStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3WasabiConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2663,19 +2663,19 @@ type createS3WasabiStorageRequest struct { func createS3WasabiStorage() {} type seafileConfig struct { - Url string `json:"url" example:"https://cloud.seafile.com/"` // URL of seafile host to connect to. - User string `json:"user"` // User name (usually email address). - Pass string `json:"pass"` // Password. - TwoFA bool `json:"2fa" default:"false"` // Two-factor authentication ('true' if the account has 2FA enabled). - Library string `json:"library"` // Name of the library. - LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). - CreateLibrary bool `json:"createLibrary" default:"false"` // Should rclone create a library if it doesn't exist. - AuthToken string `json:"authToken"` // Authentication token. - Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8"` // The encoding for the backend. + Url string `example:"https://cloud.seafile.com/" json:"url"` // URL of seafile host to connect to. + User string `json:"user"` // User name (usually email address). + Pass string `json:"pass"` // Password. + TwoFA bool `default:"false" json:"2fa"` // Two-factor authentication ('true' if the account has 2FA enabled). + Library string `json:"library"` // Name of the library. + LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). + CreateLibrary bool `default:"false" json:"createLibrary"` // Should rclone create a library if it doesn't exist. + AuthToken string `json:"authToken"` // Authentication token. + Encoding string `default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createSeafileStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config seafileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2694,41 +2694,41 @@ type createSeafileStorageRequest struct { func createSeafileStorage() {} type sftpConfig struct { - Host string `json:"host"` // SSH host to connect to. - User string `json:"user" default:"$USER"` // SSH username. - Port int `json:"port" default:"22"` // SSH port number. - Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. - KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. - KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. - KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. - PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. - KnownHostsFile string `json:"knownHostsFile" example:"~/.ssh/known_hosts"` // Optional path to known_hosts file. - KeyUseAgent bool `json:"keyUseAgent" default:"false"` // When set forces the usage of the ssh-agent. - UseInsecureCipher bool `json:"useInsecureCipher" default:"false" example:"false"` // Enable the use of insecure ciphers and key exchange methods. - DisableHashcheck bool `json:"disableHashcheck" default:"false"` // Disable the execution of SSH commands to determine if remote file hashing is available. - AskPassword bool `json:"askPassword" default:"false"` // Allow asking for SFTP password when needed. - PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. - SetModtime bool `json:"setModtime" default:"true"` // Set the modified time on the remote if set. - ShellType string `json:"shellType" example:"none"` // The type of SSH shell on remote server, if any. - Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. - Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. - SkipLinks bool `json:"skipLinks" default:"false"` // Set to skip any symlinks and any other non regular files. - Subsystem string `json:"subsystem" default:"sftp"` // Specifies the SSH2 subsystem on the remote host. - ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. - UseFstat bool `json:"useFstat" default:"false"` // If set use fstat instead of stat. - DisableConcurrentReads bool `json:"disableConcurrentReads" default:"false"` // If set don't use concurrent reads. - DisableConcurrentWrites bool `json:"disableConcurrentWrites" default:"false"` // If set don't use concurrent writes. - IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. - ChunkSize string `json:"chunkSize" default:"32Ki"` // Upload and download chunk size. - Concurrency int `json:"concurrency" default:"64"` // The maximum number of outstanding requests for one file - SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands - Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. - KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. - Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. + Host string `json:"host"` // SSH host to connect to. + User string `default:"$USER" json:"user"` // SSH username. + Port int `default:"22" json:"port"` // SSH port number. + Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. + KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. + KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. + KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. + PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. + KnownHostsFile string `example:"~/.ssh/known_hosts" json:"knownHostsFile"` // Optional path to known_hosts file. + KeyUseAgent bool `default:"false" json:"keyUseAgent"` // When set forces the usage of the ssh-agent. + UseInsecureCipher bool `default:"false" example:"false" json:"useInsecureCipher"` // Enable the use of insecure ciphers and key exchange methods. + DisableHashcheck bool `default:"false" json:"disableHashcheck"` // Disable the execution of SSH commands to determine if remote file hashing is available. + AskPassword bool `default:"false" json:"askPassword"` // Allow asking for SFTP password when needed. + PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. + SetModtime bool `default:"true" json:"setModtime"` // Set the modified time on the remote if set. + ShellType string `example:"none" json:"shellType"` // The type of SSH shell on remote server, if any. + Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. + Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. + SkipLinks bool `default:"false" json:"skipLinks"` // Set to skip any symlinks and any other non regular files. + Subsystem string `default:"sftp" json:"subsystem"` // Specifies the SSH2 subsystem on the remote host. + ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. + UseFstat bool `default:"false" json:"useFstat"` // If set use fstat instead of stat. + DisableConcurrentReads bool `default:"false" json:"disableConcurrentReads"` // If set don't use concurrent reads. + DisableConcurrentWrites bool `default:"false" json:"disableConcurrentWrites"` // If set don't use concurrent writes. + IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. + ChunkSize string `default:"32Ki" json:"chunkSize"` // Upload and download chunk size. + Concurrency int `default:"64" json:"concurrency"` // The maximum number of outstanding requests for one file + SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands + Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. + KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. + Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. } type createSftpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2747,15 +2747,15 @@ type createSftpStorageRequest struct { func createSftpStorage() {} type sharefileConfig struct { - UploadCutoff string `json:"uploadCutoff" default:"128Mi"` // Cutoff for switching to multipart upload. - RootFolderId string `json:"rootFolderId" example:""` // ID of the root folder. - ChunkSize string `json:"chunkSize" default:"64Mi"` // Upload chunk size. - Endpoint string `json:"endpoint"` // Endpoint for API calls. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. + UploadCutoff string `default:"128Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload. + RootFolderId string `example:"" json:"rootFolderId"` // ID of the root folder. + ChunkSize string `default:"64Mi" json:"chunkSize"` // Upload chunk size. + Endpoint string `json:"endpoint"` // Endpoint for API calls. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSharefileStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sharefileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2774,14 +2774,14 @@ type createSharefileStorageRequest struct { func createSharefileStorage() {} type siaConfig struct { - ApiUrl string `json:"apiUrl" default:"http://127.0.0.1:9980"` // Sia daemon API URL, like http://sia.daemon.host:9980. - ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. - UserAgent string `json:"userAgent" default:"Sia-Agent"` // Siad User Agent - Encoding string `json:"encoding" default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + ApiUrl string `default:"http://127.0.0.1:9980" json:"apiUrl"` // Sia daemon API URL, like http://sia.daemon.host:9980. + ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. + UserAgent string `default:"Sia-Agent" json:"userAgent"` // Siad User Agent + Encoding string `default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSiaStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config siaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2800,20 +2800,20 @@ type createSiaStorageRequest struct { func createSiaStorage() {} type smbConfig struct { - Host string `json:"host"` // SMB server hostname to connect to. - User string `json:"user" default:"$USER"` // SMB username. - Port int `json:"port" default:"445"` // SMB port number. - Pass string `json:"pass"` // SMB password. - Domain string `json:"domain" default:"WORKGROUP"` // Domain name for NTLM authentication. - Spn string `json:"spn"` // Service principal name. - IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. - HideSpecialShare bool `json:"hideSpecialShare" default:"true"` // Hide special shares (e.g. print$) which users aren't supposed to access. - CaseInsensitive bool `json:"caseInsensitive" default:"true"` // Whether the server is configured to be case-insensitive. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. + Host string `json:"host"` // SMB server hostname to connect to. + User string `default:"$USER" json:"user"` // SMB username. + Port int `default:"445" json:"port"` // SMB port number. + Pass string `json:"pass"` // SMB password. + Domain string `default:"WORKGROUP" json:"domain"` // Domain name for NTLM authentication. + Spn string `json:"spn"` // Service principal name. + IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. + HideSpecialShare bool `default:"true" json:"hideSpecialShare"` // Hide special shares (e.g. print$) which users aren't supposed to access. + CaseInsensitive bool `default:"true" json:"caseInsensitive"` // Whether the server is configured to be case-insensitive. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSmbStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config smbConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2836,7 +2836,7 @@ type storjExistingConfig struct { } type createStorjExistingStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjExistingConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2855,13 +2855,13 @@ type createStorjExistingStorageRequest struct { func createStorjExistingStorage() {} type storjNewConfig struct { - SatelliteAddress string `json:"satelliteAddress" default:"us1.storj.io" example:"us1.storj.io"` // Satellite address. + SatelliteAddress string `default:"us1.storj.io" example:"us1.storj.io" json:"satelliteAddress"` // Satellite address. ApiKey string `json:"apiKey"` // API key. Passphrase string `json:"passphrase"` // Encryption passphrase. } type createStorjNewStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjNewConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2880,21 +2880,21 @@ type createStorjNewStorageRequest struct { func createStorjNewStorage() {} type sugarsyncConfig struct { - AppId string `json:"appId"` // Sugarsync App ID. - AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. - PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. - HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files if true - RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. - Authorization string `json:"authorization"` // Sugarsync authorization. - AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. - User string `json:"user"` // Sugarsync user. - RootId string `json:"rootId"` // Sugarsync root id. - DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. - Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + AppId string `json:"appId"` // Sugarsync App ID. + AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. + PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. + HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files if true + RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. + Authorization string `json:"authorization"` // Sugarsync authorization. + AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. + User string `json:"user"` // Sugarsync user. + RootId string `json:"rootId"` // Sugarsync root id. + DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. + Encoding string `default:"Slash,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSugarsyncStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sugarsyncConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2913,33 +2913,33 @@ type createSugarsyncStorageRequest struct { func createSugarsyncStorage() {} type swiftConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get swift credentials from environment variables in standard OpenStack form. - User string `json:"user"` // User name to log in (OS_USERNAME). - Key string `json:"key"` // API key or password (OS_PASSWORD). - Auth string `json:"auth" example:"https://auth.api.rackspacecloud.com/v1.0"` // Authentication URL for server (OS_AUTH_URL). - UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). - Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) - Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). - TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). - TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). - Region string `json:"region"` // Region name - optional (OS_REGION_NAME). - StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). - AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). - ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). - ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). - ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). - AuthVersion int `json:"authVersion" default:"0"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). - EndpointType string `json:"endpointType" default:"public" example:"public"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure. - StoragePolicy string `json:"storagePolicy" example:""` // The storage policy to use when creating a new container. - ChunkSize string `json:"chunkSize" default:"5Gi"` // Above this size files will be chunked into a _segments container. - NoChunk bool `json:"noChunk" default:"false"` // Don't chunk files during streaming upload. - NoLargeObjects bool `json:"noLargeObjects" default:"false"` // Disable support for static and dynamic large objects - Encoding string `json:"encoding" default:"Slash,InvalidUtf8"` // The encoding for the backend. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get swift credentials from environment variables in standard OpenStack form. + User string `json:"user"` // User name to log in (OS_USERNAME). + Key string `json:"key"` // API key or password (OS_PASSWORD). + Auth string `example:"https://auth.api.rackspacecloud.com/v1.0" json:"auth"` // Authentication URL for server (OS_AUTH_URL). + UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). + Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) + Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). + TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). + TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). + Region string `json:"region"` // Region name - optional (OS_REGION_NAME). + StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). + AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). + ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). + ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). + ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). + AuthVersion int `default:"0" json:"authVersion"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). + EndpointType string `default:"public" example:"public" json:"endpointType"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure. + StoragePolicy string `example:"" json:"storagePolicy"` // The storage policy to use when creating a new container. + ChunkSize string `default:"5Gi" json:"chunkSize"` // Above this size files will be chunked into a _segments container. + NoChunk bool `default:"false" json:"noChunk"` // Don't chunk files during streaming upload. + NoLargeObjects bool `default:"false" json:"noLargeObjects"` // Disable support for static and dynamic large objects + Encoding string `default:"Slash,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createSwiftStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config swiftConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2958,16 +2958,16 @@ type createSwiftStorageRequest struct { func createSwiftStorage() {} type unionConfig struct { - Upstreams string `json:"upstreams"` // List of space separated upstreams. - ActionPolicy string `json:"actionPolicy" default:"epall"` // Policy to choose upstream on ACTION category. - CreatePolicy string `json:"createPolicy" default:"epmfs"` // Policy to choose upstream on CREATE category. - SearchPolicy string `json:"searchPolicy" default:"ff"` // Policy to choose upstream on SEARCH category. - CacheTime int `json:"cacheTime" default:"120"` // Cache time of usage and free space (in seconds). - MinFreeSpace string `json:"minFreeSpace" default:"1Gi"` // Minimum viable free space for lfs/eplfs policies. + Upstreams string `json:"upstreams"` // List of space separated upstreams. + ActionPolicy string `default:"epall" json:"actionPolicy"` // Policy to choose upstream on ACTION category. + CreatePolicy string `default:"epmfs" json:"createPolicy"` // Policy to choose upstream on CREATE category. + SearchPolicy string `default:"ff" json:"searchPolicy"` // Policy to choose upstream on SEARCH category. + CacheTime int `default:"120" json:"cacheTime"` // Cache time of usage and free space (in seconds). + MinFreeSpace string `default:"1Gi" json:"minFreeSpace"` // Minimum viable free space for lfs/eplfs policies. } type createUnionStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config unionConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2987,11 +2987,11 @@ func createUnionStorage() {} type uptoboxConfig struct { AccessToken string `json:"accessToken"` // Your access token. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createUptoboxStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config uptoboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3010,18 +3010,18 @@ type createUptoboxStorageRequest struct { func createUptoboxStorage() {} type webdavConfig struct { - Url string `json:"url"` // URL of http host to connect to. - Vendor string `json:"vendor" example:"nextcloud"` // Name of the WebDAV site/service/software you are using. - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). - BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. - Encoding string `json:"encoding"` // The encoding for the backend. - Headers string `json:"headers"` // Set HTTP headers for all transactions. + Url string `json:"url"` // URL of http host to connect to. + Vendor string `example:"nextcloud" json:"vendor"` // Name of the WebDAV site/service/software you are using. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). + BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. + Encoding string `json:"encoding"` // The encoding for the backend. + Headers string `json:"headers"` // Set HTTP headers for all transactions. } type createWebdavStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config webdavConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3040,17 +3040,17 @@ type createWebdavStorageRequest struct { func createWebdavStorage() {} type yandexConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. - Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. + Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createYandexStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config yandexConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3074,12 +3074,12 @@ type zohoConfig struct { Token string `json:"token"` // OAuth Access Token as a JSON blob. AuthUrl string `json:"authUrl"` // Auth server URL. TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `json:"region" example:"com"` // Zoho region to connect to. - Encoding string `json:"encoding" default:"Del,Ctl,InvalidUtf8"` // The encoding for the backend. + Region string `example:"com" json:"region"` // Zoho region to connect to. + Encoding string `default:"Del,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createZohoStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config zohoConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go index 3adbfb5c..bd45e658 100644 --- a/handler/wallet/create_test.go +++ b/handler/wallet/create_test.go @@ -22,7 +22,6 @@ func TestCreateHandler(t *testing.T) { require.Equal(t, "f1", w.Address[:2]) require.Equal(t, "hello", w.PrivateKey) - _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ PrivateKey: w.PrivateKey, }) diff --git a/migrate/migrations/202505010830_initial_schema.go b/migrate/migrations/202505010830_initial_schema.go index 009c8d2e..989f3795 100644 --- a/migrate/migrations/202505010830_initial_schema.go +++ b/migrate/migrations/202505010830_initial_schema.go @@ -56,18 +56,18 @@ type Wallet struct { } type PreparationID uint32 type Preparation struct { - ID PreparationID `gorm:"primaryKey" json:"id"` - Name string `gorm:"unique" json:"name"` - CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + ID PreparationID `gorm:"primaryKey" json:"id"` + Name string `gorm:"unique" json:"name"` + CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` DeleteAfterExport bool `json:"deleteAfterExport"` // DeleteAfterExport is a flag that indicates whether the source files should be deleted after export. MaxSize int64 `json:"maxSize"` PieceSize int64 `json:"pieceSize"` NoInline bool `json:"noInline"` NoDag bool `json:"noDag"` - Wallets []Wallet `gorm:"many2many:wallet_assignments" json:"wallets,omitempty" swaggerignore:"true" table:"expand"` - SourceStorages []Storage `gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"sourceStorages,omitempty" table:"expand;header:Source Storages:"` - OutputStorages []Storage `gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"outputStorages,omitempty" table:"expand;header:Output Storages:"` + Wallets []Wallet `gorm:"many2many:wallet_assignments" json:"wallets,omitempty" swaggerignore:"true" table:"expand"` + SourceStorages []Storage `gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"sourceStorages,omitempty" table:"expand;header:Source Storages:"` + OutputStorages []Storage `gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"outputStorages,omitempty" table:"expand;header:Output Storages:"` } func (s *Preparation) FindByIDOrName(db *gorm.DB, name string, preloads ...string) error { @@ -95,36 +95,36 @@ func (s *Preparation) SourceAttachments(db *gorm.DB, preloads ...string) ([]Sour type StorageID uint32 type Storage struct { - ID StorageID `cbor:"-" gorm:"primaryKey" json:"id"` - Name string `cbor:"-" gorm:"unique" json:"name"` - CreatedAt time.Time `cbor:"-" json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `cbor:"-" json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + ID StorageID `cbor:"-" gorm:"primaryKey" json:"id"` + Name string `cbor:"-" gorm:"unique" json:"name"` + CreatedAt time.Time `cbor:"-" json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `cbor:"-" json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` Type string `cbor:"1,keyasint,omitempty" json:"type"` - Path string `cbor:"2,keyasint,omitempty" json:"path"` // Path is the path to the storage root. - Config ConfigMap `cbor:"3,keyasint,omitempty" gorm:"type:JSON" json:"config" table:"verbose"` // Config is a map of key-value pairs that can be used to store RClone options. - ClientConfig ClientConfig `cbor:"4,keyasint,omitempty" gorm:"type:JSON" json:"clientConfig" table:"verbose"` // ClientConfig is the HTTP configuration for the storage, if applicable. - PreparationsAsSource []Preparation `cbor:"-" gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsSource,omitempty" table:"expand;header:As Source: "` - PreparationsAsOutput []Preparation `cbor:"-" gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsOutput,omitempty" table:"expand;header:As Output: "` + Path string `cbor:"2,keyasint,omitempty" json:"path"` // Path is the path to the storage root. + Config ConfigMap `cbor:"3,keyasint,omitempty" gorm:"type:JSON" json:"config" table:"verbose"` // Config is a map of key-value pairs that can be used to store RClone options. + ClientConfig ClientConfig `cbor:"4,keyasint,omitempty" gorm:"type:JSON" json:"clientConfig" table:"verbose"` // ClientConfig is the HTTP configuration for the storage, if applicable. + PreparationsAsSource []Preparation `cbor:"-" gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsSource,omitempty" table:"expand;header:As Source: "` + PreparationsAsOutput []Preparation `cbor:"-" gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsOutput,omitempty" table:"expand;header:As Output: "` } type ScheduleID uint32 type ScheduleState string type Schedule struct { - ID ScheduleID `gorm:"primaryKey" json:"id"` - CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` - URLTemplate string `json:"urlTemplate" table:"verbose"` - HTTPHeaders ConfigMap `gorm:"type:JSON" json:"httpHeaders" table:"verbose"` + ID ScheduleID `gorm:"primaryKey" json:"id"` + CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + URLTemplate string `json:"urlTemplate" table:"verbose"` + HTTPHeaders ConfigMap `gorm:"type:JSON" json:"httpHeaders" table:"verbose"` Provider string `json:"provider"` - PricePerGBEpoch float64 `json:"pricePerGbEpoch" table:"verbose"` - PricePerGB float64 `json:"pricePerGb" table:"verbose"` - PricePerDeal float64 `json:"pricePerDeal" table:"verbose"` - TotalDealNumber int `json:"totalDealNumber" table:"verbose"` + PricePerGBEpoch float64 `json:"pricePerGbEpoch" table:"verbose"` + PricePerGB float64 `json:"pricePerGb" table:"verbose"` + PricePerDeal float64 `json:"pricePerDeal" table:"verbose"` + TotalDealNumber int `json:"totalDealNumber" table:"verbose"` TotalDealSize int64 `json:"totalDealSize"` Verified bool `json:"verified"` - KeepUnsealed bool `json:"keepUnsealed" table:"verbose"` - AnnounceToIPNI bool `gorm:"column:announce_to_ipni" json:"announceToIpni" table:"verbose"` - StartDelay time.Duration `json:"startDelay" swaggertype:"primitive,integer"` - Duration time.Duration `json:"duration" swaggertype:"primitive,integer"` + KeepUnsealed bool `json:"keepUnsealed" table:"verbose"` + AnnounceToIPNI bool `gorm:"column:announce_to_ipni" json:"announceToIpni" table:"verbose"` + StartDelay time.Duration `json:"startDelay" swaggertype:"primitive,integer"` + Duration time.Duration `json:"duration" swaggertype:"primitive,integer"` State ScheduleState `json:"state"` ScheduleCron string `json:"scheduleCron"` ScheduleCronPerpetual bool `json:"scheduleCronPerpetual"` @@ -133,36 +133,36 @@ type Schedule struct { MaxPendingDealNumber int `json:"maxPendingDealNumber"` MaxPendingDealSize int64 `json:"maxPendingDealSize"` Notes string `json:"notes"` - ErrorMessage string `json:"errorMessage" table:"verbose"` - AllowedPieceCIDs StringSlice `gorm:"type:JSON;column:allowed_piece_cids" json:"allowedPieceCids" table:"verbose"` + ErrorMessage string `json:"errorMessage" table:"verbose"` + AllowedPieceCIDs StringSlice `gorm:"type:JSON;column:allowed_piece_cids" json:"allowedPieceCids" table:"verbose"` Force bool `json:"force"` PreparationID PreparationID `json:"preparationId"` - Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` + Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` } type DealState string type DealID uint64 type Deal struct { - ID DealID `gorm:"primaryKey" json:"id" table:"verbose"` - CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` - LastVerifiedAt *time.Time `json:"lastVerifiedAt" table:"verbose;format:2006-01-02 15:04:05"` // LastVerifiedAt is the last time the deal was verified as active by the tracker - DealID *uint64 `gorm:"unique" json:"dealId"` - State DealState `gorm:"index:idx_pending" json:"state"` + ID DealID `gorm:"primaryKey" json:"id" table:"verbose"` + CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` + UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` + LastVerifiedAt *time.Time `json:"lastVerifiedAt" table:"verbose;format:2006-01-02 15:04:05"` // LastVerifiedAt is the last time the deal was verified as active by the tracker + DealID *uint64 `gorm:"unique" json:"dealId"` + State DealState `gorm:"index:idx_pending" json:"state"` Provider string `json:"provider"` - ProposalID string `json:"proposalId" table:"verbose"` - Label string `json:"label" table:"verbose"` - PieceCID CID `gorm:"column:piece_cid;index;size:255" json:"pieceCid" swaggertype:"string"` + ProposalID string `json:"proposalId" table:"verbose"` + Label string `json:"label" table:"verbose"` + PieceCID CID `gorm:"column:piece_cid;index;size:255" json:"pieceCid" swaggertype:"string"` PieceSize int64 `json:"pieceSize"` StartEpoch int32 `json:"startEpoch"` - EndEpoch int32 `json:"endEpoch" table:"verbose"` - SectorStartEpoch int32 `json:"sectorStartEpoch" table:"verbose"` + EndEpoch int32 `json:"endEpoch" table:"verbose"` + SectorStartEpoch int32 `json:"sectorStartEpoch" table:"verbose"` Price string `json:"price"` Verified bool `json:"verified"` - ErrorMessage string `json:"errorMessage" table:"verbose"` + ErrorMessage string `json:"errorMessage" table:"verbose"` ScheduleID *ScheduleID `json:"scheduleId" table:"verbose"` - Schedule *Schedule `gorm:"foreignKey:ScheduleID;constraint:OnDelete:SET NULL" json:"schedule,omitempty" swaggerignore:"true" table:"expand"` + Schedule *Schedule `gorm:"foreignKey:ScheduleID;constraint:OnDelete:SET NULL" json:"schedule,omitempty" swaggerignore:"true" table:"expand"` ClientID string `gorm:"index:idx_pending" json:"clientId"` - Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` + Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` } type OutputAttachment struct { ID uint32 `gorm:"primaryKey"` diff --git a/migrate/migrations/202505010840_wallet_actor_id.go b/migrate/migrations/202505010840_wallet_actor_id.go index 46355584..3f7b7e58 100644 --- a/migrate/migrations/202505010840_wallet_actor_id.go +++ b/migrate/migrations/202505010840_wallet_actor_id.go @@ -1,6 +1,8 @@ package migrations import ( + "time" + "github.com/go-gormigrate/gormigrate/v2" "gorm.io/gorm" ) @@ -25,16 +27,17 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { // Temporary struct for new schema type NewWallet struct { - ID uint `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet - ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet - Balance float64 `json:"balance"` // Balance is in Fil cached from chain - BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets - Location string `json:"location"` // Location is optional region, country for SP wallets - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - Type WalletType `json:"type"` // Type determines user or SP wallets + ID uint `gorm:"primaryKey" json:"id"` + ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet + ActorName string `json:"actorName"` // ActorName is readable label for the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + Balance float64 `json:"balance"` // Balance is in Fil cached from chain + BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain + BalanceUpdatedAt time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets + Location string `json:"location"` // Location is optional region, country for SP wallets + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + Type WalletType `json:"type"` // Type determines user or SP wallets } return &gormigrate.Migration{ @@ -57,6 +60,7 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { ActorID: oldWallet.ID, Address: oldWallet.Address, PrivateKey: oldWallet.PrivateKey, + Type: UserWallet, } if err := tx.Create(&newWallet).Error; err != nil { return err diff --git a/model/migrate.go b/model/migrate.go index ce44ba80..2a8a945d 100644 --- a/model/migrate.go +++ b/model/migrate.go @@ -3,7 +3,6 @@ package model import ( "crypto/rand" "encoding/base64" - "fmt" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/migrate/migrations" @@ -84,7 +83,7 @@ func _init(db *gorm.DB) error { for _, m := range migrations.GetMigrations()[1:] { err = m.Migrate(db) if err != nil { - return errors.Wrap(err, fmt.Sprintf("failed to run migration with ID: %s", m.ID)) + return errors.Wrap(err, "failed to run migration with ID: "+m.ID) } } } else { @@ -169,7 +168,7 @@ func (m *migrator) GetLastMigration() (string, error) { // Has migration ID ran func (m *migrator) HasRunMigration(id string) (bool, error) { var count int64 - err := m.db.Table(m.Options.TableName).Where(fmt.Sprintf("%s = ?", m.Options.IDColumnName), id).Count(&count).Error + err := m.db.Table(m.Options.TableName).Where(m.Options.IDColumnName+" = ?", id).Count(&count).Error return count > 0, err } diff --git a/model/replication.go b/model/replication.go index b8edc550..066e8291 100644 --- a/model/replication.go +++ b/model/replication.go @@ -149,14 +149,15 @@ const ( ) type Wallet struct { - ID uint `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet - ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet - Balance float64 `json:"balance"` // Balance is in Fil cached from chain - BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets - Location string `json:"location"` // Location is optional region, country for SP wallets - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - Type WalletType `json:"type"` // Type determines user or SP wallets + ID uint `gorm:"primaryKey" json:"id"` + ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet + ActorName string `json:"actorName"` // ActorName is readable label for the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + Balance float64 `json:"balance"` // Balance is in Fil cached from chain + BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain + BalanceUpdatedAt time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets + Location string `json:"location"` // Location is optional region, country for SP wallets + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + Type WalletType `json:"type"` // Type determines user or SP wallets } diff --git a/replication/makedeal.go b/replication/makedeal.go index de4ad8ae..c85e0f98 100644 --- a/replication/makedeal.go +++ b/replication/makedeal.go @@ -9,8 +9,6 @@ import ( "strings" "time" - "slices" - "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/analytics" "github.com/data-preservation-programs/singularity/model" From 9b3f238bee31da5a9ee9c6016896a7b3abd5d50c Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Thu, 5 Jun 2025 23:05:30 -0400 Subject: [PATCH 35/39] fix: tests --- .../http/wallet/create_wallet_responses.go | 8 +- client/swagger/models/model_deal.go | 5 +- client/swagger/models/model_wallet.go | 41 +- cmd/deal_test.go | 12 +- docs/en/SUMMARY.md | 1 + docs/en/cli-reference/admin/migrate/README.md | 1 + docs/en/cli-reference/admin/migrate/which.md | 14 + docs/swagger/docs.go | 23 +- docs/swagger/swagger.json | 23 +- docs/swagger/swagger.yaml | 18 +- handler/deal/list_test.go | 3 +- handler/deal/schedule/remove_test.go | 2 +- handler/deal/send-manual.go | 4 +- handler/file/deals_test.go | 9 +- handler/file/retrieve_test.go | 16 +- handler/storage/types_gen.go | 3046 ++++++++--------- handler/wallet/attach.go | 2 +- handler/wallet/create.go | 33 +- handler/wallet/create_test.go | 17 +- handler/wallet/remove.go | 8 +- .../202505010840_wallet_actor_id.go | 108 +- model/replication.go | 66 +- replication/makedeal.go | 19 +- replication/wallet_test.go | 9 +- service/dealpusher/dealpusher.go | 3 - service/dealpusher/dealpusher_test.go | 92 +- service/dealtracker/dealtracker.go | 16 +- service/dealtracker/dealtracker_test.go | 23 +- testdb/main.go | 11 +- 29 files changed, 1926 insertions(+), 1707 deletions(-) create mode 100644 docs/en/cli-reference/admin/migrate/which.md diff --git a/client/swagger/http/wallet/create_wallet_responses.go b/client/swagger/http/wallet/create_wallet_responses.go index a424a6f1..14c6fef9 100644 --- a/client/swagger/http/wallet/create_wallet_responses.go +++ b/client/swagger/http/wallet/create_wallet_responses.go @@ -58,7 +58,7 @@ CreateWalletOK describes a response with status code 200, with default header va OK */ type CreateWalletOK struct { - Payload []*models.ModelWallet + Payload *models.ModelWallet } // IsSuccess returns true when this create wallet o k response has a 2xx status code @@ -101,14 +101,16 @@ func (o *CreateWalletOK) String() string { return fmt.Sprintf("[POST /wallet/create][%d] createWalletOK %s", 200, payload) } -func (o *CreateWalletOK) GetPayload() []*models.ModelWallet { +func (o *CreateWalletOK) GetPayload() *models.ModelWallet { return o.Payload } func (o *CreateWalletOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.ModelWallet) + // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } diff --git a/client/swagger/models/model_deal.go b/client/swagger/models/model_deal.go index eb73cbea..6d760f88 100644 --- a/client/swagger/models/model_deal.go +++ b/client/swagger/models/model_deal.go @@ -18,8 +18,11 @@ import ( // swagger:model model.Deal type ModelDeal struct { + // client actor Id + ClientActorID string `json:"clientActorId,omitempty"` + // client Id - ClientID string `json:"clientId,omitempty"` + ClientID int64 `json:"clientId,omitempty"` // created at CreatedAt string `json:"createdAt,omitempty"` diff --git a/client/swagger/models/model_wallet.go b/client/swagger/models/model_wallet.go index 1b18a08a..c6196011 100644 --- a/client/swagger/models/model_wallet.go +++ b/client/swagger/models/model_wallet.go @@ -33,6 +33,9 @@ type ModelWallet struct { // BalancePlus is in Fil+ cached from chain BalancePlus float64 `json:"balancePlus,omitempty"` + // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + BalanceUpdatedAt string `json:"balanceUpdatedAt,omitempty"` + // ContactInfo is optional email for SP wallets ContactInfo string `json:"contactInfo,omitempty"` @@ -45,17 +48,15 @@ type ModelWallet struct { // PrivateKey is the private key of the wallet PrivateKey string `json:"privateKey,omitempty"` - // Type determines user or SP wallets - Type struct { - ModelWalletType - } `json:"type,omitempty"` + // wallet type + WalletType ModelWalletType `json:"walletType,omitempty"` } // Validate validates this model wallet func (m *ModelWallet) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateType(formats); err != nil { + if err := m.validateWalletType(formats); err != nil { res = append(res, err) } @@ -65,11 +66,20 @@ func (m *ModelWallet) Validate(formats strfmt.Registry) error { return nil } -func (m *ModelWallet) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required +func (m *ModelWallet) validateWalletType(formats strfmt.Registry) error { + if swag.IsZero(m.WalletType) { // not required return nil } + if err := m.WalletType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("walletType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("walletType") + } + return err + } + return nil } @@ -77,7 +87,7 @@ func (m *ModelWallet) validateType(formats strfmt.Registry) error { func (m *ModelWallet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateType(ctx, formats); err != nil { + if err := m.contextValidateWalletType(ctx, formats); err != nil { res = append(res, err) } @@ -87,7 +97,20 @@ func (m *ModelWallet) ContextValidate(ctx context.Context, formats strfmt.Regist return nil } -func (m *ModelWallet) contextValidateType(ctx context.Context, formats strfmt.Registry) error { +func (m *ModelWallet) contextValidateWalletType(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.WalletType) { // not required + return nil + } + + if err := m.WalletType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("walletType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("walletType") + } + return err + } return nil } diff --git a/cmd/deal_test.go b/cmd/deal_test.go index 055ab051..fd418270 100644 --- a/cmd/deal_test.go +++ b/cmd/deal_test.go @@ -42,7 +42,8 @@ func TestSendDealHandler(t *testing.T) { SectorStartEpoch: 1500, Price: "0", Verified: true, - ClientID: "client_id", + ClientID: ptr.Of(model.WalletID(1)), + ClientActorID: "client_id", }, nil).Once() _, _, err = runner.Run(ctx, "singularity deal send-manual --client client --provider provider --piece-cid piece_cid --piece-size 1024 --save") require.NoError(t, err) @@ -58,7 +59,8 @@ func TestSendDealHandler(t *testing.T) { SectorStartEpoch: 1500, Price: "0", Verified: true, - ClientID: "client_id", + ClientID: ptr.Of(model.WalletID(1)), + ClientActorID: "client_id", }, nil).Once() _, _, err = runner.Run(ctx, "singularity --verbose deal send-manual --client client --provider provider --piece-cid piece_cid --piece-size 1024 --save") require.NoError(t, err) @@ -89,7 +91,8 @@ func TestListDealHandler(t *testing.T) { Price: "0", Verified: true, ScheduleID: ptr.Of(model.ScheduleID(5)), - ClientID: "client_id", + ClientID: ptr.Of(model.WalletID(1)), + ClientActorID: "client_id", }, { ID: 2, @@ -107,7 +110,8 @@ func TestListDealHandler(t *testing.T) { Price: "0", Verified: false, ScheduleID: ptr.Of(model.ScheduleID(5)), - ClientID: "client_id", + ClientID: ptr.Of(model.WalletID(1)), + ClientActorID: "client_id", }, }, nil) _, _, err := runner.Run(ctx, "singularity deal list --preparation 1 --source source --schedule 5 --provider f01 --state active") diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index e8e2393c..c9d134c1 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -44,6 +44,7 @@ * [Up](cli-reference/admin/migrate/up.md) * [Down](cli-reference/admin/migrate/down.md) * [To](cli-reference/admin/migrate/to.md) + * [Which](cli-reference/admin/migrate/which.md) * [Migrate Dataset](cli-reference/admin/migrate-dataset.md) * [Migrate Schedule](cli-reference/admin/migrate-schedule.md) * [Download](cli-reference/download.md) diff --git a/docs/en/cli-reference/admin/migrate/README.md b/docs/en/cli-reference/admin/migrate/README.md index 0c7774c3..e97e8385 100644 --- a/docs/en/cli-reference/admin/migrate/README.md +++ b/docs/en/cli-reference/admin/migrate/README.md @@ -12,6 +12,7 @@ COMMANDS: up Execute any unrun migrations down Rollback to previous migration to Migrate to specified version + which Print current migration ID help, h Shows a list of commands or help for one command OPTIONS: diff --git a/docs/en/cli-reference/admin/migrate/which.md b/docs/en/cli-reference/admin/migrate/which.md new file mode 100644 index 00000000..f8c6131d --- /dev/null +++ b/docs/en/cli-reference/admin/migrate/which.md @@ -0,0 +1,14 @@ +# Print current migration ID + +{% code fullWidth="true" %} +``` +NAME: + singularity admin migrate which - Print current migration ID + +USAGE: + singularity admin migrate which [command options] + +OPTIONS: + --help, -h show help +``` +{% endcode %} diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go index dd7d77b7..f4db4ee4 100644 --- a/docs/swagger/docs.go +++ b/docs/swagger/docs.go @@ -5560,10 +5560,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Wallet" - } + "$ref": "#/definitions/model.Wallet" } }, "400": { @@ -6127,9 +6124,12 @@ const docTemplate = `{ "model.Deal": { "type": "object", "properties": { - "clientId": { + "clientActorId": { "type": "string" }, + "clientId": { + "type": "integer" + }, "createdAt": { "type": "string" }, @@ -6570,6 +6570,10 @@ const docTemplate = `{ "description": "BalancePlus is in Fil+ cached from chain", "type": "number" }, + "balanceUpdatedAt": { + "description": "BalanceUpdatedAt is a timestamp when balance info was last pulled from chain", + "type": "string" + }, "contactInfo": { "description": "ContactInfo is optional email for SP wallets", "type": "string" @@ -6585,13 +6589,8 @@ const docTemplate = `{ "description": "PrivateKey is the private key of the wallet", "type": "string" }, - "type": { - "description": "Type determines user or SP wallets", - "allOf": [ - { - "$ref": "#/definitions/model.WalletType" - } - ] + "walletType": { + "$ref": "#/definitions/model.WalletType" } } }, diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index cee8cf76..5244a1e3 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -5554,10 +5554,7 @@ "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Wallet" - } + "$ref": "#/definitions/model.Wallet" } }, "400": { @@ -6121,9 +6118,12 @@ "model.Deal": { "type": "object", "properties": { - "clientId": { + "clientActorId": { "type": "string" }, + "clientId": { + "type": "integer" + }, "createdAt": { "type": "string" }, @@ -6564,6 +6564,10 @@ "description": "BalancePlus is in Fil+ cached from chain", "type": "number" }, + "balanceUpdatedAt": { + "description": "BalanceUpdatedAt is a timestamp when balance info was last pulled from chain", + "type": "string" + }, "contactInfo": { "description": "ContactInfo is optional email for SP wallets", "type": "string" @@ -6579,13 +6583,8 @@ "description": "PrivateKey is the private key of the wallet", "type": "string" }, - "type": { - "description": "Type determines user or SP wallets", - "allOf": [ - { - "$ref": "#/definitions/model.WalletType" - } - ] + "walletType": { + "$ref": "#/definitions/model.WalletType" } } }, diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index efdacc20..de07188a 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -372,8 +372,10 @@ definitions: type: object model.Deal: properties: - clientId: + clientActorId: type: string + clientId: + type: integer createdAt: type: string dealId: @@ -685,6 +687,10 @@ definitions: balancePlus: description: BalancePlus is in Fil+ cached from chain type: number + balanceUpdatedAt: + description: BalanceUpdatedAt is a timestamp when balance info was last pulled + from chain + type: string contactInfo: description: ContactInfo is optional email for SP wallets type: string @@ -696,10 +702,8 @@ definitions: privateKey: description: PrivateKey is the private key of the wallet type: string - type: - allOf: - - $ref: '#/definitions/model.WalletType' - description: Type determines user or SP wallets + walletType: + $ref: '#/definitions/model.WalletType' type: object model.WalletType: enum: @@ -11900,9 +11904,7 @@ paths: "200": description: OK schema: - items: - $ref: '#/definitions/model.Wallet' - type: array + $ref: '#/definitions/model.Wallet' "400": description: Bad Request schema: diff --git a/handler/deal/list_test.go b/handler/deal/list_test.go index 146131d9..b5bd9456 100644 --- a/handler/deal/list_test.go +++ b/handler/deal/list_test.go @@ -6,6 +6,7 @@ import ( "github.com/data-preservation-programs/singularity/model" "github.com/data-preservation-programs/singularity/util/testutil" + "github.com/gotidy/ptr" "github.com/stretchr/testify/require" "gorm.io/gorm" ) @@ -28,7 +29,7 @@ func TestListHandler(t *testing.T) { PreparationID: 1, }, State: model.DealActive, - ClientID: "f01", + ClientID: ptr.Of(model.WalletID(1)), Provider: "provider", }, }).Error diff --git a/handler/deal/schedule/remove_test.go b/handler/deal/schedule/remove_test.go index de855d51..dbb6c6ee 100644 --- a/handler/deal/schedule/remove_test.go +++ b/handler/deal/schedule/remove_test.go @@ -27,7 +27,7 @@ func TestRemoveSchedule_Success(t *testing.T) { require.NoError(t, err) err = db.Create(&model.Deal{ - ClientID: "f01", + ClientID: ptr.Of(model.WalletID(1)), ScheduleID: ptr.Of(model.ScheduleID(1)), }).Error require.NoError(t, err) diff --git a/handler/deal/send-manual.go b/handler/deal/send-manual.go index 498cc7bb..3fe9a754 100644 --- a/handler/deal/send-manual.go +++ b/handler/deal/send-manual.go @@ -71,8 +71,8 @@ func (DefaultHandler) SendManualHandler( ) (*model.Deal, error) { db = db.WithContext(ctx) // Get the wallet object - wallet := model.Wallet{} - err := db.Where("id = ? OR address = ?", request.ClientAddress, request.ClientAddress).First(&wallet).Error + var wallet = model.Wallet{} + err := wallet.FindByIDOrAddr(db, request.ClientAddress) if errors.Is(err, gorm.ErrRecordNotFound) { return nil, errors.Wrapf(handlererror.ErrNotFound, "client address %s not found", request.ClientAddress) } diff --git a/handler/file/deals_test.go b/handler/file/deals_test.go index b2b5838e..5785cf70 100644 --- a/handler/file/deals_test.go +++ b/handler/file/deals_test.go @@ -75,15 +75,18 @@ func TestGetFileDealsHandler(t *testing.T) { err = db.Create(cars).Error require.NoError(t, err) + wallet := &model.Wallet{ActorID: "f01", Address: "f11"} + err = db.Create(wallet).Error + require.NoError(t, err) deals := []model.Deal{{ PieceCID: model.CID(testCid1), - Wallet: &model.Wallet{}, + Wallet: wallet, }, { PieceCID: model.CID(testCid2), - Wallet: &model.Wallet{}, + Wallet: wallet, }, { PieceCID: model.CID(testCid2), - Wallet: &model.Wallet{}, + Wallet: wallet, }} err = db.Create(deals).Error require.NoError(t, err) diff --git a/handler/file/retrieve_test.go b/handler/file/retrieve_test.go index dd444765..792c02fc 100644 --- a/handler/file/retrieve_test.go +++ b/handler/file/retrieve_test.go @@ -138,13 +138,17 @@ func TestRetrieveFileHandler(t *testing.T) { require.NoError(t, err) } + wallet := &model.Wallet{ActorID: "f01", Address: "f11"} + err = db.Create(wallet).Error + require.NoError(t, err) + deals := make([]model.Deal, 0, 4) for i, testCid := range testCids { deal := model.Deal{ State: model.DealActive, PieceCID: model.CID(testCid), Provider: "apples" + strconv.Itoa(i), - Wallet: &model.Wallet{}, + Wallet: wallet, } err = db.Create(&deal).Error require.NoError(t, err) @@ -158,7 +162,7 @@ func TestRetrieveFileHandler(t *testing.T) { State: state, PieceCID: model.CID(testCid), Provider: "oranges" + strconv.Itoa(i), - Wallet: &model.Wallet{}, + Wallet: wallet, } err = db.Create(&deal).Error require.NoError(t, err) @@ -484,12 +488,16 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { require.NoError(b, err) } + wallet := &model.Wallet{ActorID: "f01", Address: "f11"} + err = db.Create(wallet).Error + require.NoError(b, err) + for i, testCid := range testCids { deal := model.Deal{ State: model.DealActive, PieceCID: model.CID(testCid), Provider: "apples" + strconv.Itoa(i), - Wallet: &model.Wallet{}, + Wallet: wallet, } err = db.Create(&deal).Error require.NoError(b, err) @@ -502,7 +510,7 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { State: state, PieceCID: model.CID(testCid), Provider: "oranges" + strconv.Itoa(i), - Wallet: &model.Wallet{}, + Wallet: wallet, } err = db.Create(&deal).Error require.NoError(b, err) diff --git a/handler/storage/types_gen.go b/handler/storage/types_gen.go index e8dc9b60..91408d6d 100644 --- a/handler/storage/types_gen.go +++ b/handler/storage/types_gen.go @@ -6,19 +6,19 @@ package storage import "github.com/data-preservation-programs/singularity/model" type acdConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). - UploadWaitPerGb string `default:"3m0s" json:"uploadWaitPerGb"` // Additional time per GiB to wait after a failed complete upload to see if it appears. - TemplinkThreshold string `default:"9Gi" json:"templinkThreshold"` // Files >= this size will be downloaded via their tempLink. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). + UploadWaitPerGb string `json:"uploadWaitPerGb" default:"3m0s"` // Additional time per GiB to wait after a failed complete upload to see if it appears. + TemplinkThreshold string `json:"templinkThreshold" default:"9Gi"` // Files >= this size will be downloaded via their tempLink. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. } type createAcdStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config acdConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -37,42 +37,42 @@ type createAcdStorageRequest struct { func createAcdStorage() {} type azureblobConfig struct { - Account string `json:"account"` // Azure Storage Account Name. - EnvAuth bool `default:"false" json:"envAuth"` // Read credentials from runtime (environment variables, CLI or MSI). - Key string `json:"key"` // Storage Account Shared Key. - SasUrl string `json:"sasUrl"` // SAS URL for container level access only. - Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. - ClientId string `json:"clientId"` // The ID of the client in use. - ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets - ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. - ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). - ClientSendCertificateChain bool `default:"false" json:"clientSendCertificateChain"` // Send the certificate chain when using certificate auth. - Username string `json:"username"` // User name (usually an email address) - Password string `json:"password"` // The user's password - ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. - UseMsi bool `default:"false" json:"useMsi"` // Use a managed service identity to authenticate (only works in Azure). - MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. - MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. - MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. - UseEmulator bool `default:"false" json:"useEmulator"` // Uses local storage emulator if provided as 'true'. - Endpoint string `json:"endpoint"` // Endpoint for the service. - UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). - ChunkSize string `default:"4Mi" json:"chunkSize"` // Upload chunk size. - UploadConcurrency int `default:"16" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ListChunk int `default:"5000" json:"listChunk"` // Size of blob list. - AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. - ArchiveTierDelete bool `default:"false" json:"archiveTierDelete"` // Delete archive tier blobs before overwriting. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - Encoding string `default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8" json:"encoding"` // The encoding for the backend. - PublicAccess string `example:"" json:"publicAccess"` // Public access level of a container: blob or container. - NoCheckContainer bool `default:"false" json:"noCheckContainer"` // If set, don't attempt to check the container exists or create it. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Account string `json:"account"` // Azure Storage Account Name. + EnvAuth bool `json:"envAuth" default:"false"` // Read credentials from runtime (environment variables, CLI or MSI). + Key string `json:"key"` // Storage Account Shared Key. + SasUrl string `json:"sasUrl"` // SAS URL for container level access only. + Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. + ClientId string `json:"clientId"` // The ID of the client in use. + ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets + ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. + ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). + ClientSendCertificateChain bool `json:"clientSendCertificateChain" default:"false"` // Send the certificate chain when using certificate auth. + Username string `json:"username"` // User name (usually an email address) + Password string `json:"password"` // The user's password + ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. + UseMsi bool `json:"useMsi" default:"false"` // Use a managed service identity to authenticate (only works in Azure). + MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. + MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. + MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. + UseEmulator bool `json:"useEmulator" default:"false"` // Uses local storage emulator if provided as 'true'. + Endpoint string `json:"endpoint"` // Endpoint for the service. + UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). + ChunkSize string `json:"chunkSize" default:"4Mi"` // Upload chunk size. + UploadConcurrency int `json:"uploadConcurrency" default:"16"` // Concurrency for multipart uploads. + ListChunk int `json:"listChunk" default:"5000"` // Size of blob list. + AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. + ArchiveTierDelete bool `json:"archiveTierDelete" default:"false"` // Delete archive tier blobs before overwriting. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8"` // The encoding for the backend. + PublicAccess string `json:"publicAccess" example:""` // Public access level of a container: blob or container. + NoCheckContainer bool `json:"noCheckContainer" default:"false"` // If set, don't attempt to check the container exists or create it. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. } type createAzureblobStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config azureblobConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -91,26 +91,26 @@ type createAzureblobStorageRequest struct { func createAzureblobStorage() {} type b2Config struct { - Account string `json:"account"` // Account ID or Application Key ID. - Key string `json:"key"` // Application Key. - Endpoint string `json:"endpoint"` // Endpoint for the service. - TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files on remote removal, otherwise hide files. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - CopyCutoff string `default:"4Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - ChunkSize string `default:"96Mi" json:"chunkSize"` // Upload chunk size. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Disable checksums for large (> upload cutoff) files. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - DownloadAuthDuration string `default:"1w" json:"downloadAuthDuration"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Account string `json:"account"` // Account ID or Application Key ID. + Key string `json:"key"` // Application Key. + Endpoint string `json:"endpoint"` // Endpoint for the service. + TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files on remote removal, otherwise hide files. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + CopyCutoff string `json:"copyCutoff" default:"4Gi"` // Cutoff for switching to multipart copy. + ChunkSize string `json:"chunkSize" default:"96Mi"` // Upload chunk size. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Disable checksums for large (> upload cutoff) files. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + DownloadAuthDuration string `json:"downloadAuthDuration" default:"1w"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createB2StorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config b2Config `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -129,24 +129,24 @@ type createB2StorageRequest struct { func createB2Storage() {} type boxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - RootFolderId string `default:"0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. - BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location - AccessToken string `json:"accessToken"` // Box App Primary Access Token - BoxSubType string `default:"user" example:"user" json:"boxSubType"` // - UploadCutoff string `default:"50Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload (>= 50 MiB). - CommitRetries int `default:"100" json:"commitRetries"` // Max number of times to try committing a multipart file. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 1-1000. - OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. - Encoding string `default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + RootFolderId string `json:"rootFolderId" default:"0"` // Fill in for rclone to use a non root folder as its starting point. + BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location + AccessToken string `json:"accessToken"` // Box App Primary Access Token + BoxSubType string `json:"boxSubType" default:"user" example:"user"` // + UploadCutoff string `json:"uploadCutoff" default:"50Mi"` // Cutoff for switching to multipart upload (>= 50 MiB). + CommitRetries int `json:"commitRetries" default:"100"` // Max number of times to try committing a multipart file. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 1-1000. + OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createBoxStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config boxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -165,53 +165,53 @@ type createBoxStorageRequest struct { func createBoxStorage() {} type driveConfig struct { - ClientId string `json:"clientId"` // Google Application Client Id - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Scope string `example:"drive" json:"scope"` // Scope that rclone should use when requesting access from drive. - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). - AuthOwnerOnly bool `default:"false" json:"authOwnerOnly"` // Only consider files owned by the authenticated user. - UseTrash bool `default:"true" json:"useTrash"` // Send files to the trash instead of deleting permanently. - CopyShortcutContent bool `default:"false" json:"copyShortcutContent"` // Server side copy contents of shortcuts instead of the shortcut. - SkipGdocs bool `default:"false" json:"skipGdocs"` // Skip google documents in all listings. - SkipChecksumGphotos bool `default:"false" json:"skipChecksumGphotos"` // Skip MD5 checksum on Google photos and videos only. - SharedWithMe bool `default:"false" json:"sharedWithMe"` // Only show files that are shared with me. - TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. - StarredOnly bool `default:"false" json:"starredOnly"` // Only show files that are starred. - Formats string `json:"formats"` // Deprecated: See export_formats. - ExportFormats string `default:"docx,xlsx,pptx,svg" json:"exportFormats"` // Comma separated list of preferred formats for downloading Google docs. - ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. - AllowImportNameChange bool `default:"false" json:"allowImportNameChange"` // Allow the filetype to change when uploading Google docs. - UseCreatedDate bool `default:"false" json:"useCreatedDate"` // Use file created date instead of modified date. - UseSharedDate bool `default:"false" json:"useSharedDate"` // Use date file was shared instead of modified date. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 100-1000, 0 to disable. - Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. - AlternateExport bool `default:"false" json:"alternateExport"` // Deprecated: No longer needed. - UploadCutoff string `default:"8Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"8Mi" json:"chunkSize"` // Upload chunk size. - AcknowledgeAbuse bool `default:"false" json:"acknowledgeAbuse"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. - KeepRevisionForever bool `default:"false" json:"keepRevisionForever"` // Keep new head revision of each file forever. - SizeAsQuota bool `default:"false" json:"sizeAsQuota"` // Show sizes as storage quota usage, not actual size. - V2DownloadMinSize string `default:"off" json:"v2DownloadMinSize"` // If Object's are greater, use drive v2 API to download. - PacerMinSleep string `default:"100ms" json:"pacerMinSleep"` // Minimum time to sleep between API calls. - PacerBurst int `default:"100" json:"pacerBurst"` // Number of API calls to allow without sleeping. - ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different drive configs. - DisableHttp2 bool `default:"true" json:"disableHttp2"` // Disable drive using http2. - StopOnUploadLimit bool `default:"false" json:"stopOnUploadLimit"` // Make upload limit errors be fatal. - StopOnDownloadLimit bool `default:"false" json:"stopOnDownloadLimit"` // Make download limit errors be fatal. - SkipShortcuts bool `default:"false" json:"skipShortcuts"` // If set skip shortcut files. - SkipDanglingShortcuts bool `default:"false" json:"skipDanglingShortcuts"` // If set skip dangling shortcut files. - ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. - Encoding string `default:"InvalidUtf8" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // Google Application Client Id + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Scope string `json:"scope" example:"drive"` // Scope that rclone should use when requesting access from drive. + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). + AuthOwnerOnly bool `json:"authOwnerOnly" default:"false"` // Only consider files owned by the authenticated user. + UseTrash bool `json:"useTrash" default:"true"` // Send files to the trash instead of deleting permanently. + CopyShortcutContent bool `json:"copyShortcutContent" default:"false"` // Server side copy contents of shortcuts instead of the shortcut. + SkipGdocs bool `json:"skipGdocs" default:"false"` // Skip google documents in all listings. + SkipChecksumGphotos bool `json:"skipChecksumGphotos" default:"false"` // Skip MD5 checksum on Google photos and videos only. + SharedWithMe bool `json:"sharedWithMe" default:"false"` // Only show files that are shared with me. + TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. + StarredOnly bool `json:"starredOnly" default:"false"` // Only show files that are starred. + Formats string `json:"formats"` // Deprecated: See export_formats. + ExportFormats string `json:"exportFormats" default:"docx,xlsx,pptx,svg"` // Comma separated list of preferred formats for downloading Google docs. + ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. + AllowImportNameChange bool `json:"allowImportNameChange" default:"false"` // Allow the filetype to change when uploading Google docs. + UseCreatedDate bool `json:"useCreatedDate" default:"false"` // Use file created date instead of modified date. + UseSharedDate bool `json:"useSharedDate" default:"false"` // Use date file was shared instead of modified date. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 100-1000, 0 to disable. + Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. + AlternateExport bool `json:"alternateExport" default:"false"` // Deprecated: No longer needed. + UploadCutoff string `json:"uploadCutoff" default:"8Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"8Mi"` // Upload chunk size. + AcknowledgeAbuse bool `json:"acknowledgeAbuse" default:"false"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. + KeepRevisionForever bool `json:"keepRevisionForever" default:"false"` // Keep new head revision of each file forever. + SizeAsQuota bool `json:"sizeAsQuota" default:"false"` // Show sizes as storage quota usage, not actual size. + V2DownloadMinSize string `json:"v2DownloadMinSize" default:"off"` // If Object's are greater, use drive v2 API to download. + PacerMinSleep string `json:"pacerMinSleep" default:"100ms"` // Minimum time to sleep between API calls. + PacerBurst int `json:"pacerBurst" default:"100"` // Number of API calls to allow without sleeping. + ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different drive configs. + DisableHttp2 bool `json:"disableHttp2" default:"true"` // Disable drive using http2. + StopOnUploadLimit bool `json:"stopOnUploadLimit" default:"false"` // Make upload limit errors be fatal. + StopOnDownloadLimit bool `json:"stopOnDownloadLimit" default:"false"` // Make download limit errors be fatal. + SkipShortcuts bool `json:"skipShortcuts" default:"false"` // If set skip shortcut files. + SkipDanglingShortcuts bool `json:"skipDanglingShortcuts" default:"false"` // If set skip dangling shortcut files. + ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. + Encoding string `json:"encoding" default:"InvalidUtf8"` // The encoding for the backend. } type createDriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config driveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -230,24 +230,24 @@ type createDriveStorageRequest struct { func createDriveStorage() {} type dropboxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ChunkSize string `default:"48Mi" json:"chunkSize"` // Upload chunk size (< 150Mi). - Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. - SharedFiles bool `default:"false" json:"sharedFiles"` // Instructs rclone to work on individual shared files. - SharedFolders bool `default:"false" json:"sharedFolders"` // Instructs rclone to work on shared folders. - BatchMode string `default:"sync" json:"batchMode"` // Upload file batching sync|async|off. - BatchSize int `default:"0" json:"batchSize"` // Max number of files in upload batch. - BatchTimeout string `default:"0s" json:"batchTimeout"` // Max time to allow an idle upload batch before uploading. - BatchCommitTimeout string `default:"10m0s" json:"batchCommitTimeout"` // Max time to wait for a batch to finish committing - Encoding string `default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ChunkSize string `json:"chunkSize" default:"48Mi"` // Upload chunk size (< 150Mi). + Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. + SharedFiles bool `json:"sharedFiles" default:"false"` // Instructs rclone to work on individual shared files. + SharedFolders bool `json:"sharedFolders" default:"false"` // Instructs rclone to work on shared folders. + BatchMode string `json:"batchMode" default:"sync"` // Upload file batching sync|async|off. + BatchSize int `json:"batchSize" default:"0"` // Max number of files in upload batch. + BatchTimeout string `json:"batchTimeout" default:"0s"` // Max time to allow an idle upload batch before uploading. + BatchCommitTimeout string `json:"batchCommitTimeout" default:"10m0s"` // Max time to wait for a batch to finish committing + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createDropboxStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config dropboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -270,11 +270,11 @@ type fichierConfig struct { SharedFolder string `json:"sharedFolder"` // If you want to download a shared folder, add this parameter. FilePassword string `json:"filePassword"` // If you want to download a shared file that is password protected, add this parameter. FolderPassword string `json:"folderPassword"` // If you want to list the files in a shared folder that is password protected, add this parameter. - Encoding string `default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createFichierStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config fichierConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -293,17 +293,17 @@ type createFichierStorageRequest struct { func createFichierStorage() {} type filefabricConfig struct { - Url string `example:"https://storagemadeeasy.com" json:"url"` // URL of the Enterprise File Fabric to connect to. + Url string `json:"url" example:"https://storagemadeeasy.com"` // URL of the Enterprise File Fabric to connect to. RootFolderId string `json:"rootFolderId"` // ID of the root folder. PermanentToken string `json:"permanentToken"` // Permanent Authentication Token. Token string `json:"token"` // Session Token. TokenExpiry string `json:"tokenExpiry"` // Token expiry time. Version string `json:"version"` // Version read from the file fabric. - Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createFilefabricStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config filefabricConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -323,29 +323,29 @@ func createFilefabricStorage() {} type ftpConfig struct { Host string `json:"host"` // FTP host to connect to. - User string `default:"$USER" json:"user"` // FTP username. - Port int `default:"21" json:"port"` // FTP port number. + User string `json:"user" default:"$USER"` // FTP username. + Port int `json:"port" default:"21"` // FTP port number. Pass string `json:"pass"` // FTP password. - Tls bool `default:"false" json:"tls"` // Use Implicit FTPS (FTP over TLS). - ExplicitTls bool `default:"false" json:"explicitTls"` // Use Explicit FTPS (FTP over TLS). - Concurrency int `default:"0" json:"concurrency"` // Maximum number of FTP simultaneous connections, 0 for unlimited. - NoCheckCertificate bool `default:"false" json:"noCheckCertificate"` // Do not verify the TLS certificate of the server. - DisableEpsv bool `default:"false" json:"disableEpsv"` // Disable using EPSV even if server advertises support. - DisableMlsd bool `default:"false" json:"disableMlsd"` // Disable using MLSD even if server advertises support. - DisableUtf8 bool `default:"false" json:"disableUtf8"` // Disable using UTF-8 even if server advertises support. - WritingMdtm bool `default:"false" json:"writingMdtm"` // Use MDTM to set modification time (VsFtpd quirk) - ForceListHidden bool `default:"false" json:"forceListHidden"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. - IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. - CloseTimeout string `default:"1m0s" json:"closeTimeout"` // Maximum time to wait for a response to close. - TlsCacheSize int `default:"32" json:"tlsCacheSize"` // Size of TLS session cache for all control and data connections. - DisableTls13 bool `default:"false" json:"disableTls13"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) - ShutTimeout string `default:"1m0s" json:"shutTimeout"` // Maximum time to wait for data connection closing status. - AskPassword bool `default:"false" json:"askPassword"` // Allow asking for FTP password when needed. - Encoding string `default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash" json:"encoding"` // The encoding for the backend. + Tls bool `json:"tls" default:"false"` // Use Implicit FTPS (FTP over TLS). + ExplicitTls bool `json:"explicitTls" default:"false"` // Use Explicit FTPS (FTP over TLS). + Concurrency int `json:"concurrency" default:"0"` // Maximum number of FTP simultaneous connections, 0 for unlimited. + NoCheckCertificate bool `json:"noCheckCertificate" default:"false"` // Do not verify the TLS certificate of the server. + DisableEpsv bool `json:"disableEpsv" default:"false"` // Disable using EPSV even if server advertises support. + DisableMlsd bool `json:"disableMlsd" default:"false"` // Disable using MLSD even if server advertises support. + DisableUtf8 bool `json:"disableUtf8" default:"false"` // Disable using UTF-8 even if server advertises support. + WritingMdtm bool `json:"writingMdtm" default:"false"` // Use MDTM to set modification time (VsFtpd quirk) + ForceListHidden bool `json:"forceListHidden" default:"false"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. + IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. + CloseTimeout string `json:"closeTimeout" default:"1m0s"` // Maximum time to wait for a response to close. + TlsCacheSize int `json:"tlsCacheSize" default:"32"` // Size of TLS session cache for all control and data connections. + DisableTls13 bool `json:"disableTls13" default:"false"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) + ShutTimeout string `json:"shutTimeout" default:"1m0s"` // Maximum time to wait for data connection closing status. + AskPassword bool `json:"askPassword" default:"false"` // Allow asking for FTP password when needed. + Encoding string `json:"encoding" default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash"` // The encoding for the backend. } type createFtpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config ftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -364,29 +364,29 @@ type createFtpStorageRequest struct { func createFtpStorage() {} type gcsConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ProjectNumber string `json:"projectNumber"` // Project number. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - Anonymous bool `default:"false" json:"anonymous"` // Access public buckets and objects without credentials. - ObjectAcl string `example:"authenticatedRead" json:"objectAcl"` // Access Control List for new objects. - BucketAcl string `example:"authenticatedRead" json:"bucketAcl"` // Access Control List for new buckets. - BucketPolicyOnly bool `default:"false" json:"bucketPolicyOnly"` // Access checks should use bucket-level IAM policies. - Location string `example:"" json:"location"` // Location for the newly created buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing objects in Google Cloud Storage. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - Endpoint string `json:"endpoint"` // Endpoint for the service. - Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ProjectNumber string `json:"projectNumber"` // Project number. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + Anonymous bool `json:"anonymous" default:"false"` // Access public buckets and objects without credentials. + ObjectAcl string `json:"objectAcl" example:"authenticatedRead"` // Access Control List for new objects. + BucketAcl string `json:"bucketAcl" example:"authenticatedRead"` // Access Control List for new buckets. + BucketPolicyOnly bool `json:"bucketPolicyOnly" default:"false"` // Access checks should use bucket-level IAM policies. + Location string `json:"location" example:""` // Location for the newly created buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing objects in Google Cloud Storage. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + Endpoint string `json:"endpoint"` // Endpoint for the service. + Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). } type createGcsStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gcsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -405,20 +405,20 @@ type createGcsStorageRequest struct { func createGcsStorage() {} type gphotosConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ReadOnly bool `default:"false" json:"readOnly"` // Set to make the Google Photos backend read only. - ReadSize bool `default:"false" json:"readSize"` // Set to read the size of media items. - StartYear int `default:"2000" json:"startYear"` // Year limits the photos to be downloaded to those which are uploaded after the given year. - IncludeArchived bool `default:"false" json:"includeArchived"` // Also view and download archived media. - Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ReadOnly bool `json:"readOnly" default:"false"` // Set to make the Google Photos backend read only. + ReadSize bool `json:"readSize" default:"false"` // Set to read the size of media items. + StartYear int `json:"startYear" default:"2000"` // Year limits the photos to be downloaded to those which are uploaded after the given year. + IncludeArchived bool `json:"includeArchived" default:"false"` // Also view and download archived media. + Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. } type createGphotosStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gphotosConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -437,15 +437,15 @@ type createGphotosStorageRequest struct { func createGphotosStorage() {} type hdfsConfig struct { - Namenode string `json:"namenode"` // Hadoop name node and port. - Username string `example:"root" json:"username"` // Hadoop user name. - ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. - DataTransferProtection string `example:"privacy" json:"dataTransferProtection"` // Kerberos data transfer protection: authentication|integrity|privacy. - Encoding string `default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Namenode string `json:"namenode"` // Hadoop name node and port. + Username string `json:"username" example:"root"` // Hadoop user name. + ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. + DataTransferProtection string `json:"dataTransferProtection" example:"privacy"` // Kerberos data transfer protection: authentication|integrity|privacy. + Encoding string `json:"encoding" default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createHdfsStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hdfsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -464,24 +464,24 @@ type createHdfsStorageRequest struct { func createHdfsStorage() {} type hidriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ScopeAccess string `default:"rw" example:"rw" json:"scopeAccess"` // Access permissions that rclone should use when requesting access from HiDrive. - ScopeRole string `default:"user" example:"user" json:"scopeRole"` // User-level that rclone should use when requesting access from HiDrive. - RootPrefix string `default:"/" example:"/" json:"rootPrefix"` // The root/parent folder for all paths. - Endpoint string `default:"https://api.hidrive.strato.com/2.1" json:"endpoint"` // Endpoint for the service. - DisableFetchingMemberCount bool `default:"false" json:"disableFetchingMemberCount"` // Do not fetch number of objects in directories unless it is absolutely necessary. - ChunkSize string `default:"48Mi" json:"chunkSize"` // Chunksize for chunked uploads. - UploadCutoff string `default:"96Mi" json:"uploadCutoff"` // Cutoff/Threshold for chunked uploads. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for chunked uploads. - Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ScopeAccess string `json:"scopeAccess" default:"rw" example:"rw"` // Access permissions that rclone should use when requesting access from HiDrive. + ScopeRole string `json:"scopeRole" default:"user" example:"user"` // User-level that rclone should use when requesting access from HiDrive. + RootPrefix string `json:"rootPrefix" default:"/" example:"/"` // The root/parent folder for all paths. + Endpoint string `json:"endpoint" default:"https://api.hidrive.strato.com/2.1"` // Endpoint for the service. + DisableFetchingMemberCount bool `json:"disableFetchingMemberCount" default:"false"` // Do not fetch number of objects in directories unless it is absolutely necessary. + ChunkSize string `json:"chunkSize" default:"48Mi"` // Chunksize for chunked uploads. + UploadCutoff string `json:"uploadCutoff" default:"96Mi"` // Cutoff/Threshold for chunked uploads. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for chunked uploads. + Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. } type createHidriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hidriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -502,12 +502,12 @@ func createHidriveStorage() {} type httpConfig struct { Url string `json:"url"` // URL of HTTP host to connect to. Headers string `json:"headers"` // Set HTTP headers for all transactions. - NoSlash bool `default:"false" json:"noSlash"` // Set this if the site doesn't end directories with /. - NoHead bool `default:"false" json:"noHead"` // Don't use HEAD requests. + NoSlash bool `json:"noSlash" default:"false"` // Set this if the site doesn't end directories with /. + NoHead bool `json:"noHead" default:"false"` // Don't use HEAD requests. } type createHttpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config httpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -526,17 +526,17 @@ type createHttpStorageRequest struct { func createHttpStorage() {} type internetarchiveConfig struct { - AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. - SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). - Endpoint string `default:"https://s3.us.archive.org" json:"endpoint"` // IAS3 Endpoint. - FrontEndpoint string `default:"https://archive.org" json:"frontEndpoint"` // Host of InternetArchive Frontend. - DisableChecksum bool `default:"true" json:"disableChecksum"` // Don't ask the server to test against MD5 checksum calculated by rclone. - WaitArchive string `default:"0s" json:"waitArchive"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. - Encoding string `default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. + SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). + Endpoint string `json:"endpoint" default:"https://s3.us.archive.org"` // IAS3 Endpoint. + FrontEndpoint string `json:"frontEndpoint" default:"https://archive.org"` // Host of InternetArchive Frontend. + DisableChecksum bool `json:"disableChecksum" default:"true"` // Don't ask the server to test against MD5 checksum calculated by rclone. + WaitArchive string `json:"waitArchive" default:"0s"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. + Encoding string `json:"encoding" default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createInternetarchiveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config internetarchiveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -555,16 +555,16 @@ type createInternetarchiveStorageRequest struct { func createInternetarchiveStorage() {} type jottacloudConfig struct { - Md5MemoryLimit string `default:"10Mi" json:"md5MemoryLimit"` // Files bigger than this will be cached on disk to calculate the MD5 if required. - TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. - HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. - UploadResumeLimit string `default:"10Mi" json:"uploadResumeLimit"` // Files bigger than this can be resumed if the upload fail's. - NoVersions bool `default:"false" json:"noVersions"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Md5MemoryLimit string `json:"md5MemoryLimit" default:"10Mi"` // Files bigger than this will be cached on disk to calculate the MD5 if required. + TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. + HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. + UploadResumeLimit string `json:"uploadResumeLimit" default:"10Mi"` // Files bigger than this can be resumed if the upload fail's. + NoVersions bool `json:"noVersions" default:"false"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createJottacloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config jottacloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -584,14 +584,14 @@ func createJottacloudStorage() {} type koofrDigistorageConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. + Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password). - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createKoofrDigistorageStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrDigistorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -611,14 +611,14 @@ func createKoofrDigistorageStorage() {} type koofrKoofrConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. + Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createKoofrKoofrStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrKoofrConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -639,14 +639,14 @@ func createKoofrKoofrStorage() {} type koofrOtherConfig struct { Endpoint string `json:"endpoint"` // The Koofr API endpoint to use. Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. + Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at your service's settings page). - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createKoofrOtherStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrOtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -665,24 +665,24 @@ type createKoofrOtherStorageRequest struct { func createKoofrOtherStorage() {} type localConfig struct { - Nounc bool `default:"false" example:"true" json:"nounc"` // Disable UNC (long path names) conversion on Windows. - CopyLinks bool `default:"false" json:"copyLinks"` // Follow symlinks and copy the pointed to item. - Links bool `default:"false" json:"links"` // Translate symlinks to/from regular files with a '.rclonelink' extension. - SkipLinks bool `default:"false" json:"skipLinks"` // Don't warn about skipped symlinks. - ZeroSizeLinks bool `default:"false" json:"zeroSizeLinks"` // Assume the Stat size of links is zero (and read them instead) (deprecated). - UnicodeNormalization bool `default:"false" json:"unicodeNormalization"` // Apply unicode NFC normalization to paths and filenames. - NoCheckUpdated bool `default:"false" json:"noCheckUpdated"` // Don't check to see if the files change during upload. - OneFileSystem bool `default:"false" json:"oneFileSystem"` // Don't cross filesystem boundaries (unix/macOS only). - CaseSensitive bool `default:"false" json:"caseSensitive"` // Force the filesystem to report itself as case sensitive. - CaseInsensitive bool `default:"false" json:"caseInsensitive"` // Force the filesystem to report itself as case insensitive. - NoPreallocate bool `default:"false" json:"noPreallocate"` // Disable preallocation of disk space for transferred files. - NoSparse bool `default:"false" json:"noSparse"` // Disable sparse files for multi-thread downloads. - NoSetModtime bool `default:"false" json:"noSetModtime"` // Disable setting modtime. - Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. + Nounc bool `json:"nounc" default:"false" example:"true"` // Disable UNC (long path names) conversion on Windows. + CopyLinks bool `json:"copyLinks" default:"false"` // Follow symlinks and copy the pointed to item. + Links bool `json:"links" default:"false"` // Translate symlinks to/from regular files with a '.rclonelink' extension. + SkipLinks bool `json:"skipLinks" default:"false"` // Don't warn about skipped symlinks. + ZeroSizeLinks bool `json:"zeroSizeLinks" default:"false"` // Assume the Stat size of links is zero (and read them instead) (deprecated). + UnicodeNormalization bool `json:"unicodeNormalization" default:"false"` // Apply unicode NFC normalization to paths and filenames. + NoCheckUpdated bool `json:"noCheckUpdated" default:"false"` // Don't check to see if the files change during upload. + OneFileSystem bool `json:"oneFileSystem" default:"false"` // Don't cross filesystem boundaries (unix/macOS only). + CaseSensitive bool `json:"caseSensitive" default:"false"` // Force the filesystem to report itself as case sensitive. + CaseInsensitive bool `json:"caseInsensitive" default:"false"` // Force the filesystem to report itself as case insensitive. + NoPreallocate bool `json:"noPreallocate" default:"false"` // Disable preallocation of disk space for transferred files. + NoSparse bool `json:"noSparse" default:"false"` // Disable sparse files for multi-thread downloads. + NoSetModtime bool `json:"noSetModtime" default:"false"` // Disable setting modtime. + Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. } type createLocalStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config localConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -701,20 +701,20 @@ type createLocalStorageRequest struct { func createLocalStorage() {} type mailruConfig struct { - User string `json:"user"` // User name (usually email). - Pass string `json:"pass"` // Password. - SpeedupEnable bool `default:"true" example:"true" json:"speedupEnable"` // Skip full upload if there is another file with same data hash. - SpeedupFilePatterns string `default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:"" json:"speedupFilePatterns"` // Comma separated list of file name patterns eligible for speedup (put by hash). - SpeedupMaxDisk string `default:"3Gi" example:"0" json:"speedupMaxDisk"` // This option allows you to disable speedup (put by hash) for large files. - SpeedupMaxMemory string `default:"32Mi" example:"0" json:"speedupMaxMemory"` // Files larger than the size given below will always be hashed on disk. - CheckHash bool `default:"true" example:"true" json:"checkHash"` // What should copy do if file checksum is mismatched or invalid. - UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. - Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + User string `json:"user"` // User name (usually email). + Pass string `json:"pass"` // Password. + SpeedupEnable bool `json:"speedupEnable" default:"true" example:"true"` // Skip full upload if there is another file with same data hash. + SpeedupFilePatterns string `json:"speedupFilePatterns" default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:""` // Comma separated list of file name patterns eligible for speedup (put by hash). + SpeedupMaxDisk string `json:"speedupMaxDisk" default:"3Gi" example:"0"` // This option allows you to disable speedup (put by hash) for large files. + SpeedupMaxMemory string `json:"speedupMaxMemory" default:"32Mi" example:"0"` // Files larger than the size given below will always be hashed on disk. + CheckHash bool `json:"checkHash" default:"true" example:"true"` // What should copy do if file checksum is mismatched or invalid. + UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. + Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createMailruStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config mailruConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -733,16 +733,16 @@ type createMailruStorageRequest struct { func createMailruStorage() {} type megaConfig struct { - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - Debug bool `default:"false" json:"debug"` // Output more debug from Mega. - HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. - UseHttps bool `default:"false" json:"useHttps"` // Use HTTPS for transfers. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + Debug bool `json:"debug" default:"false"` // Output more debug from Mega. + HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. + UseHttps bool `json:"useHttps" default:"false"` // Use HTTPS for transfers. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. } type createMegaStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config megaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -761,14 +761,14 @@ type createMegaStorageRequest struct { func createMegaStorage() {} type netstorageConfig struct { - Protocol string `default:"https" example:"http" json:"protocol"` // Select between HTTP or HTTPS protocol. + Protocol string `json:"protocol" default:"https" example:"http"` // Select between HTTP or HTTPS protocol. Host string `json:"host"` // Domain+path of NetStorage host to connect to. Account string `json:"account"` // Set the NetStorage account name Secret string `json:"secret"` // Set the NetStorage account secret/G2O key for authentication. } type createNetstorageStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config netstorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -787,31 +787,31 @@ type createNetstorageStorageRequest struct { func createNetstorageStorage() {} type onedriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `default:"global" example:"global" json:"region"` // Choose national cloud region for OneDrive. - ChunkSize string `default:"10Mi" json:"chunkSize"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). - DriveId string `json:"driveId"` // The ID of the drive to use. - DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - AccessScopes string `default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" json:"accessScopes"` // Set scopes to be requested by rclone. - DisableSitePermission bool `default:"false" json:"disableSitePermission"` // Disable the request for Sites.Read.All permission. - ExposeOnenoteFiles bool `default:"false" json:"exposeOnenoteFiles"` // Set to make OneNote files show up in directory listings. - ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk. - NoVersions bool `default:"false" json:"noVersions"` // Remove all versions on modifying operations. - LinkScope string `default:"anonymous" example:"anonymous" json:"linkScope"` // Set the scope of the links created by the link command. - LinkType string `default:"view" example:"view" json:"linkType"` // Set the type of the links created by the link command. - LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. - HashType string `default:"auto" example:"auto" json:"hashType"` // Specify the hash in use for the backend. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Region string `json:"region" default:"global" example:"global"` // Choose national cloud region for OneDrive. + ChunkSize string `json:"chunkSize" default:"10Mi"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). + DriveId string `json:"driveId"` // The ID of the drive to use. + DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + AccessScopes string `json:"accessScopes" default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access"` // Set scopes to be requested by rclone. + DisableSitePermission bool `json:"disableSitePermission" default:"false"` // Disable the request for Sites.Read.All permission. + ExposeOnenoteFiles bool `json:"exposeOnenoteFiles" default:"false"` // Set to make OneNote files show up in directory listings. + ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk. + NoVersions bool `json:"noVersions" default:"false"` // Remove all versions on modifying operations. + LinkScope string `json:"linkScope" default:"anonymous" example:"anonymous"` // Set the scope of the links created by the link command. + LinkType string `json:"linkType" default:"view" example:"view"` // Set the type of the links created by the link command. + LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. + HashType string `json:"hashType" default:"auto" example:"auto"` // Specify the hash in use for the backend. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. } type createOnedriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config onedriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -830,29 +830,29 @@ type createOnedriveStorageRequest struct { func createOnedriveStorage() {} type oosEnv_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosEnv_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosEnv_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -871,29 +871,29 @@ type createOosEnv_authStorageRequest struct { func createOosEnv_authStorage() {} type oosInstance_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosInstance_principal_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosInstance_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -912,28 +912,28 @@ type createOosInstance_principal_authStorageRequest struct { func createOosInstance_principal_authStorage() {} type oosNo_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosNo_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosNo_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -952,29 +952,29 @@ type createOosNo_authStorageRequest struct { func createOosNo_authStorage() {} type oosResource_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosResource_principal_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosResource_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -993,31 +993,31 @@ type createOosResource_principal_authStorageRequest struct { func createOosResource_principal_authStorage() {} type oosUser_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - ConfigFile string `default:"~/.oci/config" example:"~/.oci/config" json:"configFile"` // Path to OCI config file - ConfigProfile string `default:"Default" example:"Default" json:"configProfile"` // Profile name inside the oci config file - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + ConfigFile string `json:"configFile" default:"~/.oci/config" example:"~/.oci/config"` // Path to OCI config file + ConfigProfile string `json:"configProfile" default:"Default" example:"Default"` // Profile name inside the oci config file + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosUser_principal_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosUser_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1036,14 +1036,14 @@ type createOosUser_principal_authStorageRequest struct { func createOosUser_principal_authStorage() {} type opendriveConfig struct { - Username string `json:"username"` // Username. - Password string `json:"password"` // Password. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - ChunkSize string `default:"10Mi" json:"chunkSize"` // Files will be uploaded in chunks this size. + Username string `json:"username"` // Username. + Password string `json:"password"` // Password. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot"` // The encoding for the backend. + ChunkSize string `json:"chunkSize" default:"10Mi"` // Files will be uploaded in chunks this size. } type createOpendriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config opendriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1062,20 +1062,20 @@ type createOpendriveStorageRequest struct { func createOpendriveStorage() {} type pcloudConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - RootFolderId string `default:"d0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. - Hostname string `default:"api.pcloud.com" example:"api.pcloud.com" json:"hostname"` // Hostname to connect to. - Username string `json:"username"` // Your pcloud username. - Password string `json:"password"` // Your pcloud password. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + RootFolderId string `json:"rootFolderId" default:"d0"` // Fill in for rclone to use a non root folder as its starting point. + Hostname string `json:"hostname" default:"api.pcloud.com" example:"api.pcloud.com"` // Hostname to connect to. + Username string `json:"username"` // Your pcloud username. + Password string `json:"password"` // Your pcloud password. } type createPcloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config pcloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1095,11 +1095,11 @@ func createPcloudStorage() {} type premiumizemeConfig struct { ApiKey string `json:"apiKey"` // API Key. - Encoding string `default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createPremiumizemeStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config premiumizemeConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1118,11 +1118,11 @@ type createPremiumizemeStorageRequest struct { func createPremiumizemeStorage() {} type putioConfig struct { - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createPutioStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config putioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1141,20 +1141,20 @@ type createPutioStorageRequest struct { func createPutioStorage() {} type qingstorConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get QingStor credentials from runtime. - AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). - Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. - Zone string `example:"pek3a" json:"zone"` // Zone to connect to. - ConnectionRetries int `default:"3" json:"connectionRetries"` // Number of connection retries. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"4Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"1" json:"uploadConcurrency"` // Concurrency for multipart uploads. - Encoding string `default:"Slash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get QingStor credentials from runtime. + AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). + Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. + Zone string `json:"zone" example:"pek3a"` // Zone to connect to. + ConnectionRetries int `json:"connectionRetries" default:"3"` // Number of connection retries. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"4Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"1"` // Concurrency for multipart uploads. + Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8"` // The encoding for the backend. } type createQingstorStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config qingstorConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1173,58 +1173,58 @@ type createQingstorStorageRequest struct { func createQingstorStorage() {} type s3AWSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"us-east-1" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `example:"" json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - RequesterPays bool `default:"false" json:"requesterPays"` // Enables requester pays option when interacting with S3 bucket. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - UseAccelerateEndpoint bool `default:"false" json:"useAccelerateEndpoint"` // If true use the AWS S3 accelerated endpoint. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata - StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"us-east-1"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint" example:""` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + RequesterPays bool `json:"requesterPays" default:"false"` // Enables requester pays option when interacting with S3 bucket. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + UseAccelerateEndpoint bool `json:"useAccelerateEndpoint" default:"false"` // If true use the AWS S3 accelerated endpoint. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. } type createS3AWSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AWSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1243,46 +1243,46 @@ type createS3AWSStorageRequest struct { func createS3AWSStorage() {} type s3AlibabaConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"oss-accelerate.aliyuncs.com" json:"endpoint"` // Endpoint for OSS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in OSS. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"oss-accelerate.aliyuncs.com"` // Endpoint for OSS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in OSS. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3AlibabaStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AlibabaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1301,47 +1301,47 @@ type createS3AlibabaStorageRequest struct { func createS3AlibabaStorage() {} type s3ArvanCloudConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"s3.ir-thr-at1.arvanstorage.com" json:"endpoint"` // Endpoint for Arvan Cloud Object Storage (AOS) API. - LocationConstraint string `example:"ir-thr-at1" json:"locationConstraint"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in ArvanCloud. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"s3.ir-thr-at1.arvanstorage.com"` // Endpoint for Arvan Cloud Object Storage (AOS) API. + LocationConstraint string `json:"locationConstraint" example:"ir-thr-at1"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in ArvanCloud. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3ArvanCloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ArvanCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1360,53 +1360,53 @@ type createS3ArvanCloudStorageRequest struct { func createS3ArvanCloudStorage() {} type s3CephConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3CephStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CephConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1425,52 +1425,52 @@ type createS3CephStorageRequest struct { func createS3CephStorage() {} type s3ChinaMobileConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"eos-wuxi-1.cmecloud.cn" json:"endpoint"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. - LocationConstraint string `example:"wuxi1" json:"locationConstraint"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in ChinaMobile. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"eos-wuxi-1.cmecloud.cn"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. + LocationConstraint string `json:"locationConstraint" example:"wuxi1"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in ChinaMobile. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3ChinaMobileStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ChinaMobileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1489,45 +1489,45 @@ type createS3ChinaMobileStorageRequest struct { func createS3ChinaMobileStorage() {} type s3CloudflareConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"auto" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"auto"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3CloudflareStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CloudflareConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1546,47 +1546,47 @@ type createS3CloudflareStorageRequest struct { func createS3CloudflareStorage() {} type s3DigitalOceanConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"syd1.digitaloceanspaces.com" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"syd1.digitaloceanspaces.com"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3DigitalOceanStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DigitalOceanConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1605,47 +1605,47 @@ type createS3DigitalOceanStorageRequest struct { func createS3DigitalOceanStorage() {} type s3DreamhostConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"objects-us-east-1.dream.io" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"objects-us-east-1.dream.io"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3DreamhostStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DreamhostConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1664,46 +1664,46 @@ type createS3DreamhostStorageRequest struct { func createS3DreamhostStorage() {} type s3HuaweiOBSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"af-south-1" json:"region"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. - Endpoint string `example:"obs.af-south-1.myhuaweicloud.com" json:"endpoint"` // Endpoint for OBS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"af-south-1"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. + Endpoint string `json:"endpoint" example:"obs.af-south-1.myhuaweicloud.com"` // Endpoint for OBS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3HuaweiOBSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3HuaweiOBSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1722,47 +1722,47 @@ type createS3HuaweiOBSStorageRequest struct { func createS3HuaweiOBSStorage() {} type s3IBMCOSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.us.cloud-object-storage.appdomain.cloud" json:"endpoint"` // Endpoint for IBM COS S3 API. - LocationConstraint string `example:"us-standard" json:"locationConstraint"` // Location constraint - must match endpoint when using IBM Cloud Public. - Acl string `example:"private" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.us.cloud-object-storage.appdomain.cloud"` // Endpoint for IBM COS S3 API. + LocationConstraint string `json:"locationConstraint" example:"us-standard"` // Location constraint - must match endpoint when using IBM Cloud Public. + Acl string `json:"acl" example:"private"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3IBMCOSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IBMCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1781,44 +1781,44 @@ type createS3IBMCOSStorageRequest struct { func createS3IBMCOSStorage() {} type s3IDriveConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3IDriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IDriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1837,46 +1837,46 @@ type createS3IDriveStorageRequest struct { func createS3IDriveStorage() {} type s3IONOSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"de" json:"region"` // Region where your bucket will be created and your data stored. - Endpoint string `example:"s3-eu-central-1.ionoscloud.com" json:"endpoint"` // Endpoint for IONOS S3 Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"de"` // Region where your bucket will be created and your data stored. + Endpoint string `json:"endpoint" example:"s3-eu-central-1.ionoscloud.com"` // Endpoint for IONOS S3 Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3IONOSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IONOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1895,46 +1895,46 @@ type createS3IONOSStorageRequest struct { func createS3IONOSStorage() {} type s3LiaraConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"storage.iran.liara.space" json:"endpoint"` // Endpoint for Liara Object Storage API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Liara - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"storage.iran.liara.space"` // Endpoint for Liara Object Storage API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Liara + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3LiaraStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LiaraConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1953,47 +1953,47 @@ type createS3LiaraStorageRequest struct { func createS3LiaraStorage() {} type s3LyveCloudConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.us-east-1.lyvecloud.seagate.com" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.us-east-1.lyvecloud.seagate.com"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3LyveCloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LyveCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2012,53 +2012,53 @@ type createS3LyveCloudStorageRequest struct { func createS3LyveCloudStorage() {} type s3MinioConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3MinioStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3MinioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2077,47 +2077,47 @@ type createS3MinioStorageRequest struct { func createS3MinioStorage() {} type s3NeteaseConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3NeteaseStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3NeteaseConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2136,47 +2136,47 @@ type createS3NeteaseStorageRequest struct { func createS3NeteaseStorage() {} type s3OtherConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3OtherStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3OtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2195,48 +2195,48 @@ type createS3OtherStorageRequest struct { func createS3OtherStorage() {} type s3QiniuConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"cn-east-1" json:"region"` // Region to connect to. - Endpoint string `example:"s3-cn-east-1.qiniucs.com" json:"endpoint"` // Endpoint for Qiniu Object Storage. - LocationConstraint string `example:"cn-east-1" json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Qiniu. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"cn-east-1"` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3-cn-east-1.qiniucs.com"` // Endpoint for Qiniu Object Storage. + LocationConstraint string `json:"locationConstraint" example:"cn-east-1"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Qiniu. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3QiniuStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3QiniuConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2255,47 +2255,47 @@ type createS3QiniuStorageRequest struct { func createS3QiniuStorage() {} type s3RackCorpConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"global" json:"region"` // region - the location where your bucket will be created and your data stored. - Endpoint string `example:"s3.rackcorp.com" json:"endpoint"` // Endpoint for RackCorp Object Storage. - LocationConstraint string `example:"global" json:"locationConstraint"` // Location constraint - the location where your bucket will be located and your data stored. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"global"` // region - the location where your bucket will be created and your data stored. + Endpoint string `json:"endpoint" example:"s3.rackcorp.com"` // Endpoint for RackCorp Object Storage. + LocationConstraint string `json:"locationConstraint" example:"global"` // Location constraint - the location where your bucket will be located and your data stored. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3RackCorpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3RackCorpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2314,47 +2314,47 @@ type createS3RackCorpStorageRequest struct { func createS3RackCorpStorage() {} type s3ScalewayConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"nl-ams" json:"region"` // Region to connect to. - Endpoint string `example:"s3.nl-ams.scw.cloud" json:"endpoint"` // Endpoint for Scaleway Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"nl-ams"` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.nl-ams.scw.cloud"` // Endpoint for Scaleway Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3ScalewayStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ScalewayConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2373,47 +2373,47 @@ type createS3ScalewayStorageRequest struct { func createS3ScalewayStorage() {} type s3SeaweedFSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"localhost:8333" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"localhost:8333"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3SeaweedFSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3SeaweedFSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2432,46 +2432,46 @@ type createS3SeaweedFSStorageRequest struct { func createS3SeaweedFSStorage() {} type s3StackPathConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.us-east-2.stackpathstorage.com" json:"endpoint"` // Endpoint for StackPath Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.us-east-2.stackpathstorage.com"` // Endpoint for StackPath Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3StackPathStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StackPathConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2490,44 +2490,44 @@ type createS3StackPathStorageRequest struct { func createS3StackPathStorage() {} type s3StorjConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"gateway.storjshare.io" json:"endpoint"` // Endpoint for Storj Gateway. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"gateway.storjshare.io"` // Endpoint for Storj Gateway. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3StorjStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StorjConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2546,46 +2546,46 @@ type createS3StorjStorageRequest struct { func createS3StorjStorage() {} type s3TencentCOSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"cos.ap-beijing.myqcloud.com" json:"endpoint"` // Endpoint for Tencent COS API. - Acl string `example:"default" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in Tencent COS. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"cos.ap-beijing.myqcloud.com"` // Endpoint for Tencent COS API. + Acl string `json:"acl" example:"default"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in Tencent COS. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3TencentCOSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3TencentCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2604,47 +2604,47 @@ type createS3TencentCOSStorageRequest struct { func createS3TencentCOSStorage() {} type s3WasabiConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.wasabisys.com" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.wasabisys.com"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3WasabiStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3WasabiConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2663,19 +2663,19 @@ type createS3WasabiStorageRequest struct { func createS3WasabiStorage() {} type seafileConfig struct { - Url string `example:"https://cloud.seafile.com/" json:"url"` // URL of seafile host to connect to. - User string `json:"user"` // User name (usually email address). - Pass string `json:"pass"` // Password. - TwoFA bool `default:"false" json:"2fa"` // Two-factor authentication ('true' if the account has 2FA enabled). - Library string `json:"library"` // Name of the library. - LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). - CreateLibrary bool `default:"false" json:"createLibrary"` // Should rclone create a library if it doesn't exist. - AuthToken string `json:"authToken"` // Authentication token. - Encoding string `default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. + Url string `json:"url" example:"https://cloud.seafile.com/"` // URL of seafile host to connect to. + User string `json:"user"` // User name (usually email address). + Pass string `json:"pass"` // Password. + TwoFA bool `json:"2fa" default:"false"` // Two-factor authentication ('true' if the account has 2FA enabled). + Library string `json:"library"` // Name of the library. + LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). + CreateLibrary bool `json:"createLibrary" default:"false"` // Should rclone create a library if it doesn't exist. + AuthToken string `json:"authToken"` // Authentication token. + Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8"` // The encoding for the backend. } type createSeafileStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config seafileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2694,41 +2694,41 @@ type createSeafileStorageRequest struct { func createSeafileStorage() {} type sftpConfig struct { - Host string `json:"host"` // SSH host to connect to. - User string `default:"$USER" json:"user"` // SSH username. - Port int `default:"22" json:"port"` // SSH port number. - Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. - KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. - KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. - KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. - PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. - KnownHostsFile string `example:"~/.ssh/known_hosts" json:"knownHostsFile"` // Optional path to known_hosts file. - KeyUseAgent bool `default:"false" json:"keyUseAgent"` // When set forces the usage of the ssh-agent. - UseInsecureCipher bool `default:"false" example:"false" json:"useInsecureCipher"` // Enable the use of insecure ciphers and key exchange methods. - DisableHashcheck bool `default:"false" json:"disableHashcheck"` // Disable the execution of SSH commands to determine if remote file hashing is available. - AskPassword bool `default:"false" json:"askPassword"` // Allow asking for SFTP password when needed. - PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. - SetModtime bool `default:"true" json:"setModtime"` // Set the modified time on the remote if set. - ShellType string `example:"none" json:"shellType"` // The type of SSH shell on remote server, if any. - Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. - Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. - SkipLinks bool `default:"false" json:"skipLinks"` // Set to skip any symlinks and any other non regular files. - Subsystem string `default:"sftp" json:"subsystem"` // Specifies the SSH2 subsystem on the remote host. - ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. - UseFstat bool `default:"false" json:"useFstat"` // If set use fstat instead of stat. - DisableConcurrentReads bool `default:"false" json:"disableConcurrentReads"` // If set don't use concurrent reads. - DisableConcurrentWrites bool `default:"false" json:"disableConcurrentWrites"` // If set don't use concurrent writes. - IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. - ChunkSize string `default:"32Ki" json:"chunkSize"` // Upload and download chunk size. - Concurrency int `default:"64" json:"concurrency"` // The maximum number of outstanding requests for one file - SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands - Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. - KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. - Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. + Host string `json:"host"` // SSH host to connect to. + User string `json:"user" default:"$USER"` // SSH username. + Port int `json:"port" default:"22"` // SSH port number. + Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. + KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. + KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. + KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. + PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. + KnownHostsFile string `json:"knownHostsFile" example:"~/.ssh/known_hosts"` // Optional path to known_hosts file. + KeyUseAgent bool `json:"keyUseAgent" default:"false"` // When set forces the usage of the ssh-agent. + UseInsecureCipher bool `json:"useInsecureCipher" default:"false" example:"false"` // Enable the use of insecure ciphers and key exchange methods. + DisableHashcheck bool `json:"disableHashcheck" default:"false"` // Disable the execution of SSH commands to determine if remote file hashing is available. + AskPassword bool `json:"askPassword" default:"false"` // Allow asking for SFTP password when needed. + PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. + SetModtime bool `json:"setModtime" default:"true"` // Set the modified time on the remote if set. + ShellType string `json:"shellType" example:"none"` // The type of SSH shell on remote server, if any. + Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. + Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. + SkipLinks bool `json:"skipLinks" default:"false"` // Set to skip any symlinks and any other non regular files. + Subsystem string `json:"subsystem" default:"sftp"` // Specifies the SSH2 subsystem on the remote host. + ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. + UseFstat bool `json:"useFstat" default:"false"` // If set use fstat instead of stat. + DisableConcurrentReads bool `json:"disableConcurrentReads" default:"false"` // If set don't use concurrent reads. + DisableConcurrentWrites bool `json:"disableConcurrentWrites" default:"false"` // If set don't use concurrent writes. + IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. + ChunkSize string `json:"chunkSize" default:"32Ki"` // Upload and download chunk size. + Concurrency int `json:"concurrency" default:"64"` // The maximum number of outstanding requests for one file + SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands + Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. + KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. + Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. } type createSftpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2747,15 +2747,15 @@ type createSftpStorageRequest struct { func createSftpStorage() {} type sharefileConfig struct { - UploadCutoff string `default:"128Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload. - RootFolderId string `example:"" json:"rootFolderId"` // ID of the root folder. - ChunkSize string `default:"64Mi" json:"chunkSize"` // Upload chunk size. - Endpoint string `json:"endpoint"` // Endpoint for API calls. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + UploadCutoff string `json:"uploadCutoff" default:"128Mi"` // Cutoff for switching to multipart upload. + RootFolderId string `json:"rootFolderId" example:""` // ID of the root folder. + ChunkSize string `json:"chunkSize" default:"64Mi"` // Upload chunk size. + Endpoint string `json:"endpoint"` // Endpoint for API calls. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. } type createSharefileStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sharefileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2774,14 +2774,14 @@ type createSharefileStorageRequest struct { func createSharefileStorage() {} type siaConfig struct { - ApiUrl string `default:"http://127.0.0.1:9980" json:"apiUrl"` // Sia daemon API URL, like http://sia.daemon.host:9980. - ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. - UserAgent string `default:"Sia-Agent" json:"userAgent"` // Siad User Agent - Encoding string `default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ApiUrl string `json:"apiUrl" default:"http://127.0.0.1:9980"` // Sia daemon API URL, like http://sia.daemon.host:9980. + ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. + UserAgent string `json:"userAgent" default:"Sia-Agent"` // Siad User Agent + Encoding string `json:"encoding" default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createSiaStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config siaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2800,20 +2800,20 @@ type createSiaStorageRequest struct { func createSiaStorage() {} type smbConfig struct { - Host string `json:"host"` // SMB server hostname to connect to. - User string `default:"$USER" json:"user"` // SMB username. - Port int `default:"445" json:"port"` // SMB port number. - Pass string `json:"pass"` // SMB password. - Domain string `default:"WORKGROUP" json:"domain"` // Domain name for NTLM authentication. - Spn string `json:"spn"` // Service principal name. - IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. - HideSpecialShare bool `default:"true" json:"hideSpecialShare"` // Hide special shares (e.g. print$) which users aren't supposed to access. - CaseInsensitive bool `default:"true" json:"caseInsensitive"` // Whether the server is configured to be case-insensitive. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Host string `json:"host"` // SMB server hostname to connect to. + User string `json:"user" default:"$USER"` // SMB username. + Port int `json:"port" default:"445"` // SMB port number. + Pass string `json:"pass"` // SMB password. + Domain string `json:"domain" default:"WORKGROUP"` // Domain name for NTLM authentication. + Spn string `json:"spn"` // Service principal name. + IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. + HideSpecialShare bool `json:"hideSpecialShare" default:"true"` // Hide special shares (e.g. print$) which users aren't supposed to access. + CaseInsensitive bool `json:"caseInsensitive" default:"true"` // Whether the server is configured to be case-insensitive. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. } type createSmbStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config smbConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2836,7 +2836,7 @@ type storjExistingConfig struct { } type createStorjExistingStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjExistingConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2855,13 +2855,13 @@ type createStorjExistingStorageRequest struct { func createStorjExistingStorage() {} type storjNewConfig struct { - SatelliteAddress string `default:"us1.storj.io" example:"us1.storj.io" json:"satelliteAddress"` // Satellite address. + SatelliteAddress string `json:"satelliteAddress" default:"us1.storj.io" example:"us1.storj.io"` // Satellite address. ApiKey string `json:"apiKey"` // API key. Passphrase string `json:"passphrase"` // Encryption passphrase. } type createStorjNewStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjNewConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2880,21 +2880,21 @@ type createStorjNewStorageRequest struct { func createStorjNewStorage() {} type sugarsyncConfig struct { - AppId string `json:"appId"` // Sugarsync App ID. - AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. - PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. - HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files if true - RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. - Authorization string `json:"authorization"` // Sugarsync authorization. - AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. - User string `json:"user"` // Sugarsync user. - RootId string `json:"rootId"` // Sugarsync root id. - DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. - Encoding string `default:"Slash,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + AppId string `json:"appId"` // Sugarsync App ID. + AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. + PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. + HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files if true + RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. + Authorization string `json:"authorization"` // Sugarsync authorization. + AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. + User string `json:"user"` // Sugarsync user. + RootId string `json:"rootId"` // Sugarsync root id. + DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. + Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createSugarsyncStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sugarsyncConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2913,33 +2913,33 @@ type createSugarsyncStorageRequest struct { func createSugarsyncStorage() {} type swiftConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get swift credentials from environment variables in standard OpenStack form. - User string `json:"user"` // User name to log in (OS_USERNAME). - Key string `json:"key"` // API key or password (OS_PASSWORD). - Auth string `example:"https://auth.api.rackspacecloud.com/v1.0" json:"auth"` // Authentication URL for server (OS_AUTH_URL). - UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). - Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) - Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). - TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). - TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). - Region string `json:"region"` // Region name - optional (OS_REGION_NAME). - StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). - AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). - ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). - ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). - ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). - AuthVersion int `default:"0" json:"authVersion"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). - EndpointType string `default:"public" example:"public" json:"endpointType"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure. - StoragePolicy string `example:"" json:"storagePolicy"` // The storage policy to use when creating a new container. - ChunkSize string `default:"5Gi" json:"chunkSize"` // Above this size files will be chunked into a _segments container. - NoChunk bool `default:"false" json:"noChunk"` // Don't chunk files during streaming upload. - NoLargeObjects bool `default:"false" json:"noLargeObjects"` // Disable support for static and dynamic large objects - Encoding string `default:"Slash,InvalidUtf8" json:"encoding"` // The encoding for the backend. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get swift credentials from environment variables in standard OpenStack form. + User string `json:"user"` // User name to log in (OS_USERNAME). + Key string `json:"key"` // API key or password (OS_PASSWORD). + Auth string `json:"auth" example:"https://auth.api.rackspacecloud.com/v1.0"` // Authentication URL for server (OS_AUTH_URL). + UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). + Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) + Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). + TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). + TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). + Region string `json:"region"` // Region name - optional (OS_REGION_NAME). + StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). + AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). + ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). + ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). + ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). + AuthVersion int `json:"authVersion" default:"0"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). + EndpointType string `json:"endpointType" default:"public" example:"public"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure. + StoragePolicy string `json:"storagePolicy" example:""` // The storage policy to use when creating a new container. + ChunkSize string `json:"chunkSize" default:"5Gi"` // Above this size files will be chunked into a _segments container. + NoChunk bool `json:"noChunk" default:"false"` // Don't chunk files during streaming upload. + NoLargeObjects bool `json:"noLargeObjects" default:"false"` // Disable support for static and dynamic large objects + Encoding string `json:"encoding" default:"Slash,InvalidUtf8"` // The encoding for the backend. } type createSwiftStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config swiftConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2958,16 +2958,16 @@ type createSwiftStorageRequest struct { func createSwiftStorage() {} type unionConfig struct { - Upstreams string `json:"upstreams"` // List of space separated upstreams. - ActionPolicy string `default:"epall" json:"actionPolicy"` // Policy to choose upstream on ACTION category. - CreatePolicy string `default:"epmfs" json:"createPolicy"` // Policy to choose upstream on CREATE category. - SearchPolicy string `default:"ff" json:"searchPolicy"` // Policy to choose upstream on SEARCH category. - CacheTime int `default:"120" json:"cacheTime"` // Cache time of usage and free space (in seconds). - MinFreeSpace string `default:"1Gi" json:"minFreeSpace"` // Minimum viable free space for lfs/eplfs policies. + Upstreams string `json:"upstreams"` // List of space separated upstreams. + ActionPolicy string `json:"actionPolicy" default:"epall"` // Policy to choose upstream on ACTION category. + CreatePolicy string `json:"createPolicy" default:"epmfs"` // Policy to choose upstream on CREATE category. + SearchPolicy string `json:"searchPolicy" default:"ff"` // Policy to choose upstream on SEARCH category. + CacheTime int `json:"cacheTime" default:"120"` // Cache time of usage and free space (in seconds). + MinFreeSpace string `json:"minFreeSpace" default:"1Gi"` // Minimum viable free space for lfs/eplfs policies. } type createUnionStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config unionConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2987,11 +2987,11 @@ func createUnionStorage() {} type uptoboxConfig struct { AccessToken string `json:"accessToken"` // Your access token. - Encoding string `default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createUptoboxStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config uptoboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3010,18 +3010,18 @@ type createUptoboxStorageRequest struct { func createUptoboxStorage() {} type webdavConfig struct { - Url string `json:"url"` // URL of http host to connect to. - Vendor string `example:"nextcloud" json:"vendor"` // Name of the WebDAV site/service/software you are using. - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). - BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. - Encoding string `json:"encoding"` // The encoding for the backend. - Headers string `json:"headers"` // Set HTTP headers for all transactions. + Url string `json:"url"` // URL of http host to connect to. + Vendor string `json:"vendor" example:"nextcloud"` // Name of the WebDAV site/service/software you are using. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). + BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. + Encoding string `json:"encoding"` // The encoding for the backend. + Headers string `json:"headers"` // Set HTTP headers for all transactions. } type createWebdavStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config webdavConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3040,17 +3040,17 @@ type createWebdavStorageRequest struct { func createWebdavStorage() {} type yandexConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. - Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. + Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createYandexStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config yandexConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3074,12 +3074,12 @@ type zohoConfig struct { Token string `json:"token"` // OAuth Access Token as a JSON blob. AuthUrl string `json:"authUrl"` // Auth server URL. TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `example:"com" json:"region"` // Zoho region to connect to. - Encoding string `default:"Del,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. + Region string `json:"region" example:"com"` // Zoho region to connect to. + Encoding string `json:"encoding" default:"Del,Ctl,InvalidUtf8"` // The encoding for the backend. } type createZohoStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config zohoConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client diff --git a/handler/wallet/attach.go b/handler/wallet/attach.go index e2b374bf..c02d1b9c 100644 --- a/handler/wallet/attach.go +++ b/handler/wallet/attach.go @@ -38,7 +38,7 @@ func (DefaultHandler) AttachHandler( } var w model.Wallet - err = db.Where("address = ? OR id = ?", wallet, wallet).First(&w).Error + err = w.FindByIDOrAddr(db, wallet) if errors.Is(err, gorm.ErrRecordNotFound) { return nil, errors.Wrapf(handlererror.ErrNotFound, "wallet %s not found", wallet) } diff --git a/handler/wallet/create.go b/handler/wallet/create.go index a1fc2fc2..79fbf323 100644 --- a/handler/wallet/create.go +++ b/handler/wallet/create.go @@ -3,7 +3,9 @@ package wallet import ( "context" "crypto/rand" + "encoding/base64" "encoding/hex" + "encoding/json" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/database" @@ -43,7 +45,18 @@ func GenerateKey(keyType string) (string, string, error) { if err != nil { return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) } - privKey = hex.EncodeToString(kb) + + // Format the private key as a Lotus exported key (JSON format) + privKeyJSON := map[string]interface{}{ + "Type": "secp256k1", + "PrivateKey": base64.StdEncoding.EncodeToString(kb), + } + + privKeyBytes, err := json.Marshal(privKeyJSON) + if err != nil { + return "", "", xerrors.Errorf("failed to marshal private key to JSON: %w", err) + } + privKey = hex.EncodeToString(privKeyBytes) // Get the public key from private key pubKey := crypto.PublicKey(kb) @@ -56,7 +69,20 @@ func GenerateKey(keyType string) (string, string, error) { if err != nil { return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) } - privKey = priv.String() + + // Format the private key as a Lotus exported key (JSON format) + // Convert the private key to base64 format + privKeyBytes := priv.Serialize() + privKeyJSON := map[string]interface{}{ + "Type": "bls", + "PrivateKey": base64.StdEncoding.EncodeToString(privKeyBytes[:]), + } + + privKeyJSONBytes, err := json.Marshal(privKeyJSON) + if err != nil { + return "", "", xerrors.Errorf("failed to marshal private key to JSON: %w", err) + } + privKey = hex.EncodeToString(privKeyJSONBytes) // Get the public key from private key pub := g1.PrivToPub(priv) @@ -82,7 +108,7 @@ type CreateRequest struct { // @Accept json // @Produce json // @Param request body CreateRequest true "Request body" -// @Success 200 {array} model.Wallet +// @Success 200 {object} model.Wallet // @Failure 400 {object} api.HTTPError // @Failure 500 {object} api.HTTPError // @Router /wallet/create [post] @@ -111,7 +137,6 @@ func (DefaultHandler) CreateHandler( } wallet := model.Wallet{ - ActorID: address, Address: address, PrivateKey: privateKey, } diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go index bd45e658..a966c48f 100644 --- a/handler/wallet/create_test.go +++ b/handler/wallet/create_test.go @@ -4,8 +4,6 @@ import ( "context" "testing" - "github.com/data-preservation-programs/singularity/handler/handlererror" - "github.com/data-preservation-programs/singularity/util" "github.com/data-preservation-programs/singularity/util/testutil" "github.com/stretchr/testify/require" "gorm.io/gorm" @@ -13,19 +11,12 @@ import ( func TestCreateHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - lotusClient := util.NewLotusClient("https://api.node.glif.io/rpc/v0", "") - t.Run("success-secp256k1", func(t *testing.T) { w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTSecp256k1.String()}) require.NoError(t, err) require.NotEmpty(t, w.Address) require.Equal(t, "f1", w.Address[:2]) - require.Equal(t, "hello", w.PrivateKey) - - _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ - PrivateKey: w.PrivateKey, - }) - require.ErrorIs(t, err, handlererror.ErrDuplicateRecord) + require.NotEmpty(t, w.PrivateKey) }) t.Run("success-bls", func(t *testing.T) { @@ -33,11 +24,7 @@ func TestCreateHandler(t *testing.T) { require.NoError(t, err) require.NotEmpty(t, w.Address) require.Equal(t, "f3", w.Address[:2]) - - _, err = Default.ImportHandler(ctx, db, lotusClient, ImportRequest{ - PrivateKey: w.PrivateKey, - }) - require.ErrorIs(t, err, handlererror.ErrDuplicateRecord) + require.NotEmpty(t, w.PrivateKey) }) t.Run("invalid-key-type", func(t *testing.T) { diff --git a/handler/wallet/remove.go b/handler/wallet/remove.go index cb5ecbfd..30a37eec 100644 --- a/handler/wallet/remove.go +++ b/handler/wallet/remove.go @@ -2,6 +2,7 @@ package wallet import ( "context" + "strconv" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/database" @@ -27,7 +28,12 @@ func (DefaultHandler) RemoveHandler( db = db.WithContext(ctx) var affected int64 err := database.DoRetry(ctx, func() error { - tx := db.Where("address = ? OR id = ?", address, address).Delete(&model.Wallet{}) + var tx *gorm.DB + if id, err := strconv.Atoi(address); err == nil { + tx = db.Where("id = ?", id).Delete(&model.Wallet{}) + } else { + tx = db.Where("address = ? OR actor_id = ?", address, address).Delete(&model.Wallet{}) + } affected = tx.RowsAffected return tx.Error }) diff --git a/migrate/migrations/202505010840_wallet_actor_id.go b/migrate/migrations/202505010840_wallet_actor_id.go index 3f7b7e58..c00e42cd 100644 --- a/migrate/migrations/202505010840_wallet_actor_id.go +++ b/migrate/migrations/202505010840_wallet_actor_id.go @@ -1,6 +1,7 @@ package migrations import ( + "fmt" "time" "github.com/go-gormigrate/gormigrate/v2" @@ -9,10 +10,11 @@ import ( // Create migration for initial database schema func _202505010840_wallet_actor_id() *gormigrate.Migration { - // Table name - const WALLET_TABLE_NAME = "wallets" + // Table names + const WALLET_TABLE = "wallets" + const DEAL_TABLE = "deals" - // Temporary struct for old schema + // Temporary struct for old Wallet schema type OldWallet struct { ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet @@ -25,53 +27,98 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { SPWallet WalletType = "SPWallet" ) - // Temporary struct for new schema + type WalletID uint + + // Temporary struct for new Wallet schema type NewWallet struct { - ID uint `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet + ID WalletID `gorm:"primaryKey" json:"id"` + ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet Balance float64 `json:"balance"` // Balance is in Fil cached from chain BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - BalanceUpdatedAt time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets Location string `json:"location"` // Location is optional region, country for SP wallets PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - Type WalletType `json:"type"` // Type determines user or SP wallets + WalletType WalletType `gorm:"default:'UserWallet'" json:"walletType"` + } + + type NewDeal struct { + ID uint64 `gorm:"column:id"` + ClientActorID string `json:"clientActorId"` + ClientID *WalletID `gorm:"index:idx_pending" json:"clientId"` + Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` + } + type OldDeal struct { + ID uint64 `gorm:"column:id"` + ClientID string `gorm:"index:idx_pending" json:"clientId"` + Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` } return &gormigrate.Migration{ ID: "202505010840", Migrate: func(tx *gorm.DB) error { // Create new table - err := tx.Migrator().CreateTable(&NewWallet{}) - if err != nil { - return err + if err := tx.Migrator().AutoMigrate(&NewWallet{}); err != nil { + return fmt.Errorf("failed to create new wallets table: %w", err) } // Copy data from old to new table var oldWallets []OldWallet - if err := tx.Table(WALLET_TABLE_NAME).Find(&oldWallets).Error; err != nil { + if err := tx.Table(WALLET_TABLE).Find(&oldWallets).Error; err != nil { return err } - + // Create map to store old ID => new ID of wallet + idMap := make(map[string]WalletID) for _, oldWallet := range oldWallets { newWallet := NewWallet{ ActorID: oldWallet.ID, Address: oldWallet.Address, PrivateKey: oldWallet.PrivateKey, - Type: UserWallet, + WalletType: UserWallet, } if err := tx.Create(&newWallet).Error; err != nil { return err } + idMap[newWallet.ActorID] = newWallet.ID } - // Drop old table and rename new table - if err := tx.Migrator().DropTable(WALLET_TABLE_NAME); err != nil { + // Modify Deals table to replace ActorID FK with new ID column + // Drop old FK constraint since Wallet ID type changed + if err := tx.Migrator().DropConstraint(DEAL_TABLE, "fk_deals_wallet"); err != nil { + // constraint might not exist or have different name, so continue on + fmt.Printf("Warning: could not drop foreign key constraint: %v\n", err) + } + // Rename old column to make it clear it's not the FK + if err := tx.Migrator().RenameColumn(DEAL_TABLE, "client_id", "client_actor_id"); err != nil { + return fmt.Errorf("failed to rename ClientID to ClientActorID: %w", err) + } + // Add new column for updated type + if err := tx.Table(DEAL_TABLE).Migrator().AddColumn(&NewDeal{}, "ClientID"); err != nil { + return fmt.Errorf("failed to create new client_id column: %w", err) + } + // Update data using ID map + var dealRows []NewDeal + if err := tx.Table(DEAL_TABLE).Select("id, client_actor_id, client_id").Find(&dealRows).Error; err != nil { + return fmt.Errorf("failed to fetch deal rows: %w", err) + } + for _, deal := range dealRows { + if err := tx.Table(DEAL_TABLE).Where("id = ?", deal.ID).Update("client_id", idMap[deal.ClientActorID]).Error; err != nil { + return fmt.Errorf("failed to update deal %d with new ClientID: %w", deal.ID, err) + } + } + + // Add new FK constraint on deals table + if err := tx.Table(DEAL_TABLE).Migrator().CreateConstraint(&NewDeal{}, "Wallet"); err != nil { + return fmt.Errorf("failed to add foreign key constraint: %w", err) + } + + // Drop old wallets table and rename new wallets table + if err := tx.Migrator().DropTable(WALLET_TABLE); err != nil { return err } - return tx.Migrator().RenameTable(&NewWallet{}, WALLET_TABLE_NAME) + return tx.Migrator().RenameTable(&NewWallet{}, WALLET_TABLE) }, Rollback: func(tx *gorm.DB) error { // Create old table @@ -82,7 +129,7 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { // Copy data from new to old table var newWallets []NewWallet - if err := tx.Table(WALLET_TABLE_NAME).Find(&newWallets).Error; err != nil { + if err := tx.Table(WALLET_TABLE).Find(&newWallets).Error; err != nil { return err } @@ -97,11 +144,30 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { } } + // Modify Deal table back to original FK + // Drop old FK constraint since Wallet ID type changed + if err := tx.Migrator().DropConstraint(DEAL_TABLE, "fk_deals_wallet"); err != nil { + // constraint might not exist or have different name, so continue on + fmt.Printf("Warning: could not drop foreign key constraint: %v\n", err) + } + // Drop new column + if err := tx.Table(DEAL_TABLE).Migrator().DropColumn(&NewDeal{}, "ClientID"); err != nil { + return fmt.Errorf("failed to drop ClientID column: %w", err) + } + // Rename old column back to FK + if err := tx.Migrator().RenameColumn(DEAL_TABLE, "client_actor_id", "client_id"); err != nil { + return fmt.Errorf("failed to rename ClientID to ClientActorID: %w", err) + } + // Add original constraint back + if err := tx.Table(DEAL_TABLE).Migrator().CreateConstraint(&OldDeal{}, "Wallet"); err != nil { + return fmt.Errorf("failed to add foreign key constraint: %w", err) + } + // Drop new table and rename old table - if err := tx.Migrator().DropTable(WALLET_TABLE_NAME); err != nil { + if err := tx.Migrator().DropTable(WALLET_TABLE); err != nil { return err } - return tx.Migrator().RenameTable(&OldWallet{}, WALLET_TABLE_NAME) + return tx.Migrator().RenameTable(&OldWallet{}, WALLET_TABLE) }, } } diff --git a/model/replication.go b/model/replication.go index 066e8291..cc45d91b 100644 --- a/model/replication.go +++ b/model/replication.go @@ -4,6 +4,8 @@ import ( "fmt" "strconv" "time" + + "gorm.io/gorm" ) type DealState string @@ -81,6 +83,7 @@ type Deal struct { LastVerifiedAt *time.Time `json:"lastVerifiedAt" table:"verbose;format:2006-01-02 15:04:05"` // LastVerifiedAt is the last time the deal was verified as active by the tracker DealID *uint64 `gorm:"unique" json:"dealId"` State DealState `gorm:"index:idx_pending" json:"state"` + ClientActorID string `json:"clientActorId"` Provider string `json:"provider"` ProposalID string `json:"proposalId" table:"verbose"` Label string `json:"label" table:"verbose"` @@ -96,13 +99,13 @@ type Deal struct { // Associations ScheduleID *ScheduleID `json:"scheduleId" table:"verbose"` Schedule *Schedule `gorm:"foreignKey:ScheduleID;constraint:OnDelete:SET NULL" json:"schedule,omitempty" swaggerignore:"true" table:"expand"` - ClientID string `gorm:"index:idx_pending" json:"clientId"` + ClientID *WalletID `gorm:"index:idx_pending" json:"clientId"` Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` } // Key returns a mostly unique key to match deal from locally proposed deals and deals from the chain. func (d Deal) Key() string { - return fmt.Sprintf("%s-%s-%s-%d-%d", d.ClientID, d.Provider, d.PieceCID.String(), d.StartEpoch, d.EndEpoch) + return fmt.Sprintf("%s-%s-%s-%d-%d", d.ClientActorID, d.Provider, d.PieceCID.String(), d.StartEpoch, d.EndEpoch) } type ScheduleID uint32 @@ -141,6 +144,7 @@ type Schedule struct { Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` } +// WalletType distinguishes between user wallets and storage provider wallets type WalletType string const ( @@ -148,16 +152,64 @@ const ( SPWallet WalletType = "SPWallet" ) +var WalletTypes = []WalletType{ + UserWallet, + SPWallet, +} + +var WalletTypeStrings = []string{ + string(UserWallet), + string(SPWallet), +} + +type WalletID uint + type Wallet struct { - ID uint `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index,size:15" json:"actorId"` // ActorID is the short ID of the wallet + ID WalletID `gorm:"primaryKey" json:"id"` + ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet Balance float64 `json:"balance"` // Balance is in Fil cached from chain BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - BalanceUpdatedAt time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets Location string `json:"location"` // Location is optional region, country for SP wallets PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - Type WalletType `json:"type"` // Type determines user or SP wallets + WalletType WalletType `gorm:"default:'UserWallet'" json:"walletType"` +} + +// Find Wallet by ID, ActorID, or Address +func (wallet *Wallet) FindByIDOrAddr(db *gorm.DB, param interface{}) error { + switch v := param.(type) { + case uint, uint64: + return db.Where("id = ?", v).First(wallet).Error + case string: + // TODO: should we determine whether "f0.." or "f1..", for example? + return db.Where("actor_id = ? OR address = ?", v, v).First(wallet).Error + default: + return fmt.Errorf("unsupported parameter type: %T", param) + } } + +// Enforce unique ActorID for initialized wallets +// func (w *Wallet) BeforeSave(tx *gorm.DB) error { +// // Only check for uniqueness if ActorID is not empty, i.e. uninitialized +// if w.ActorID != "" { +// var count int64 +// // Check if another wallet with the same ActorID exists +// // Exclude the current wallet if it has an ID (for updates) +// query := tx.Model(&Wallet{}).Where("actor_id = ?", w.ActorID) +// if w.ID != 0 { +// query = query.Where("id != ?", w.ID) +// } +// err := query.Count(&count).Error +// if err != nil { +// return err +// } + +// if count > 0 { +// return fmt.Errorf("constraint failed: wallet with ActorID '%s' already exists", w.ActorID) +// } +// } +// return nil +// } diff --git a/replication/makedeal.go b/replication/makedeal.go index c85e0f98..d8dc039b 100644 --- a/replication/makedeal.go +++ b/replication/makedeal.go @@ -517,7 +517,7 @@ func (d DealConfig) GetPrice(pieceSize int64, duration time.Duration) big.Int { func (d DealMakerImpl) MakeDeal(ctx context.Context, walletObj model.Wallet, car model.Car, dealConfig DealConfig, ) (*model.Deal, error) { - logger.Infow("making deal", "client", walletObj.ID, "pieceCID", car.PieceCID.String(), "provider", dealConfig.Provider) + logger.Infow("making deal", "client", walletObj.ActorID, "pieceCID", car.PieceCID.String(), "provider", dealConfig.Provider) now := time.Now().UTC() addr, err := address.NewFromString(walletObj.Address) if err != nil { @@ -588,13 +588,14 @@ func (d DealMakerImpl) MakeDeal(ctx context.Context, walletObj model.Wallet, } dealModel := &model.Deal{ - State: model.DealProposed, - ClientID: walletObj.ActorID, - Provider: dealConfig.Provider, - Label: cid.Cid(car.RootCID).String(), - PieceCID: car.PieceCID, - PieceSize: car.PieceSize, - StartEpoch: int32(startEpoch), + State: model.DealProposed, + ClientID: &walletObj.ID, + ClientActorID: walletObj.ActorID, + Provider: dealConfig.Provider, + Label: cid.Cid(car.RootCID).String(), + PieceCID: car.PieceCID, + PieceSize: car.PieceSize, + StartEpoch: int32(startEpoch), //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 EndEpoch: int32(endEpoch), Price: dealConfig.GetPrice(car.PieceSize, dealConfig.Duration).String(), @@ -633,7 +634,7 @@ func queueDealEvent(deal model.Deal) { DataCID: deal.Label, PieceSize: deal.PieceSize, Provider: deal.Provider, - Client: deal.ClientID, + Client: deal.ClientActorID, Verified: deal.Verified, StartEpoch: deal.StartEpoch, EndEpoch: deal.EndEpoch - deal.StartEpoch, diff --git a/replication/wallet_test.go b/replication/wallet_test.go index ce20a96f..3a23394b 100644 --- a/replication/wallet_test.go +++ b/replication/wallet_test.go @@ -82,10 +82,11 @@ func TestDatacapWalletChooser_Choose(t *testing.T) { err := db.Create(&wallets).Error require.NoError(t, err) err = db.Create(&model.Deal{ - ClientID: "3", - Verified: true, - State: model.DealProposed, - PieceSize: 500000, + ClientID: &wallets[2].ID, + ClientActorID: wallets[2].ActorID, + Verified: true, + State: model.DealProposed, + PieceSize: 500000, }).Error require.NoError(t, err) diff --git a/service/dealpusher/dealpusher.go b/service/dealpusher/dealpusher.go index a9f1a037..f687dd4c 100644 --- a/service/dealpusher/dealpusher.go +++ b/service/dealpusher/dealpusher.go @@ -435,9 +435,6 @@ func NewDealPusher(db *gorm.DB, lotusURL string, } lotusClient := util.NewLotusClient(lotusURL, lotusToken) dealMaker := replication.NewDealMaker(lotusClient, h, time.Hour, time.Minute) - if err != nil { - return nil, errors.Wrap(err, "failed to init deal maker") - } return &DealPusher{ dbNoContext: db, activeScheduleCancelFunc: make(map[model.ScheduleID]context.CancelFunc), diff --git a/service/dealpusher/dealpusher_test.go b/service/dealpusher/dealpusher_test.go index 12e77d9c..ab1fe9ce 100644 --- a/service/dealpusher/dealpusher_test.go +++ b/service/dealpusher/dealpusher_test.go @@ -41,7 +41,8 @@ func (m *MockDealMaker) MakeDeal(ctx context.Context, walletObj model.Wallet, ca deal.ID = 0 deal.PieceCID = car.PieceCID deal.PieceSize = car.PieceSize - deal.ClientID = walletObj.ActorID + deal.ClientID = &walletObj.ID + deal.ClientActorID = walletObj.ActorID deal.Provider = dealConfig.Provider deal.Verified = dealConfig.Verified deal.ProposalID = uuid.NewString() @@ -367,12 +368,12 @@ func TestDealmakerService_Force(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() provider := "f0miner" - client := "f0client" + clientActorID := "f0client" schedule := model.Schedule{ Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ActorID: client, Address: "f0xx", + ActorID: clientActorID, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -381,6 +382,7 @@ func TestDealmakerService_Force(t *testing.T) { Provider: provider, Force: true, } + clientID := &schedule.Preparation.Wallets[0].ID err = db.Create(&schedule).Error require.NoError(t, err) mockDealmaker.On("MakeDeal", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&model.Deal{ @@ -399,11 +401,12 @@ func TestDealmakerService_Force(t *testing.T) { require.NoError(t, err) err = db.Create([]model.Deal{ { - Provider: provider, - ClientID: client, - PieceCID: pieceCID, - PieceSize: 1024, - State: model.DealProposed, + Provider: provider, + ClientID: clientID, + ClientActorID: clientActorID, + PieceCID: pieceCID, + PieceSize: 1024, + State: model.DealProposed, }, }).Error require.NoError(t, err) @@ -426,12 +429,12 @@ func TestDealMakerService_MaxReplica(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() provider := "f0miner" - client := "f0client" + clientActorID := "f0client" schedule := model.Schedule{ Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ActorID: client, Address: "f0xx", + ActorID: clientActorID, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -439,6 +442,7 @@ func TestDealMakerService_MaxReplica(t *testing.T) { State: model.ScheduleActive, Provider: provider, } + clientID := &schedule.Preparation.Wallets[0].ID err = db.Create(&schedule).Error require.NoError(t, err) mockDealmaker.On("MakeDeal", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&model.Deal{ @@ -456,12 +460,13 @@ func TestDealMakerService_MaxReplica(t *testing.T) { require.NoError(t, err) err = db.Create([]model.Deal{ { - ScheduleID: &schedule.ID, - Provider: "another", - ClientID: client, - PieceCID: pieceCID, - PieceSize: 1024, - State: model.DealProposed, + ScheduleID: &schedule.ID, + Provider: "another", + ClientID: clientID, + ClientActorID: clientActorID, + PieceCID: pieceCID, + PieceSize: 1024, + State: model.DealProposed, }}).Error require.NoError(t, err) service.runOnce(ctx) @@ -492,12 +497,12 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { // All deal proposal will be accepted // Create test schedule provider := "f0miner" - client := "f0client" + clientActorID := "f0client" schedule := model.Schedule{ Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ActorID: client, Address: "f0xx", + ActorID: clientActorID, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -506,6 +511,7 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { Provider: provider, AllowedPieceCIDs: underscore.Map(pieceCIDs[:5], func(cid model.CID) string { return cid.String() }), } + clientID := &schedule.Preparation.Wallets[0].ID err = db.Create(&schedule).Error require.NoError(t, err) @@ -566,35 +572,39 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { // Test5 is not proposed err = db.Create([]model.Deal{ { - ScheduleID: &schedule.ID, - Provider: provider, - ClientID: client, - PieceCID: pieceCIDs[0], - PieceSize: 1024, - State: model.DealProposed, + ScheduleID: &schedule.ID, + Provider: provider, + ClientID: clientID, + ClientActorID: clientActorID, + PieceCID: pieceCIDs[0], + PieceSize: 1024, + State: model.DealProposed, }, { - ScheduleID: &schedule.ID, - Provider: provider, - ClientID: client, - PieceCID: pieceCIDs[1], - PieceSize: 1024, - State: model.DealProposalExpired, + ScheduleID: &schedule.ID, + Provider: provider, + ClientID: clientID, + ClientActorID: clientActorID, + PieceCID: pieceCIDs[1], + PieceSize: 1024, + State: model.DealProposalExpired, }, { - ScheduleID: &schedule.ID, - Provider: provider, - ClientID: client, - PieceCID: pieceCIDs[2], - PieceSize: 1024, - State: model.DealActive, + ScheduleID: &schedule.ID, + Provider: provider, + ClientID: clientID, + ClientActorID: clientActorID, + PieceCID: pieceCIDs[2], + PieceSize: 1024, + State: model.DealActive, }, { - Provider: provider, - ClientID: client, - PieceCID: pieceCIDs[3], - PieceSize: 1024, - State: model.DealProposed, + Provider: provider, + ClientID: clientID, + ClientActorID: clientActorID, + PieceCID: pieceCIDs[3], + PieceSize: 1024, + State: model.DealProposed, }, }).Error require.NoError(t, err) diff --git a/service/dealtracker/dealtracker.go b/service/dealtracker/dealtracker.go index c3d85048..967cbb01 100644 --- a/service/dealtracker/dealtracker.go +++ b/service/dealtracker/dealtracker.go @@ -382,7 +382,7 @@ type KnownDeal struct { } type UnknownDeal struct { ID model.DealID - ClientID string + ClientID *model.WalletID Provider string PieceCID model.CID StartEpoch int32 @@ -432,7 +432,7 @@ func (d *DealTracker) runOnce(ctx context.Context) error { walletIDs := make(map[string]struct{}) for _, wallet := range wallets { - Logger.Infof("tracking deals for wallet %s", wallet.ID) + Logger.Infof("tracking deals for wallet %s", wallet.ActorID) walletIDs[wallet.ActorID] = struct{}{} } @@ -454,14 +454,14 @@ func (d *DealTracker) runOnce(ctx context.Context) error { unknownDeals := make(map[string][]UnknownDeal) rows, err = db.Model(&model.Deal{}).Where("deal_id IS NULL AND state NOT IN ?", []model.DealState{model.DealExpired, model.DealProposalExpired}). - Select("id", "deal_id", "state", "client_id", "provider", "piece_cid", + Select("id", "deal_id", "state", "client_id", "client_actor_id", "provider", "piece_cid", "start_epoch", "end_epoch").Rows() if err != nil { return errors.WithStack(err) } for rows.Next() { var deal model.Deal - err = rows.Scan(&deal.ID, &deal.DealID, &deal.State, &deal.ClientID, &deal.Provider, &deal.PieceCID, &deal.StartEpoch, &deal.EndEpoch) + err = rows.Scan(&deal.ID, &deal.DealID, &deal.State, &deal.ClientID, &deal.ClientActorID, &deal.Provider, &deal.PieceCID, &deal.StartEpoch, &deal.EndEpoch) if err != nil { return errors.WithStack(err) } @@ -552,11 +552,17 @@ func (d *DealTracker) runOnce(ctx context.Context) error { if err != nil { return errors.Wrapf(err, "failed to parse piece CID %s", deal.Proposal.PieceCID.Root) } + + var wallet model.Wallet + if err := db.Where("actor_id = ?", deal.Proposal.Client).First(&wallet).Error; err != nil { + return errors.Wrapf(err, "failed to find wallet for client %s", deal.Proposal.Client) + } + err = database.DoRetry(ctx, func() error { return db.Create(&model.Deal{ DealID: &dealID, State: newState, - ClientID: deal.Proposal.Client, + ClientID: &wallet.ID, Provider: deal.Proposal.Provider, Label: deal.Proposal.Label, PieceCID: model.CID(root), diff --git a/service/dealtracker/dealtracker_test.go b/service/dealtracker/dealtracker_test.go index e4b77301..3832a489 100644 --- a/service/dealtracker/dealtracker_test.go +++ b/service/dealtracker/dealtracker_test.go @@ -151,10 +151,11 @@ func TestTrackDeal(t *testing.T) { func TestRunOnce(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - err := db.Create(&model.Wallet{ + wallet := model.Wallet{ ActorID: "t0100", Address: "t3xxx", - }).Error + } + err := db.Create(&wallet).Error require.NoError(t, err) d1 := uint64(1) d2 := uint64(2) @@ -171,7 +172,8 @@ func TestRunOnce(t *testing.T) { { DealID: &d1, State: model.DealActive, - ClientID: "t0100", + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, Provider: "sp1", ProposalID: "proposal1", Label: "label1", @@ -185,7 +187,8 @@ func TestRunOnce(t *testing.T) { { DealID: &d2, State: model.DealPublished, - ClientID: "t0100", + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, Provider: "sp1", ProposalID: "proposal2", Label: "label2", @@ -198,7 +201,8 @@ func TestRunOnce(t *testing.T) { }, { State: model.DealProposed, - ClientID: "t0100", + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, Provider: "sp1", ProposalID: "proposal3", Label: "label3", @@ -212,7 +216,8 @@ func TestRunOnce(t *testing.T) { { DealID: &d4, State: model.DealActive, - ClientID: "t0100", + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, Provider: "sp1", ProposalID: "proposal4", Label: "label4", @@ -225,7 +230,8 @@ func TestRunOnce(t *testing.T) { }, { State: model.DealActive, - ClientID: "t0100", + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, Provider: "sp1", ProposalID: "proposal5", Label: "label5", @@ -239,7 +245,8 @@ func TestRunOnce(t *testing.T) { { DealID: &d6, State: model.DealPublished, - ClientID: "t0100", + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, Provider: "sp1", ProposalID: "proposal6", Label: "label6", diff --git a/testdb/main.go b/testdb/main.go index d57a823a..1ee4ad39 100644 --- a/testdb/main.go +++ b/testdb/main.go @@ -338,11 +338,12 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 StartEpoch: int32(10000 + r.Intn(10000)), //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 - EndEpoch: int32(20000 + r.Intn(10000)), - Price: "0", - Verified: true, - ScheduleID: ptr.Of(schedule.ID), - ClientID: wallet.ActorID, + EndEpoch: int32(20000 + r.Intn(10000)), + Price: "0", + Verified: true, + ScheduleID: ptr.Of(schedule.ID), + ClientID: &wallet.ID, + ClientActorID: wallet.ActorID, } if state == model.DealActive { //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 From 805d9362e79bf0c3b2924115c72f6a74d5a52df3 Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Thu, 5 Jun 2025 23:17:43 -0400 Subject: [PATCH 36/39] feat: better documentation of create cmd --- cmd/wallet/create.go | 21 ++++++++++++++++++++- docs/en/cli-reference/wallet/create.md | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/cmd/wallet/create.go b/cmd/wallet/create.go index 23dbd8a3..6c08f37c 100644 --- a/cmd/wallet/create.go +++ b/cmd/wallet/create.go @@ -12,7 +12,26 @@ var CreateCmd = &cli.Command{ Name: "create", Usage: "Create a new wallet", ArgsUsage: "[type]", - Before: cliutil.CheckNArgs, + Description: `Create a new Filecoin wallet using offline keypair generation. + +The wallet will be stored locally in the Singularity database and can be used for making deals and other operations. The private key is generated securely and stored encrypted. + +SUPPORTED KEY TYPES: + secp256k1 ECDSA using the secp256k1 curve (default, most common) + bls BLS signature scheme (Boneh-Lynn-Shacham) + +EXAMPLES: + # Create a secp256k1 wallet (default) + singularity wallet create + + # Create a secp256k1 wallet explicitly + singularity wallet create secp256k1 + + # Create a BLS wallet + singularity wallet create bls + +The newly created wallet address and other details will be displayed upon successful creation.`, + Before: cliutil.CheckNArgs, Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { diff --git a/docs/en/cli-reference/wallet/create.md b/docs/en/cli-reference/wallet/create.md index 1fb91430..743ffadd 100644 --- a/docs/en/cli-reference/wallet/create.md +++ b/docs/en/cli-reference/wallet/create.md @@ -8,6 +8,27 @@ NAME: USAGE: singularity wallet create [command options] [type] +DESCRIPTION: + Create a new Filecoin wallet using offline keypair generation. + + The wallet will be stored locally in the Singularity database and can be used for making deals and other operations. The private key is generated securely and stored encrypted. + + SUPPORTED KEY TYPES: + secp256k1 ECDSA using the secp256k1 curve (default, most common) + bls BLS signature scheme (Boneh-Lynn-Shacham) + + EXAMPLES: + # Create a secp256k1 wallet (default) + singularity wallet create + + # Create a secp256k1 wallet explicitly + singularity wallet create secp256k1 + + # Create a BLS wallet + singularity wallet create bls + + The newly created wallet address and other details will be displayed upon successful creation. + OPTIONS: --help, -h show help ``` From 83ffe52f9f31551ca9963040e183e463626a24b0 Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Thu, 5 Jun 2025 23:48:13 -0400 Subject: [PATCH 37/39] fix: lint errors --- cmd/admin/migrate.go | 3 +- handler/storage/types_gen.go | 3046 ++++++++--------- handler/wallet/create.go | 8 +- .../202505010840_wallet_actor_id.go | 26 +- model/replication.go | 44 +- 5 files changed, 1553 insertions(+), 1574 deletions(-) diff --git a/cmd/admin/migrate.go b/cmd/admin/migrate.go index 5f3f1761..ede8bf97 100644 --- a/cmd/admin/migrate.go +++ b/cmd/admin/migrate.go @@ -2,6 +2,7 @@ package admin import ( "fmt" + "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/cmd/cliutil" "github.com/data-preservation-programs/singularity/database" @@ -85,7 +86,7 @@ var MigrateCmd = &cli.Command{ if err != nil { return errors.WithStack(err) } - fmt.Println(fmt.Sprintf("Current migration: %s", last)) + fmt.Printf("Current migration: " + last + "\n") return nil }, }, diff --git a/handler/storage/types_gen.go b/handler/storage/types_gen.go index 91408d6d..e8dc9b60 100644 --- a/handler/storage/types_gen.go +++ b/handler/storage/types_gen.go @@ -6,19 +6,19 @@ package storage import "github.com/data-preservation-programs/singularity/model" type acdConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). - UploadWaitPerGb string `json:"uploadWaitPerGb" default:"3m0s"` // Additional time per GiB to wait after a failed complete upload to see if it appears. - TemplinkThreshold string `json:"templinkThreshold" default:"9Gi"` // Files >= this size will be downloaded via their tempLink. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). + UploadWaitPerGb string `default:"3m0s" json:"uploadWaitPerGb"` // Additional time per GiB to wait after a failed complete upload to see if it appears. + TemplinkThreshold string `default:"9Gi" json:"templinkThreshold"` // Files >= this size will be downloaded via their tempLink. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createAcdStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config acdConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -37,42 +37,42 @@ type createAcdStorageRequest struct { func createAcdStorage() {} type azureblobConfig struct { - Account string `json:"account"` // Azure Storage Account Name. - EnvAuth bool `json:"envAuth" default:"false"` // Read credentials from runtime (environment variables, CLI or MSI). - Key string `json:"key"` // Storage Account Shared Key. - SasUrl string `json:"sasUrl"` // SAS URL for container level access only. - Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. - ClientId string `json:"clientId"` // The ID of the client in use. - ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets - ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. - ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). - ClientSendCertificateChain bool `json:"clientSendCertificateChain" default:"false"` // Send the certificate chain when using certificate auth. - Username string `json:"username"` // User name (usually an email address) - Password string `json:"password"` // The user's password - ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. - UseMsi bool `json:"useMsi" default:"false"` // Use a managed service identity to authenticate (only works in Azure). - MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. - MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. - MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. - UseEmulator bool `json:"useEmulator" default:"false"` // Uses local storage emulator if provided as 'true'. - Endpoint string `json:"endpoint"` // Endpoint for the service. - UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). - ChunkSize string `json:"chunkSize" default:"4Mi"` // Upload chunk size. - UploadConcurrency int `json:"uploadConcurrency" default:"16"` // Concurrency for multipart uploads. - ListChunk int `json:"listChunk" default:"5000"` // Size of blob list. - AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. - ArchiveTierDelete bool `json:"archiveTierDelete" default:"false"` // Delete archive tier blobs before overwriting. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8"` // The encoding for the backend. - PublicAccess string `json:"publicAccess" example:""` // Public access level of a container: blob or container. - NoCheckContainer bool `json:"noCheckContainer" default:"false"` // If set, don't attempt to check the container exists or create it. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Account string `json:"account"` // Azure Storage Account Name. + EnvAuth bool `default:"false" json:"envAuth"` // Read credentials from runtime (environment variables, CLI or MSI). + Key string `json:"key"` // Storage Account Shared Key. + SasUrl string `json:"sasUrl"` // SAS URL for container level access only. + Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. + ClientId string `json:"clientId"` // The ID of the client in use. + ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets + ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. + ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). + ClientSendCertificateChain bool `default:"false" json:"clientSendCertificateChain"` // Send the certificate chain when using certificate auth. + Username string `json:"username"` // User name (usually an email address) + Password string `json:"password"` // The user's password + ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. + UseMsi bool `default:"false" json:"useMsi"` // Use a managed service identity to authenticate (only works in Azure). + MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. + MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. + MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. + UseEmulator bool `default:"false" json:"useEmulator"` // Uses local storage emulator if provided as 'true'. + Endpoint string `json:"endpoint"` // Endpoint for the service. + UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). + ChunkSize string `default:"4Mi" json:"chunkSize"` // Upload chunk size. + UploadConcurrency int `default:"16" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ListChunk int `default:"5000" json:"listChunk"` // Size of blob list. + AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. + ArchiveTierDelete bool `default:"false" json:"archiveTierDelete"` // Delete archive tier blobs before overwriting. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + Encoding string `default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8" json:"encoding"` // The encoding for the backend. + PublicAccess string `example:"" json:"publicAccess"` // Public access level of a container: blob or container. + NoCheckContainer bool `default:"false" json:"noCheckContainer"` // If set, don't attempt to check the container exists or create it. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. } type createAzureblobStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config azureblobConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -91,26 +91,26 @@ type createAzureblobStorageRequest struct { func createAzureblobStorage() {} type b2Config struct { - Account string `json:"account"` // Account ID or Application Key ID. - Key string `json:"key"` // Application Key. - Endpoint string `json:"endpoint"` // Endpoint for the service. - TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files on remote removal, otherwise hide files. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - CopyCutoff string `json:"copyCutoff" default:"4Gi"` // Cutoff for switching to multipart copy. - ChunkSize string `json:"chunkSize" default:"96Mi"` // Upload chunk size. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Disable checksums for large (> upload cutoff) files. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - DownloadAuthDuration string `json:"downloadAuthDuration" default:"1w"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Account string `json:"account"` // Account ID or Application Key ID. + Key string `json:"key"` // Application Key. + Endpoint string `json:"endpoint"` // Endpoint for the service. + TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files on remote removal, otherwise hide files. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + CopyCutoff string `default:"4Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + ChunkSize string `default:"96Mi" json:"chunkSize"` // Upload chunk size. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Disable checksums for large (> upload cutoff) files. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + DownloadAuthDuration string `default:"1w" json:"downloadAuthDuration"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createB2StorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config b2Config `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -129,24 +129,24 @@ type createB2StorageRequest struct { func createB2Storage() {} type boxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - RootFolderId string `json:"rootFolderId" default:"0"` // Fill in for rclone to use a non root folder as its starting point. - BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location - AccessToken string `json:"accessToken"` // Box App Primary Access Token - BoxSubType string `json:"boxSubType" default:"user" example:"user"` // - UploadCutoff string `json:"uploadCutoff" default:"50Mi"` // Cutoff for switching to multipart upload (>= 50 MiB). - CommitRetries int `json:"commitRetries" default:"100"` // Max number of times to try committing a multipart file. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 1-1000. - OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + RootFolderId string `default:"0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. + BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location + AccessToken string `json:"accessToken"` // Box App Primary Access Token + BoxSubType string `default:"user" example:"user" json:"boxSubType"` // + UploadCutoff string `default:"50Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload (>= 50 MiB). + CommitRetries int `default:"100" json:"commitRetries"` // Max number of times to try committing a multipart file. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 1-1000. + OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. + Encoding string `default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createBoxStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config boxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -165,53 +165,53 @@ type createBoxStorageRequest struct { func createBoxStorage() {} type driveConfig struct { - ClientId string `json:"clientId"` // Google Application Client Id - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Scope string `json:"scope" example:"drive"` // Scope that rclone should use when requesting access from drive. - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). - AuthOwnerOnly bool `json:"authOwnerOnly" default:"false"` // Only consider files owned by the authenticated user. - UseTrash bool `json:"useTrash" default:"true"` // Send files to the trash instead of deleting permanently. - CopyShortcutContent bool `json:"copyShortcutContent" default:"false"` // Server side copy contents of shortcuts instead of the shortcut. - SkipGdocs bool `json:"skipGdocs" default:"false"` // Skip google documents in all listings. - SkipChecksumGphotos bool `json:"skipChecksumGphotos" default:"false"` // Skip MD5 checksum on Google photos and videos only. - SharedWithMe bool `json:"sharedWithMe" default:"false"` // Only show files that are shared with me. - TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. - StarredOnly bool `json:"starredOnly" default:"false"` // Only show files that are starred. - Formats string `json:"formats"` // Deprecated: See export_formats. - ExportFormats string `json:"exportFormats" default:"docx,xlsx,pptx,svg"` // Comma separated list of preferred formats for downloading Google docs. - ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. - AllowImportNameChange bool `json:"allowImportNameChange" default:"false"` // Allow the filetype to change when uploading Google docs. - UseCreatedDate bool `json:"useCreatedDate" default:"false"` // Use file created date instead of modified date. - UseSharedDate bool `json:"useSharedDate" default:"false"` // Use date file was shared instead of modified date. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 100-1000, 0 to disable. - Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. - AlternateExport bool `json:"alternateExport" default:"false"` // Deprecated: No longer needed. - UploadCutoff string `json:"uploadCutoff" default:"8Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"8Mi"` // Upload chunk size. - AcknowledgeAbuse bool `json:"acknowledgeAbuse" default:"false"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. - KeepRevisionForever bool `json:"keepRevisionForever" default:"false"` // Keep new head revision of each file forever. - SizeAsQuota bool `json:"sizeAsQuota" default:"false"` // Show sizes as storage quota usage, not actual size. - V2DownloadMinSize string `json:"v2DownloadMinSize" default:"off"` // If Object's are greater, use drive v2 API to download. - PacerMinSleep string `json:"pacerMinSleep" default:"100ms"` // Minimum time to sleep between API calls. - PacerBurst int `json:"pacerBurst" default:"100"` // Number of API calls to allow without sleeping. - ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different drive configs. - DisableHttp2 bool `json:"disableHttp2" default:"true"` // Disable drive using http2. - StopOnUploadLimit bool `json:"stopOnUploadLimit" default:"false"` // Make upload limit errors be fatal. - StopOnDownloadLimit bool `json:"stopOnDownloadLimit" default:"false"` // Make download limit errors be fatal. - SkipShortcuts bool `json:"skipShortcuts" default:"false"` // If set skip shortcut files. - SkipDanglingShortcuts bool `json:"skipDanglingShortcuts" default:"false"` // If set skip dangling shortcut files. - ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. - Encoding string `json:"encoding" default:"InvalidUtf8"` // The encoding for the backend. + ClientId string `json:"clientId"` // Google Application Client Id + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Scope string `example:"drive" json:"scope"` // Scope that rclone should use when requesting access from drive. + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). + AuthOwnerOnly bool `default:"false" json:"authOwnerOnly"` // Only consider files owned by the authenticated user. + UseTrash bool `default:"true" json:"useTrash"` // Send files to the trash instead of deleting permanently. + CopyShortcutContent bool `default:"false" json:"copyShortcutContent"` // Server side copy contents of shortcuts instead of the shortcut. + SkipGdocs bool `default:"false" json:"skipGdocs"` // Skip google documents in all listings. + SkipChecksumGphotos bool `default:"false" json:"skipChecksumGphotos"` // Skip MD5 checksum on Google photos and videos only. + SharedWithMe bool `default:"false" json:"sharedWithMe"` // Only show files that are shared with me. + TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. + StarredOnly bool `default:"false" json:"starredOnly"` // Only show files that are starred. + Formats string `json:"formats"` // Deprecated: See export_formats. + ExportFormats string `default:"docx,xlsx,pptx,svg" json:"exportFormats"` // Comma separated list of preferred formats for downloading Google docs. + ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. + AllowImportNameChange bool `default:"false" json:"allowImportNameChange"` // Allow the filetype to change when uploading Google docs. + UseCreatedDate bool `default:"false" json:"useCreatedDate"` // Use file created date instead of modified date. + UseSharedDate bool `default:"false" json:"useSharedDate"` // Use date file was shared instead of modified date. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 100-1000, 0 to disable. + Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. + AlternateExport bool `default:"false" json:"alternateExport"` // Deprecated: No longer needed. + UploadCutoff string `default:"8Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"8Mi" json:"chunkSize"` // Upload chunk size. + AcknowledgeAbuse bool `default:"false" json:"acknowledgeAbuse"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. + KeepRevisionForever bool `default:"false" json:"keepRevisionForever"` // Keep new head revision of each file forever. + SizeAsQuota bool `default:"false" json:"sizeAsQuota"` // Show sizes as storage quota usage, not actual size. + V2DownloadMinSize string `default:"off" json:"v2DownloadMinSize"` // If Object's are greater, use drive v2 API to download. + PacerMinSleep string `default:"100ms" json:"pacerMinSleep"` // Minimum time to sleep between API calls. + PacerBurst int `default:"100" json:"pacerBurst"` // Number of API calls to allow without sleeping. + ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different drive configs. + DisableHttp2 bool `default:"true" json:"disableHttp2"` // Disable drive using http2. + StopOnUploadLimit bool `default:"false" json:"stopOnUploadLimit"` // Make upload limit errors be fatal. + StopOnDownloadLimit bool `default:"false" json:"stopOnDownloadLimit"` // Make download limit errors be fatal. + SkipShortcuts bool `default:"false" json:"skipShortcuts"` // If set skip shortcut files. + SkipDanglingShortcuts bool `default:"false" json:"skipDanglingShortcuts"` // If set skip dangling shortcut files. + ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. + Encoding string `default:"InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createDriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config driveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -230,24 +230,24 @@ type createDriveStorageRequest struct { func createDriveStorage() {} type dropboxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ChunkSize string `json:"chunkSize" default:"48Mi"` // Upload chunk size (< 150Mi). - Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. - SharedFiles bool `json:"sharedFiles" default:"false"` // Instructs rclone to work on individual shared files. - SharedFolders bool `json:"sharedFolders" default:"false"` // Instructs rclone to work on shared folders. - BatchMode string `json:"batchMode" default:"sync"` // Upload file batching sync|async|off. - BatchSize int `json:"batchSize" default:"0"` // Max number of files in upload batch. - BatchTimeout string `json:"batchTimeout" default:"0s"` // Max time to allow an idle upload batch before uploading. - BatchCommitTimeout string `json:"batchCommitTimeout" default:"10m0s"` // Max time to wait for a batch to finish committing - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ChunkSize string `default:"48Mi" json:"chunkSize"` // Upload chunk size (< 150Mi). + Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. + SharedFiles bool `default:"false" json:"sharedFiles"` // Instructs rclone to work on individual shared files. + SharedFolders bool `default:"false" json:"sharedFolders"` // Instructs rclone to work on shared folders. + BatchMode string `default:"sync" json:"batchMode"` // Upload file batching sync|async|off. + BatchSize int `default:"0" json:"batchSize"` // Max number of files in upload batch. + BatchTimeout string `default:"0s" json:"batchTimeout"` // Max time to allow an idle upload batch before uploading. + BatchCommitTimeout string `default:"10m0s" json:"batchCommitTimeout"` // Max time to wait for a batch to finish committing + Encoding string `default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createDropboxStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config dropboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -270,11 +270,11 @@ type fichierConfig struct { SharedFolder string `json:"sharedFolder"` // If you want to download a shared folder, add this parameter. FilePassword string `json:"filePassword"` // If you want to download a shared file that is password protected, add this parameter. FolderPassword string `json:"folderPassword"` // If you want to list the files in a shared folder that is password protected, add this parameter. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createFichierStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config fichierConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -293,17 +293,17 @@ type createFichierStorageRequest struct { func createFichierStorage() {} type filefabricConfig struct { - Url string `json:"url" example:"https://storagemadeeasy.com"` // URL of the Enterprise File Fabric to connect to. + Url string `example:"https://storagemadeeasy.com" json:"url"` // URL of the Enterprise File Fabric to connect to. RootFolderId string `json:"rootFolderId"` // ID of the root folder. PermanentToken string `json:"permanentToken"` // Permanent Authentication Token. Token string `json:"token"` // Session Token. TokenExpiry string `json:"tokenExpiry"` // Token expiry time. Version string `json:"version"` // Version read from the file fabric. - Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createFilefabricStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config filefabricConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -323,29 +323,29 @@ func createFilefabricStorage() {} type ftpConfig struct { Host string `json:"host"` // FTP host to connect to. - User string `json:"user" default:"$USER"` // FTP username. - Port int `json:"port" default:"21"` // FTP port number. + User string `default:"$USER" json:"user"` // FTP username. + Port int `default:"21" json:"port"` // FTP port number. Pass string `json:"pass"` // FTP password. - Tls bool `json:"tls" default:"false"` // Use Implicit FTPS (FTP over TLS). - ExplicitTls bool `json:"explicitTls" default:"false"` // Use Explicit FTPS (FTP over TLS). - Concurrency int `json:"concurrency" default:"0"` // Maximum number of FTP simultaneous connections, 0 for unlimited. - NoCheckCertificate bool `json:"noCheckCertificate" default:"false"` // Do not verify the TLS certificate of the server. - DisableEpsv bool `json:"disableEpsv" default:"false"` // Disable using EPSV even if server advertises support. - DisableMlsd bool `json:"disableMlsd" default:"false"` // Disable using MLSD even if server advertises support. - DisableUtf8 bool `json:"disableUtf8" default:"false"` // Disable using UTF-8 even if server advertises support. - WritingMdtm bool `json:"writingMdtm" default:"false"` // Use MDTM to set modification time (VsFtpd quirk) - ForceListHidden bool `json:"forceListHidden" default:"false"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. - IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. - CloseTimeout string `json:"closeTimeout" default:"1m0s"` // Maximum time to wait for a response to close. - TlsCacheSize int `json:"tlsCacheSize" default:"32"` // Size of TLS session cache for all control and data connections. - DisableTls13 bool `json:"disableTls13" default:"false"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) - ShutTimeout string `json:"shutTimeout" default:"1m0s"` // Maximum time to wait for data connection closing status. - AskPassword bool `json:"askPassword" default:"false"` // Allow asking for FTP password when needed. - Encoding string `json:"encoding" default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash"` // The encoding for the backend. + Tls bool `default:"false" json:"tls"` // Use Implicit FTPS (FTP over TLS). + ExplicitTls bool `default:"false" json:"explicitTls"` // Use Explicit FTPS (FTP over TLS). + Concurrency int `default:"0" json:"concurrency"` // Maximum number of FTP simultaneous connections, 0 for unlimited. + NoCheckCertificate bool `default:"false" json:"noCheckCertificate"` // Do not verify the TLS certificate of the server. + DisableEpsv bool `default:"false" json:"disableEpsv"` // Disable using EPSV even if server advertises support. + DisableMlsd bool `default:"false" json:"disableMlsd"` // Disable using MLSD even if server advertises support. + DisableUtf8 bool `default:"false" json:"disableUtf8"` // Disable using UTF-8 even if server advertises support. + WritingMdtm bool `default:"false" json:"writingMdtm"` // Use MDTM to set modification time (VsFtpd quirk) + ForceListHidden bool `default:"false" json:"forceListHidden"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. + IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. + CloseTimeout string `default:"1m0s" json:"closeTimeout"` // Maximum time to wait for a response to close. + TlsCacheSize int `default:"32" json:"tlsCacheSize"` // Size of TLS session cache for all control and data connections. + DisableTls13 bool `default:"false" json:"disableTls13"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) + ShutTimeout string `default:"1m0s" json:"shutTimeout"` // Maximum time to wait for data connection closing status. + AskPassword bool `default:"false" json:"askPassword"` // Allow asking for FTP password when needed. + Encoding string `default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash" json:"encoding"` // The encoding for the backend. } type createFtpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config ftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -364,29 +364,29 @@ type createFtpStorageRequest struct { func createFtpStorage() {} type gcsConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ProjectNumber string `json:"projectNumber"` // Project number. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - Anonymous bool `json:"anonymous" default:"false"` // Access public buckets and objects without credentials. - ObjectAcl string `json:"objectAcl" example:"authenticatedRead"` // Access Control List for new objects. - BucketAcl string `json:"bucketAcl" example:"authenticatedRead"` // Access Control List for new buckets. - BucketPolicyOnly bool `json:"bucketPolicyOnly" default:"false"` // Access checks should use bucket-level IAM policies. - Location string `json:"location" example:""` // Location for the newly created buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing objects in Google Cloud Storage. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - Endpoint string `json:"endpoint"` // Endpoint for the service. - Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ProjectNumber string `json:"projectNumber"` // Project number. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + Anonymous bool `default:"false" json:"anonymous"` // Access public buckets and objects without credentials. + ObjectAcl string `example:"authenticatedRead" json:"objectAcl"` // Access Control List for new objects. + BucketAcl string `example:"authenticatedRead" json:"bucketAcl"` // Access Control List for new buckets. + BucketPolicyOnly bool `default:"false" json:"bucketPolicyOnly"` // Access checks should use bucket-level IAM policies. + Location string `example:"" json:"location"` // Location for the newly created buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing objects in Google Cloud Storage. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + Endpoint string `json:"endpoint"` // Endpoint for the service. + Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). } type createGcsStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gcsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -405,20 +405,20 @@ type createGcsStorageRequest struct { func createGcsStorage() {} type gphotosConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ReadOnly bool `json:"readOnly" default:"false"` // Set to make the Google Photos backend read only. - ReadSize bool `json:"readSize" default:"false"` // Set to read the size of media items. - StartYear int `json:"startYear" default:"2000"` // Year limits the photos to be downloaded to those which are uploaded after the given year. - IncludeArchived bool `json:"includeArchived" default:"false"` // Also view and download archived media. - Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ReadOnly bool `default:"false" json:"readOnly"` // Set to make the Google Photos backend read only. + ReadSize bool `default:"false" json:"readSize"` // Set to read the size of media items. + StartYear int `default:"2000" json:"startYear"` // Year limits the photos to be downloaded to those which are uploaded after the given year. + IncludeArchived bool `default:"false" json:"includeArchived"` // Also view and download archived media. + Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createGphotosStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gphotosConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -437,15 +437,15 @@ type createGphotosStorageRequest struct { func createGphotosStorage() {} type hdfsConfig struct { - Namenode string `json:"namenode"` // Hadoop name node and port. - Username string `json:"username" example:"root"` // Hadoop user name. - ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. - DataTransferProtection string `json:"dataTransferProtection" example:"privacy"` // Kerberos data transfer protection: authentication|integrity|privacy. - Encoding string `json:"encoding" default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Namenode string `json:"namenode"` // Hadoop name node and port. + Username string `example:"root" json:"username"` // Hadoop user name. + ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. + DataTransferProtection string `example:"privacy" json:"dataTransferProtection"` // Kerberos data transfer protection: authentication|integrity|privacy. + Encoding string `default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createHdfsStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hdfsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -464,24 +464,24 @@ type createHdfsStorageRequest struct { func createHdfsStorage() {} type hidriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ScopeAccess string `json:"scopeAccess" default:"rw" example:"rw"` // Access permissions that rclone should use when requesting access from HiDrive. - ScopeRole string `json:"scopeRole" default:"user" example:"user"` // User-level that rclone should use when requesting access from HiDrive. - RootPrefix string `json:"rootPrefix" default:"/" example:"/"` // The root/parent folder for all paths. - Endpoint string `json:"endpoint" default:"https://api.hidrive.strato.com/2.1"` // Endpoint for the service. - DisableFetchingMemberCount bool `json:"disableFetchingMemberCount" default:"false"` // Do not fetch number of objects in directories unless it is absolutely necessary. - ChunkSize string `json:"chunkSize" default:"48Mi"` // Chunksize for chunked uploads. - UploadCutoff string `json:"uploadCutoff" default:"96Mi"` // Cutoff/Threshold for chunked uploads. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for chunked uploads. - Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ScopeAccess string `default:"rw" example:"rw" json:"scopeAccess"` // Access permissions that rclone should use when requesting access from HiDrive. + ScopeRole string `default:"user" example:"user" json:"scopeRole"` // User-level that rclone should use when requesting access from HiDrive. + RootPrefix string `default:"/" example:"/" json:"rootPrefix"` // The root/parent folder for all paths. + Endpoint string `default:"https://api.hidrive.strato.com/2.1" json:"endpoint"` // Endpoint for the service. + DisableFetchingMemberCount bool `default:"false" json:"disableFetchingMemberCount"` // Do not fetch number of objects in directories unless it is absolutely necessary. + ChunkSize string `default:"48Mi" json:"chunkSize"` // Chunksize for chunked uploads. + UploadCutoff string `default:"96Mi" json:"uploadCutoff"` // Cutoff/Threshold for chunked uploads. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for chunked uploads. + Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. } type createHidriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hidriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -502,12 +502,12 @@ func createHidriveStorage() {} type httpConfig struct { Url string `json:"url"` // URL of HTTP host to connect to. Headers string `json:"headers"` // Set HTTP headers for all transactions. - NoSlash bool `json:"noSlash" default:"false"` // Set this if the site doesn't end directories with /. - NoHead bool `json:"noHead" default:"false"` // Don't use HEAD requests. + NoSlash bool `default:"false" json:"noSlash"` // Set this if the site doesn't end directories with /. + NoHead bool `default:"false" json:"noHead"` // Don't use HEAD requests. } type createHttpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config httpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -526,17 +526,17 @@ type createHttpStorageRequest struct { func createHttpStorage() {} type internetarchiveConfig struct { - AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. - SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). - Endpoint string `json:"endpoint" default:"https://s3.us.archive.org"` // IAS3 Endpoint. - FrontEndpoint string `json:"frontEndpoint" default:"https://archive.org"` // Host of InternetArchive Frontend. - DisableChecksum bool `json:"disableChecksum" default:"true"` // Don't ask the server to test against MD5 checksum calculated by rclone. - WaitArchive string `json:"waitArchive" default:"0s"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. - Encoding string `json:"encoding" default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. + SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). + Endpoint string `default:"https://s3.us.archive.org" json:"endpoint"` // IAS3 Endpoint. + FrontEndpoint string `default:"https://archive.org" json:"frontEndpoint"` // Host of InternetArchive Frontend. + DisableChecksum bool `default:"true" json:"disableChecksum"` // Don't ask the server to test against MD5 checksum calculated by rclone. + WaitArchive string `default:"0s" json:"waitArchive"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. + Encoding string `default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createInternetarchiveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config internetarchiveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -555,16 +555,16 @@ type createInternetarchiveStorageRequest struct { func createInternetarchiveStorage() {} type jottacloudConfig struct { - Md5MemoryLimit string `json:"md5MemoryLimit" default:"10Mi"` // Files bigger than this will be cached on disk to calculate the MD5 if required. - TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. - HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. - UploadResumeLimit string `json:"uploadResumeLimit" default:"10Mi"` // Files bigger than this can be resumed if the upload fail's. - NoVersions bool `json:"noVersions" default:"false"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Md5MemoryLimit string `default:"10Mi" json:"md5MemoryLimit"` // Files bigger than this will be cached on disk to calculate the MD5 if required. + TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. + HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. + UploadResumeLimit string `default:"10Mi" json:"uploadResumeLimit"` // Files bigger than this can be resumed if the upload fail's. + NoVersions bool `default:"false" json:"noVersions"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createJottacloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config jottacloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -584,14 +584,14 @@ func createJottacloudStorage() {} type koofrDigistorageConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. + Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password). - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createKoofrDigistorageStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrDigistorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -611,14 +611,14 @@ func createKoofrDigistorageStorage() {} type koofrKoofrConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. + Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createKoofrKoofrStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrKoofrConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -639,14 +639,14 @@ func createKoofrKoofrStorage() {} type koofrOtherConfig struct { Endpoint string `json:"endpoint"` // The Koofr API endpoint to use. Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. + Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at your service's settings page). - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createKoofrOtherStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrOtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -665,24 +665,24 @@ type createKoofrOtherStorageRequest struct { func createKoofrOtherStorage() {} type localConfig struct { - Nounc bool `json:"nounc" default:"false" example:"true"` // Disable UNC (long path names) conversion on Windows. - CopyLinks bool `json:"copyLinks" default:"false"` // Follow symlinks and copy the pointed to item. - Links bool `json:"links" default:"false"` // Translate symlinks to/from regular files with a '.rclonelink' extension. - SkipLinks bool `json:"skipLinks" default:"false"` // Don't warn about skipped symlinks. - ZeroSizeLinks bool `json:"zeroSizeLinks" default:"false"` // Assume the Stat size of links is zero (and read them instead) (deprecated). - UnicodeNormalization bool `json:"unicodeNormalization" default:"false"` // Apply unicode NFC normalization to paths and filenames. - NoCheckUpdated bool `json:"noCheckUpdated" default:"false"` // Don't check to see if the files change during upload. - OneFileSystem bool `json:"oneFileSystem" default:"false"` // Don't cross filesystem boundaries (unix/macOS only). - CaseSensitive bool `json:"caseSensitive" default:"false"` // Force the filesystem to report itself as case sensitive. - CaseInsensitive bool `json:"caseInsensitive" default:"false"` // Force the filesystem to report itself as case insensitive. - NoPreallocate bool `json:"noPreallocate" default:"false"` // Disable preallocation of disk space for transferred files. - NoSparse bool `json:"noSparse" default:"false"` // Disable sparse files for multi-thread downloads. - NoSetModtime bool `json:"noSetModtime" default:"false"` // Disable setting modtime. - Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. + Nounc bool `default:"false" example:"true" json:"nounc"` // Disable UNC (long path names) conversion on Windows. + CopyLinks bool `default:"false" json:"copyLinks"` // Follow symlinks and copy the pointed to item. + Links bool `default:"false" json:"links"` // Translate symlinks to/from regular files with a '.rclonelink' extension. + SkipLinks bool `default:"false" json:"skipLinks"` // Don't warn about skipped symlinks. + ZeroSizeLinks bool `default:"false" json:"zeroSizeLinks"` // Assume the Stat size of links is zero (and read them instead) (deprecated). + UnicodeNormalization bool `default:"false" json:"unicodeNormalization"` // Apply unicode NFC normalization to paths and filenames. + NoCheckUpdated bool `default:"false" json:"noCheckUpdated"` // Don't check to see if the files change during upload. + OneFileSystem bool `default:"false" json:"oneFileSystem"` // Don't cross filesystem boundaries (unix/macOS only). + CaseSensitive bool `default:"false" json:"caseSensitive"` // Force the filesystem to report itself as case sensitive. + CaseInsensitive bool `default:"false" json:"caseInsensitive"` // Force the filesystem to report itself as case insensitive. + NoPreallocate bool `default:"false" json:"noPreallocate"` // Disable preallocation of disk space for transferred files. + NoSparse bool `default:"false" json:"noSparse"` // Disable sparse files for multi-thread downloads. + NoSetModtime bool `default:"false" json:"noSetModtime"` // Disable setting modtime. + Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. } type createLocalStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config localConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -701,20 +701,20 @@ type createLocalStorageRequest struct { func createLocalStorage() {} type mailruConfig struct { - User string `json:"user"` // User name (usually email). - Pass string `json:"pass"` // Password. - SpeedupEnable bool `json:"speedupEnable" default:"true" example:"true"` // Skip full upload if there is another file with same data hash. - SpeedupFilePatterns string `json:"speedupFilePatterns" default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:""` // Comma separated list of file name patterns eligible for speedup (put by hash). - SpeedupMaxDisk string `json:"speedupMaxDisk" default:"3Gi" example:"0"` // This option allows you to disable speedup (put by hash) for large files. - SpeedupMaxMemory string `json:"speedupMaxMemory" default:"32Mi" example:"0"` // Files larger than the size given below will always be hashed on disk. - CheckHash bool `json:"checkHash" default:"true" example:"true"` // What should copy do if file checksum is mismatched or invalid. - UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. - Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + User string `json:"user"` // User name (usually email). + Pass string `json:"pass"` // Password. + SpeedupEnable bool `default:"true" example:"true" json:"speedupEnable"` // Skip full upload if there is another file with same data hash. + SpeedupFilePatterns string `default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:"" json:"speedupFilePatterns"` // Comma separated list of file name patterns eligible for speedup (put by hash). + SpeedupMaxDisk string `default:"3Gi" example:"0" json:"speedupMaxDisk"` // This option allows you to disable speedup (put by hash) for large files. + SpeedupMaxMemory string `default:"32Mi" example:"0" json:"speedupMaxMemory"` // Files larger than the size given below will always be hashed on disk. + CheckHash bool `default:"true" example:"true" json:"checkHash"` // What should copy do if file checksum is mismatched or invalid. + UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. + Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createMailruStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config mailruConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -733,16 +733,16 @@ type createMailruStorageRequest struct { func createMailruStorage() {} type megaConfig struct { - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - Debug bool `json:"debug" default:"false"` // Output more debug from Mega. - HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. - UseHttps bool `json:"useHttps" default:"false"` // Use HTTPS for transfers. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + Debug bool `default:"false" json:"debug"` // Output more debug from Mega. + HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. + UseHttps bool `default:"false" json:"useHttps"` // Use HTTPS for transfers. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createMegaStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config megaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -761,14 +761,14 @@ type createMegaStorageRequest struct { func createMegaStorage() {} type netstorageConfig struct { - Protocol string `json:"protocol" default:"https" example:"http"` // Select between HTTP or HTTPS protocol. + Protocol string `default:"https" example:"http" json:"protocol"` // Select between HTTP or HTTPS protocol. Host string `json:"host"` // Domain+path of NetStorage host to connect to. Account string `json:"account"` // Set the NetStorage account name Secret string `json:"secret"` // Set the NetStorage account secret/G2O key for authentication. } type createNetstorageStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config netstorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -787,31 +787,31 @@ type createNetstorageStorageRequest struct { func createNetstorageStorage() {} type onedriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `json:"region" default:"global" example:"global"` // Choose national cloud region for OneDrive. - ChunkSize string `json:"chunkSize" default:"10Mi"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). - DriveId string `json:"driveId"` // The ID of the drive to use. - DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - AccessScopes string `json:"accessScopes" default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access"` // Set scopes to be requested by rclone. - DisableSitePermission bool `json:"disableSitePermission" default:"false"` // Disable the request for Sites.Read.All permission. - ExposeOnenoteFiles bool `json:"exposeOnenoteFiles" default:"false"` // Set to make OneNote files show up in directory listings. - ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk. - NoVersions bool `json:"noVersions" default:"false"` // Remove all versions on modifying operations. - LinkScope string `json:"linkScope" default:"anonymous" example:"anonymous"` // Set the scope of the links created by the link command. - LinkType string `json:"linkType" default:"view" example:"view"` // Set the type of the links created by the link command. - LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. - HashType string `json:"hashType" default:"auto" example:"auto"` // Specify the hash in use for the backend. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Region string `default:"global" example:"global" json:"region"` // Choose national cloud region for OneDrive. + ChunkSize string `default:"10Mi" json:"chunkSize"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). + DriveId string `json:"driveId"` // The ID of the drive to use. + DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + AccessScopes string `default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" json:"accessScopes"` // Set scopes to be requested by rclone. + DisableSitePermission bool `default:"false" json:"disableSitePermission"` // Disable the request for Sites.Read.All permission. + ExposeOnenoteFiles bool `default:"false" json:"exposeOnenoteFiles"` // Set to make OneNote files show up in directory listings. + ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk. + NoVersions bool `default:"false" json:"noVersions"` // Remove all versions on modifying operations. + LinkScope string `default:"anonymous" example:"anonymous" json:"linkScope"` // Set the scope of the links created by the link command. + LinkType string `default:"view" example:"view" json:"linkType"` // Set the type of the links created by the link command. + LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. + HashType string `default:"auto" example:"auto" json:"hashType"` // Specify the hash in use for the backend. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createOnedriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config onedriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -830,29 +830,29 @@ type createOnedriveStorageRequest struct { func createOnedriveStorage() {} type oosEnv_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosEnv_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosEnv_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -871,29 +871,29 @@ type createOosEnv_authStorageRequest struct { func createOosEnv_authStorage() {} type oosInstance_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosInstance_principal_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosInstance_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -912,28 +912,28 @@ type createOosInstance_principal_authStorageRequest struct { func createOosInstance_principal_authStorage() {} type oosNo_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosNo_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosNo_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -952,29 +952,29 @@ type createOosNo_authStorageRequest struct { func createOosNo_authStorage() {} type oosResource_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosResource_principal_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosResource_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -993,31 +993,31 @@ type createOosResource_principal_authStorageRequest struct { func createOosResource_principal_authStorage() {} type oosUser_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - ConfigFile string `json:"configFile" default:"~/.oci/config" example:"~/.oci/config"` // Path to OCI config file - ConfigProfile string `json:"configProfile" default:"Default" example:"Default"` // Profile name inside the oci config file - StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + ConfigFile string `default:"~/.oci/config" example:"~/.oci/config" json:"configFile"` // Path to OCI config file + ConfigProfile string `default:"Default" example:"Default" json:"configProfile"` // Profile name inside the oci config file + StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosUser_principal_authStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosUser_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1036,14 +1036,14 @@ type createOosUser_principal_authStorageRequest struct { func createOosUser_principal_authStorage() {} type opendriveConfig struct { - Username string `json:"username"` // Username. - Password string `json:"password"` // Password. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot"` // The encoding for the backend. - ChunkSize string `json:"chunkSize" default:"10Mi"` // Files will be uploaded in chunks this size. + Username string `json:"username"` // Username. + Password string `json:"password"` // Password. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ChunkSize string `default:"10Mi" json:"chunkSize"` // Files will be uploaded in chunks this size. } type createOpendriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config opendriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1062,20 +1062,20 @@ type createOpendriveStorageRequest struct { func createOpendriveStorage() {} type pcloudConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. - RootFolderId string `json:"rootFolderId" default:"d0"` // Fill in for rclone to use a non root folder as its starting point. - Hostname string `json:"hostname" default:"api.pcloud.com" example:"api.pcloud.com"` // Hostname to connect to. - Username string `json:"username"` // Your pcloud username. - Password string `json:"password"` // Your pcloud password. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + RootFolderId string `default:"d0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. + Hostname string `default:"api.pcloud.com" example:"api.pcloud.com" json:"hostname"` // Hostname to connect to. + Username string `json:"username"` // Your pcloud username. + Password string `json:"password"` // Your pcloud password. } type createPcloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config pcloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1095,11 +1095,11 @@ func createPcloudStorage() {} type premiumizemeConfig struct { ApiKey string `json:"apiKey"` // API Key. - Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createPremiumizemeStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config premiumizemeConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1118,11 +1118,11 @@ type createPremiumizemeStorageRequest struct { func createPremiumizemeStorage() {} type putioConfig struct { - Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createPutioStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config putioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1141,20 +1141,20 @@ type createPutioStorageRequest struct { func createPutioStorage() {} type qingstorConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get QingStor credentials from runtime. - AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). - Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. - Zone string `json:"zone" example:"pek3a"` // Zone to connect to. - ConnectionRetries int `json:"connectionRetries" default:"3"` // Number of connection retries. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"4Mi"` // Chunk size to use for uploading. - UploadConcurrency int `json:"uploadConcurrency" default:"1"` // Concurrency for multipart uploads. - Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8"` // The encoding for the backend. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get QingStor credentials from runtime. + AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). + Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. + Zone string `example:"pek3a" json:"zone"` // Zone to connect to. + ConnectionRetries int `default:"3" json:"connectionRetries"` // Number of connection retries. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"4Mi" json:"chunkSize"` // Chunk size to use for uploading. + UploadConcurrency int `default:"1" json:"uploadConcurrency"` // Concurrency for multipart uploads. + Encoding string `default:"Slash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createQingstorStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config qingstorConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1173,58 +1173,58 @@ type createQingstorStorageRequest struct { func createQingstorStorage() {} type s3AWSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"us-east-1"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint" example:""` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - RequesterPays bool `json:"requesterPays" default:"false"` // Enables requester pays option when interacting with S3 bucket. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - UseAccelerateEndpoint bool `json:"useAccelerateEndpoint" default:"false"` // If true use the AWS S3 accelerated endpoint. - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata - StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"us-east-1" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `example:"" json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + RequesterPays bool `default:"false" json:"requesterPays"` // Enables requester pays option when interacting with S3 bucket. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + UseAccelerateEndpoint bool `default:"false" json:"useAccelerateEndpoint"` // If true use the AWS S3 accelerated endpoint. + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. } type createS3AWSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AWSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1243,46 +1243,46 @@ type createS3AWSStorageRequest struct { func createS3AWSStorage() {} type s3AlibabaConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"oss-accelerate.aliyuncs.com"` // Endpoint for OSS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in OSS. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"oss-accelerate.aliyuncs.com" json:"endpoint"` // Endpoint for OSS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in OSS. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3AlibabaStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AlibabaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1301,47 +1301,47 @@ type createS3AlibabaStorageRequest struct { func createS3AlibabaStorage() {} type s3ArvanCloudConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"s3.ir-thr-at1.arvanstorage.com"` // Endpoint for Arvan Cloud Object Storage (AOS) API. - LocationConstraint string `json:"locationConstraint" example:"ir-thr-at1"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in ArvanCloud. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"s3.ir-thr-at1.arvanstorage.com" json:"endpoint"` // Endpoint for Arvan Cloud Object Storage (AOS) API. + LocationConstraint string `example:"ir-thr-at1" json:"locationConstraint"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in ArvanCloud. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3ArvanCloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ArvanCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1360,53 +1360,53 @@ type createS3ArvanCloudStorageRequest struct { func createS3ArvanCloudStorage() {} type s3CephConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3CephStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CephConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1425,52 +1425,52 @@ type createS3CephStorageRequest struct { func createS3CephStorage() {} type s3ChinaMobileConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"eos-wuxi-1.cmecloud.cn"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. - LocationConstraint string `json:"locationConstraint" example:"wuxi1"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in ChinaMobile. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"eos-wuxi-1.cmecloud.cn" json:"endpoint"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. + LocationConstraint string `example:"wuxi1" json:"locationConstraint"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in ChinaMobile. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3ChinaMobileStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ChinaMobileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1489,45 +1489,45 @@ type createS3ChinaMobileStorageRequest struct { func createS3ChinaMobileStorage() {} type s3CloudflareConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"auto"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"auto" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3CloudflareStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CloudflareConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1546,47 +1546,47 @@ type createS3CloudflareStorageRequest struct { func createS3CloudflareStorage() {} type s3DigitalOceanConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"syd1.digitaloceanspaces.com"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"syd1.digitaloceanspaces.com" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3DigitalOceanStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DigitalOceanConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1605,47 +1605,47 @@ type createS3DigitalOceanStorageRequest struct { func createS3DigitalOceanStorage() {} type s3DreamhostConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"objects-us-east-1.dream.io"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"objects-us-east-1.dream.io" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3DreamhostStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DreamhostConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1664,46 +1664,46 @@ type createS3DreamhostStorageRequest struct { func createS3DreamhostStorage() {} type s3HuaweiOBSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"af-south-1"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. - Endpoint string `json:"endpoint" example:"obs.af-south-1.myhuaweicloud.com"` // Endpoint for OBS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"af-south-1" json:"region"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. + Endpoint string `example:"obs.af-south-1.myhuaweicloud.com" json:"endpoint"` // Endpoint for OBS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3HuaweiOBSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3HuaweiOBSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1722,47 +1722,47 @@ type createS3HuaweiOBSStorageRequest struct { func createS3HuaweiOBSStorage() {} type s3IBMCOSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.us.cloud-object-storage.appdomain.cloud"` // Endpoint for IBM COS S3 API. - LocationConstraint string `json:"locationConstraint" example:"us-standard"` // Location constraint - must match endpoint when using IBM Cloud Public. - Acl string `json:"acl" example:"private"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.us.cloud-object-storage.appdomain.cloud" json:"endpoint"` // Endpoint for IBM COS S3 API. + LocationConstraint string `example:"us-standard" json:"locationConstraint"` // Location constraint - must match endpoint when using IBM Cloud Public. + Acl string `example:"private" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3IBMCOSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IBMCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1781,44 +1781,44 @@ type createS3IBMCOSStorageRequest struct { func createS3IBMCOSStorage() {} type s3IDriveConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3IDriveStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IDriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1837,46 +1837,46 @@ type createS3IDriveStorageRequest struct { func createS3IDriveStorage() {} type s3IONOSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"de"` // Region where your bucket will be created and your data stored. - Endpoint string `json:"endpoint" example:"s3-eu-central-1.ionoscloud.com"` // Endpoint for IONOS S3 Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"de" json:"region"` // Region where your bucket will be created and your data stored. + Endpoint string `example:"s3-eu-central-1.ionoscloud.com" json:"endpoint"` // Endpoint for IONOS S3 Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3IONOSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IONOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1895,46 +1895,46 @@ type createS3IONOSStorageRequest struct { func createS3IONOSStorage() {} type s3LiaraConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"storage.iran.liara.space"` // Endpoint for Liara Object Storage API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Liara - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"storage.iran.liara.space" json:"endpoint"` // Endpoint for Liara Object Storage API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Liara + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3LiaraStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LiaraConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1953,47 +1953,47 @@ type createS3LiaraStorageRequest struct { func createS3LiaraStorage() {} type s3LyveCloudConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.us-east-1.lyvecloud.seagate.com"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.us-east-1.lyvecloud.seagate.com" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3LyveCloudStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LyveCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2012,53 +2012,53 @@ type createS3LyveCloudStorageRequest struct { func createS3LyveCloudStorage() {} type s3MinioConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3MinioStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3MinioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2077,47 +2077,47 @@ type createS3MinioStorageRequest struct { func createS3MinioStorage() {} type s3NeteaseConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3NeteaseStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3NeteaseConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2136,47 +2136,47 @@ type createS3NeteaseStorageRequest struct { func createS3NeteaseStorage() {} type s3OtherConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3OtherStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3OtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2195,48 +2195,48 @@ type createS3OtherStorageRequest struct { func createS3OtherStorage() {} type s3QiniuConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"cn-east-1"` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3-cn-east-1.qiniucs.com"` // Endpoint for Qiniu Object Storage. - LocationConstraint string `json:"locationConstraint" example:"cn-east-1"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Qiniu. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"cn-east-1" json:"region"` // Region to connect to. + Endpoint string `example:"s3-cn-east-1.qiniucs.com" json:"endpoint"` // Endpoint for Qiniu Object Storage. + LocationConstraint string `example:"cn-east-1" json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Qiniu. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3QiniuStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3QiniuConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2255,47 +2255,47 @@ type createS3QiniuStorageRequest struct { func createS3QiniuStorage() {} type s3RackCorpConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"global"` // region - the location where your bucket will be created and your data stored. - Endpoint string `json:"endpoint" example:"s3.rackcorp.com"` // Endpoint for RackCorp Object Storage. - LocationConstraint string `json:"locationConstraint" example:"global"` // Location constraint - the location where your bucket will be located and your data stored. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"global" json:"region"` // region - the location where your bucket will be created and your data stored. + Endpoint string `example:"s3.rackcorp.com" json:"endpoint"` // Endpoint for RackCorp Object Storage. + LocationConstraint string `example:"global" json:"locationConstraint"` // Location constraint - the location where your bucket will be located and your data stored. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3RackCorpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3RackCorpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2314,47 +2314,47 @@ type createS3RackCorpStorageRequest struct { func createS3RackCorpStorage() {} type s3ScalewayConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:"nl-ams"` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.nl-ams.scw.cloud"` // Endpoint for Scaleway Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"nl-ams" json:"region"` // Region to connect to. + Endpoint string `example:"s3.nl-ams.scw.cloud" json:"endpoint"` // Endpoint for Scaleway Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3ScalewayStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ScalewayConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2373,47 +2373,47 @@ type createS3ScalewayStorageRequest struct { func createS3ScalewayStorage() {} type s3SeaweedFSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"localhost:8333"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"localhost:8333" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3SeaweedFSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3SeaweedFSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2432,46 +2432,46 @@ type createS3SeaweedFSStorageRequest struct { func createS3SeaweedFSStorage() {} type s3StackPathConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.us-east-2.stackpathstorage.com"` // Endpoint for StackPath Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.us-east-2.stackpathstorage.com" json:"endpoint"` // Endpoint for StackPath Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3StackPathStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StackPathConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2490,44 +2490,44 @@ type createS3StackPathStorageRequest struct { func createS3StackPathStorage() {} type s3StorjConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"gateway.storjshare.io"` // Endpoint for Storj Gateway. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"gateway.storjshare.io" json:"endpoint"` // Endpoint for Storj Gateway. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3StorjStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StorjConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2546,46 +2546,46 @@ type createS3StorjStorageRequest struct { func createS3StorjStorage() {} type s3TencentCOSConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `json:"endpoint" example:"cos.ap-beijing.myqcloud.com"` // Endpoint for Tencent COS API. - Acl string `json:"acl" example:"default"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in Tencent COS. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `example:"cos.ap-beijing.myqcloud.com" json:"endpoint"` // Endpoint for Tencent COS API. + Acl string `example:"default" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in Tencent COS. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3TencentCOSStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3TencentCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2604,47 +2604,47 @@ type createS3TencentCOSStorageRequest struct { func createS3TencentCOSStorage() {} type s3WasabiConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `json:"region" example:""` // Region to connect to. - Endpoint string `json:"endpoint" example:"s3.wasabisys.com"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. - UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. - ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. - MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. - CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. - DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. - ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. - V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. - ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. - Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. - MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. - VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. - Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. - MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `example:"" json:"region"` // Region to connect to. + Endpoint string `example:"s3.wasabisys.com" json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. + UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. + ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. + MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. + CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. + DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. + ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. + V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. + ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. + VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. + Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. + MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata } type createS3WasabiStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3WasabiConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2663,19 +2663,19 @@ type createS3WasabiStorageRequest struct { func createS3WasabiStorage() {} type seafileConfig struct { - Url string `json:"url" example:"https://cloud.seafile.com/"` // URL of seafile host to connect to. - User string `json:"user"` // User name (usually email address). - Pass string `json:"pass"` // Password. - TwoFA bool `json:"2fa" default:"false"` // Two-factor authentication ('true' if the account has 2FA enabled). - Library string `json:"library"` // Name of the library. - LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). - CreateLibrary bool `json:"createLibrary" default:"false"` // Should rclone create a library if it doesn't exist. - AuthToken string `json:"authToken"` // Authentication token. - Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8"` // The encoding for the backend. + Url string `example:"https://cloud.seafile.com/" json:"url"` // URL of seafile host to connect to. + User string `json:"user"` // User name (usually email address). + Pass string `json:"pass"` // Password. + TwoFA bool `default:"false" json:"2fa"` // Two-factor authentication ('true' if the account has 2FA enabled). + Library string `json:"library"` // Name of the library. + LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). + CreateLibrary bool `default:"false" json:"createLibrary"` // Should rclone create a library if it doesn't exist. + AuthToken string `json:"authToken"` // Authentication token. + Encoding string `default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createSeafileStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config seafileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2694,41 +2694,41 @@ type createSeafileStorageRequest struct { func createSeafileStorage() {} type sftpConfig struct { - Host string `json:"host"` // SSH host to connect to. - User string `json:"user" default:"$USER"` // SSH username. - Port int `json:"port" default:"22"` // SSH port number. - Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. - KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. - KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. - KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. - PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. - KnownHostsFile string `json:"knownHostsFile" example:"~/.ssh/known_hosts"` // Optional path to known_hosts file. - KeyUseAgent bool `json:"keyUseAgent" default:"false"` // When set forces the usage of the ssh-agent. - UseInsecureCipher bool `json:"useInsecureCipher" default:"false" example:"false"` // Enable the use of insecure ciphers and key exchange methods. - DisableHashcheck bool `json:"disableHashcheck" default:"false"` // Disable the execution of SSH commands to determine if remote file hashing is available. - AskPassword bool `json:"askPassword" default:"false"` // Allow asking for SFTP password when needed. - PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. - SetModtime bool `json:"setModtime" default:"true"` // Set the modified time on the remote if set. - ShellType string `json:"shellType" example:"none"` // The type of SSH shell on remote server, if any. - Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. - Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. - SkipLinks bool `json:"skipLinks" default:"false"` // Set to skip any symlinks and any other non regular files. - Subsystem string `json:"subsystem" default:"sftp"` // Specifies the SSH2 subsystem on the remote host. - ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. - UseFstat bool `json:"useFstat" default:"false"` // If set use fstat instead of stat. - DisableConcurrentReads bool `json:"disableConcurrentReads" default:"false"` // If set don't use concurrent reads. - DisableConcurrentWrites bool `json:"disableConcurrentWrites" default:"false"` // If set don't use concurrent writes. - IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. - ChunkSize string `json:"chunkSize" default:"32Ki"` // Upload and download chunk size. - Concurrency int `json:"concurrency" default:"64"` // The maximum number of outstanding requests for one file - SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands - Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. - KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. - Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. + Host string `json:"host"` // SSH host to connect to. + User string `default:"$USER" json:"user"` // SSH username. + Port int `default:"22" json:"port"` // SSH port number. + Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. + KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. + KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. + KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. + PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. + KnownHostsFile string `example:"~/.ssh/known_hosts" json:"knownHostsFile"` // Optional path to known_hosts file. + KeyUseAgent bool `default:"false" json:"keyUseAgent"` // When set forces the usage of the ssh-agent. + UseInsecureCipher bool `default:"false" example:"false" json:"useInsecureCipher"` // Enable the use of insecure ciphers and key exchange methods. + DisableHashcheck bool `default:"false" json:"disableHashcheck"` // Disable the execution of SSH commands to determine if remote file hashing is available. + AskPassword bool `default:"false" json:"askPassword"` // Allow asking for SFTP password when needed. + PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. + SetModtime bool `default:"true" json:"setModtime"` // Set the modified time on the remote if set. + ShellType string `example:"none" json:"shellType"` // The type of SSH shell on remote server, if any. + Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. + Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. + SkipLinks bool `default:"false" json:"skipLinks"` // Set to skip any symlinks and any other non regular files. + Subsystem string `default:"sftp" json:"subsystem"` // Specifies the SSH2 subsystem on the remote host. + ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. + UseFstat bool `default:"false" json:"useFstat"` // If set use fstat instead of stat. + DisableConcurrentReads bool `default:"false" json:"disableConcurrentReads"` // If set don't use concurrent reads. + DisableConcurrentWrites bool `default:"false" json:"disableConcurrentWrites"` // If set don't use concurrent writes. + IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. + ChunkSize string `default:"32Ki" json:"chunkSize"` // Upload and download chunk size. + Concurrency int `default:"64" json:"concurrency"` // The maximum number of outstanding requests for one file + SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands + Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. + KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. + Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. } type createSftpStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2747,15 +2747,15 @@ type createSftpStorageRequest struct { func createSftpStorage() {} type sharefileConfig struct { - UploadCutoff string `json:"uploadCutoff" default:"128Mi"` // Cutoff for switching to multipart upload. - RootFolderId string `json:"rootFolderId" example:""` // ID of the root folder. - ChunkSize string `json:"chunkSize" default:"64Mi"` // Upload chunk size. - Endpoint string `json:"endpoint"` // Endpoint for API calls. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. + UploadCutoff string `default:"128Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload. + RootFolderId string `example:"" json:"rootFolderId"` // ID of the root folder. + ChunkSize string `default:"64Mi" json:"chunkSize"` // Upload chunk size. + Endpoint string `json:"endpoint"` // Endpoint for API calls. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSharefileStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sharefileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2774,14 +2774,14 @@ type createSharefileStorageRequest struct { func createSharefileStorage() {} type siaConfig struct { - ApiUrl string `json:"apiUrl" default:"http://127.0.0.1:9980"` // Sia daemon API URL, like http://sia.daemon.host:9980. - ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. - UserAgent string `json:"userAgent" default:"Sia-Agent"` // Siad User Agent - Encoding string `json:"encoding" default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + ApiUrl string `default:"http://127.0.0.1:9980" json:"apiUrl"` // Sia daemon API URL, like http://sia.daemon.host:9980. + ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. + UserAgent string `default:"Sia-Agent" json:"userAgent"` // Siad User Agent + Encoding string `default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSiaStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config siaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2800,20 +2800,20 @@ type createSiaStorageRequest struct { func createSiaStorage() {} type smbConfig struct { - Host string `json:"host"` // SMB server hostname to connect to. - User string `json:"user" default:"$USER"` // SMB username. - Port int `json:"port" default:"445"` // SMB port number. - Pass string `json:"pass"` // SMB password. - Domain string `json:"domain" default:"WORKGROUP"` // Domain name for NTLM authentication. - Spn string `json:"spn"` // Service principal name. - IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. - HideSpecialShare bool `json:"hideSpecialShare" default:"true"` // Hide special shares (e.g. print$) which users aren't supposed to access. - CaseInsensitive bool `json:"caseInsensitive" default:"true"` // Whether the server is configured to be case-insensitive. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. + Host string `json:"host"` // SMB server hostname to connect to. + User string `default:"$USER" json:"user"` // SMB username. + Port int `default:"445" json:"port"` // SMB port number. + Pass string `json:"pass"` // SMB password. + Domain string `default:"WORKGROUP" json:"domain"` // Domain name for NTLM authentication. + Spn string `json:"spn"` // Service principal name. + IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. + HideSpecialShare bool `default:"true" json:"hideSpecialShare"` // Hide special shares (e.g. print$) which users aren't supposed to access. + CaseInsensitive bool `default:"true" json:"caseInsensitive"` // Whether the server is configured to be case-insensitive. + Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSmbStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config smbConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2836,7 +2836,7 @@ type storjExistingConfig struct { } type createStorjExistingStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjExistingConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2855,13 +2855,13 @@ type createStorjExistingStorageRequest struct { func createStorjExistingStorage() {} type storjNewConfig struct { - SatelliteAddress string `json:"satelliteAddress" default:"us1.storj.io" example:"us1.storj.io"` // Satellite address. + SatelliteAddress string `default:"us1.storj.io" example:"us1.storj.io" json:"satelliteAddress"` // Satellite address. ApiKey string `json:"apiKey"` // API key. Passphrase string `json:"passphrase"` // Encryption passphrase. } type createStorjNewStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjNewConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2880,21 +2880,21 @@ type createStorjNewStorageRequest struct { func createStorjNewStorage() {} type sugarsyncConfig struct { - AppId string `json:"appId"` // Sugarsync App ID. - AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. - PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. - HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files if true - RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. - Authorization string `json:"authorization"` // Sugarsync authorization. - AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. - User string `json:"user"` // Sugarsync user. - RootId string `json:"rootId"` // Sugarsync root id. - DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. - Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + AppId string `json:"appId"` // Sugarsync App ID. + AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. + PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. + HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files if true + RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. + Authorization string `json:"authorization"` // Sugarsync authorization. + AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. + User string `json:"user"` // Sugarsync user. + RootId string `json:"rootId"` // Sugarsync root id. + DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. + Encoding string `default:"Slash,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createSugarsyncStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sugarsyncConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2913,33 +2913,33 @@ type createSugarsyncStorageRequest struct { func createSugarsyncStorage() {} type swiftConfig struct { - EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get swift credentials from environment variables in standard OpenStack form. - User string `json:"user"` // User name to log in (OS_USERNAME). - Key string `json:"key"` // API key or password (OS_PASSWORD). - Auth string `json:"auth" example:"https://auth.api.rackspacecloud.com/v1.0"` // Authentication URL for server (OS_AUTH_URL). - UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). - Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) - Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). - TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). - TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). - Region string `json:"region"` // Region name - optional (OS_REGION_NAME). - StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). - AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). - ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). - ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). - ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). - AuthVersion int `json:"authVersion" default:"0"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). - EndpointType string `json:"endpointType" default:"public" example:"public"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). - LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure. - StoragePolicy string `json:"storagePolicy" example:""` // The storage policy to use when creating a new container. - ChunkSize string `json:"chunkSize" default:"5Gi"` // Above this size files will be chunked into a _segments container. - NoChunk bool `json:"noChunk" default:"false"` // Don't chunk files during streaming upload. - NoLargeObjects bool `json:"noLargeObjects" default:"false"` // Disable support for static and dynamic large objects - Encoding string `json:"encoding" default:"Slash,InvalidUtf8"` // The encoding for the backend. + EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get swift credentials from environment variables in standard OpenStack form. + User string `json:"user"` // User name to log in (OS_USERNAME). + Key string `json:"key"` // API key or password (OS_PASSWORD). + Auth string `example:"https://auth.api.rackspacecloud.com/v1.0" json:"auth"` // Authentication URL for server (OS_AUTH_URL). + UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). + Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) + Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). + TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). + TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). + Region string `json:"region"` // Region name - optional (OS_REGION_NAME). + StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). + AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). + ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). + ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). + ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). + AuthVersion int `default:"0" json:"authVersion"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). + EndpointType string `default:"public" example:"public" json:"endpointType"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). + LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure. + StoragePolicy string `example:"" json:"storagePolicy"` // The storage policy to use when creating a new container. + ChunkSize string `default:"5Gi" json:"chunkSize"` // Above this size files will be chunked into a _segments container. + NoChunk bool `default:"false" json:"noChunk"` // Don't chunk files during streaming upload. + NoLargeObjects bool `default:"false" json:"noLargeObjects"` // Disable support for static and dynamic large objects + Encoding string `default:"Slash,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createSwiftStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config swiftConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2958,16 +2958,16 @@ type createSwiftStorageRequest struct { func createSwiftStorage() {} type unionConfig struct { - Upstreams string `json:"upstreams"` // List of space separated upstreams. - ActionPolicy string `json:"actionPolicy" default:"epall"` // Policy to choose upstream on ACTION category. - CreatePolicy string `json:"createPolicy" default:"epmfs"` // Policy to choose upstream on CREATE category. - SearchPolicy string `json:"searchPolicy" default:"ff"` // Policy to choose upstream on SEARCH category. - CacheTime int `json:"cacheTime" default:"120"` // Cache time of usage and free space (in seconds). - MinFreeSpace string `json:"minFreeSpace" default:"1Gi"` // Minimum viable free space for lfs/eplfs policies. + Upstreams string `json:"upstreams"` // List of space separated upstreams. + ActionPolicy string `default:"epall" json:"actionPolicy"` // Policy to choose upstream on ACTION category. + CreatePolicy string `default:"epmfs" json:"createPolicy"` // Policy to choose upstream on CREATE category. + SearchPolicy string `default:"ff" json:"searchPolicy"` // Policy to choose upstream on SEARCH category. + CacheTime int `default:"120" json:"cacheTime"` // Cache time of usage and free space (in seconds). + MinFreeSpace string `default:"1Gi" json:"minFreeSpace"` // Minimum viable free space for lfs/eplfs policies. } type createUnionStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config unionConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2987,11 +2987,11 @@ func createUnionStorage() {} type uptoboxConfig struct { AccessToken string `json:"accessToken"` // Your access token. - Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot"` // The encoding for the backend. + Encoding string `default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createUptoboxStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config uptoboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3010,18 +3010,18 @@ type createUptoboxStorageRequest struct { func createUptoboxStorage() {} type webdavConfig struct { - Url string `json:"url"` // URL of http host to connect to. - Vendor string `json:"vendor" example:"nextcloud"` // Name of the WebDAV site/service/software you are using. - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). - BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. - Encoding string `json:"encoding"` // The encoding for the backend. - Headers string `json:"headers"` // Set HTTP headers for all transactions. + Url string `json:"url"` // URL of http host to connect to. + Vendor string `example:"nextcloud" json:"vendor"` // Name of the WebDAV site/service/software you are using. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). + BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. + Encoding string `json:"encoding"` // The encoding for the backend. + Headers string `json:"headers"` // Set HTTP headers for all transactions. } type createWebdavStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config webdavConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3040,17 +3040,17 @@ type createWebdavStorageRequest struct { func createWebdavStorage() {} type yandexConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. - Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. + Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. } type createYandexStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config yandexConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3074,12 +3074,12 @@ type zohoConfig struct { Token string `json:"token"` // OAuth Access Token as a JSON blob. AuthUrl string `json:"authUrl"` // Auth server URL. TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `json:"region" example:"com"` // Zoho region to connect to. - Encoding string `json:"encoding" default:"Del,Ctl,InvalidUtf8"` // The encoding for the backend. + Region string `example:"com" json:"region"` // Zoho region to connect to. + Encoding string `default:"Del,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. } type createZohoStorageRequest struct { - Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique + Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config zohoConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client diff --git a/handler/wallet/create.go b/handler/wallet/create.go index 79fbf323..3bd7f118 100644 --- a/handler/wallet/create.go +++ b/handler/wallet/create.go @@ -45,13 +45,13 @@ func GenerateKey(keyType string) (string, string, error) { if err != nil { return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) } - + // Format the private key as a Lotus exported key (JSON format) privKeyJSON := map[string]interface{}{ "Type": "secp256k1", "PrivateKey": base64.StdEncoding.EncodeToString(kb), } - + privKeyBytes, err := json.Marshal(privKeyJSON) if err != nil { return "", "", xerrors.Errorf("failed to marshal private key to JSON: %w", err) @@ -69,7 +69,7 @@ func GenerateKey(keyType string) (string, string, error) { if err != nil { return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) } - + // Format the private key as a Lotus exported key (JSON format) // Convert the private key to base64 format privKeyBytes := priv.Serialize() @@ -77,7 +77,7 @@ func GenerateKey(keyType string) (string, string, error) { "Type": "bls", "PrivateKey": base64.StdEncoding.EncodeToString(privKeyBytes[:]), } - + privKeyJSONBytes, err := json.Marshal(privKeyJSON) if err != nil { return "", "", xerrors.Errorf("failed to marshal private key to JSON: %w", err) diff --git a/migrate/migrations/202505010840_wallet_actor_id.go b/migrate/migrations/202505010840_wallet_actor_id.go index c00e42cd..2291f8f8 100644 --- a/migrate/migrations/202505010840_wallet_actor_id.go +++ b/migrate/migrations/202505010840_wallet_actor_id.go @@ -32,28 +32,28 @@ func _202505010840_wallet_actor_id() *gormigrate.Migration { // Temporary struct for new Wallet schema type NewWallet struct { ID WalletID `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet - ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet - Balance float64 `json:"balance"` // Balance is in Fil cached from chain - BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain - ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets - Location string `json:"location"` // Location is optional region, country for SP wallets - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet + ActorName string `json:"actorName"` // ActorName is readable label for the wallet + Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet + Balance float64 `json:"balance"` // Balance is in Fil cached from chain + BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain + BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets + Location string `json:"location"` // Location is optional region, country for SP wallets + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet WalletType WalletType `gorm:"default:'UserWallet'" json:"walletType"` } type NewDeal struct { ID uint64 `gorm:"column:id"` ClientActorID string `json:"clientActorId"` - ClientID *WalletID `gorm:"index:idx_pending" json:"clientId"` - Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` + ClientID *WalletID `gorm:"index:idx_pending" json:"clientId"` + Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` } type OldDeal struct { ID uint64 `gorm:"column:id"` - ClientID string `gorm:"index:idx_pending" json:"clientId"` - Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` + ClientID string `gorm:"index:idx_pending" json:"clientId"` + Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` } return &gormigrate.Migration{ diff --git a/model/replication.go b/model/replication.go index cc45d91b..9a2e69e2 100644 --- a/model/replication.go +++ b/model/replication.go @@ -5,6 +5,7 @@ import ( "strconv" "time" + "github.com/cockroachdb/errors" "gorm.io/gorm" ) @@ -166,15 +167,15 @@ type WalletID uint type Wallet struct { ID WalletID `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet - ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet - Balance float64 `json:"balance"` // Balance is in Fil cached from chain - BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain - ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets - Location string `json:"location"` // Location is optional region, country for SP wallets - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet + ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet + ActorName string `json:"actorName"` // ActorName is readable label for the wallet + Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet + Balance float64 `json:"balance"` // Balance is in Fil cached from chain + BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain + BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain + ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets + Location string `json:"location"` // Location is optional region, country for SP wallets + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet WalletType WalletType `gorm:"default:'UserWallet'" json:"walletType"` } @@ -187,29 +188,6 @@ func (wallet *Wallet) FindByIDOrAddr(db *gorm.DB, param interface{}) error { // TODO: should we determine whether "f0.." or "f1..", for example? return db.Where("actor_id = ? OR address = ?", v, v).First(wallet).Error default: - return fmt.Errorf("unsupported parameter type: %T", param) + return errors.Errorf("unsupported parameter type: %T", param) } } - -// Enforce unique ActorID for initialized wallets -// func (w *Wallet) BeforeSave(tx *gorm.DB) error { -// // Only check for uniqueness if ActorID is not empty, i.e. uninitialized -// if w.ActorID != "" { -// var count int64 -// // Check if another wallet with the same ActorID exists -// // Exclude the current wallet if it has an ID (for updates) -// query := tx.Model(&Wallet{}).Where("actor_id = ?", w.ActorID) -// if w.ID != 0 { -// query = query.Where("id != ?", w.ID) -// } -// err := query.Count(&count).Error -// if err != nil { -// return err -// } - -// if count > 0 { -// return fmt.Errorf("constraint failed: wallet with ActorID '%s' already exists", w.ActorID) -// } -// } -// return nil -// } From b5df6ce6169bbab785f23f766a82c44c08b05feb Mon Sep 17 00:00:00 2001 From: Zach Fedor Date: Fri, 6 Jun 2025 12:45:20 -0400 Subject: [PATCH 38/39] Update generated storage types file Fix struct tag ordering in handler/storage/types_gen.go to match the current code generator output. This resolves CI failures where go generate was detecting differences between committed and generated files. --- handler/storage/types_gen.go | 3046 +++++++++++++++++----------------- 1 file changed, 1523 insertions(+), 1523 deletions(-) diff --git a/handler/storage/types_gen.go b/handler/storage/types_gen.go index e8dc9b60..91408d6d 100644 --- a/handler/storage/types_gen.go +++ b/handler/storage/types_gen.go @@ -6,19 +6,19 @@ package storage import "github.com/data-preservation-programs/singularity/model" type acdConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). - UploadWaitPerGb string `default:"3m0s" json:"uploadWaitPerGb"` // Additional time per GiB to wait after a failed complete upload to see if it appears. - TemplinkThreshold string `default:"9Gi" json:"templinkThreshold"` // Files >= this size will be downloaded via their tempLink. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Checkpoint string `json:"checkpoint"` // Checkpoint for internal polling (debug). + UploadWaitPerGb string `json:"uploadWaitPerGb" default:"3m0s"` // Additional time per GiB to wait after a failed complete upload to see if it appears. + TemplinkThreshold string `json:"templinkThreshold" default:"9Gi"` // Files >= this size will be downloaded via their tempLink. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. } type createAcdStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config acdConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -37,42 +37,42 @@ type createAcdStorageRequest struct { func createAcdStorage() {} type azureblobConfig struct { - Account string `json:"account"` // Azure Storage Account Name. - EnvAuth bool `default:"false" json:"envAuth"` // Read credentials from runtime (environment variables, CLI or MSI). - Key string `json:"key"` // Storage Account Shared Key. - SasUrl string `json:"sasUrl"` // SAS URL for container level access only. - Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. - ClientId string `json:"clientId"` // The ID of the client in use. - ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets - ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. - ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). - ClientSendCertificateChain bool `default:"false" json:"clientSendCertificateChain"` // Send the certificate chain when using certificate auth. - Username string `json:"username"` // User name (usually an email address) - Password string `json:"password"` // The user's password - ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. - UseMsi bool `default:"false" json:"useMsi"` // Use a managed service identity to authenticate (only works in Azure). - MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. - MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. - MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. - UseEmulator bool `default:"false" json:"useEmulator"` // Uses local storage emulator if provided as 'true'. - Endpoint string `json:"endpoint"` // Endpoint for the service. - UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). - ChunkSize string `default:"4Mi" json:"chunkSize"` // Upload chunk size. - UploadConcurrency int `default:"16" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ListChunk int `default:"5000" json:"listChunk"` // Size of blob list. - AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. - ArchiveTierDelete bool `default:"false" json:"archiveTierDelete"` // Delete archive tier blobs before overwriting. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - Encoding string `default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8" json:"encoding"` // The encoding for the backend. - PublicAccess string `example:"" json:"publicAccess"` // Public access level of a container: blob or container. - NoCheckContainer bool `default:"false" json:"noCheckContainer"` // If set, don't attempt to check the container exists or create it. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. + Account string `json:"account"` // Azure Storage Account Name. + EnvAuth bool `json:"envAuth" default:"false"` // Read credentials from runtime (environment variables, CLI or MSI). + Key string `json:"key"` // Storage Account Shared Key. + SasUrl string `json:"sasUrl"` // SAS URL for container level access only. + Tenant string `json:"tenant"` // ID of the service principal's tenant. Also called its directory ID. + ClientId string `json:"clientId"` // The ID of the client in use. + ClientSecret string `json:"clientSecret"` // One of the service principal's client secrets + ClientCertificatePath string `json:"clientCertificatePath"` // Path to a PEM or PKCS12 certificate file including the private key. + ClientCertificatePassword string `json:"clientCertificatePassword"` // Password for the certificate file (optional). + ClientSendCertificateChain bool `json:"clientSendCertificateChain" default:"false"` // Send the certificate chain when using certificate auth. + Username string `json:"username"` // User name (usually an email address) + Password string `json:"password"` // The user's password + ServicePrincipalFile string `json:"servicePrincipalFile"` // Path to file containing credentials for use with a service principal. + UseMsi bool `json:"useMsi" default:"false"` // Use a managed service identity to authenticate (only works in Azure). + MsiObjectId string `json:"msiObjectId"` // Object ID of the user-assigned MSI to use, if any. + MsiClientId string `json:"msiClientId"` // Object ID of the user-assigned MSI to use, if any. + MsiMiResId string `json:"msiMiResId"` // Azure resource ID of the user-assigned MSI to use, if any. + UseEmulator bool `json:"useEmulator" default:"false"` // Uses local storage emulator if provided as 'true'. + Endpoint string `json:"endpoint"` // Endpoint for the service. + UploadCutoff string `json:"uploadCutoff"` // Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). + ChunkSize string `json:"chunkSize" default:"4Mi"` // Upload chunk size. + UploadConcurrency int `json:"uploadConcurrency" default:"16"` // Concurrency for multipart uploads. + ListChunk int `json:"listChunk" default:"5000"` // Size of blob list. + AccessTier string `json:"accessTier"` // Access tier of blob: hot, cool or archive. + ArchiveTierDelete bool `json:"archiveTierDelete" default:"false"` // Delete archive tier blobs before overwriting. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8"` // The encoding for the backend. + PublicAccess string `json:"publicAccess" example:""` // Public access level of a container: blob or container. + NoCheckContainer bool `json:"noCheckContainer" default:"false"` // If set, don't attempt to check the container exists or create it. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. } type createAzureblobStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config azureblobConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -91,26 +91,26 @@ type createAzureblobStorageRequest struct { func createAzureblobStorage() {} type b2Config struct { - Account string `json:"account"` // Account ID or Application Key ID. - Key string `json:"key"` // Application Key. - Endpoint string `json:"endpoint"` // Endpoint for the service. - TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files on remote removal, otherwise hide files. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - CopyCutoff string `default:"4Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - ChunkSize string `default:"96Mi" json:"chunkSize"` // Upload chunk size. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Disable checksums for large (> upload cutoff) files. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - DownloadAuthDuration string `default:"1w" json:"downloadAuthDuration"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Account string `json:"account"` // Account ID or Application Key ID. + Key string `json:"key"` // Application Key. + Endpoint string `json:"endpoint"` // Endpoint for the service. + TestMode string `json:"testMode"` // A flag string for X-Bz-Test-Mode header for debugging. + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files on remote removal, otherwise hide files. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + CopyCutoff string `json:"copyCutoff" default:"4Gi"` // Cutoff for switching to multipart copy. + ChunkSize string `json:"chunkSize" default:"96Mi"` // Upload chunk size. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Disable checksums for large (> upload cutoff) files. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + DownloadAuthDuration string `json:"downloadAuthDuration" default:"1w"` // Time before the authorization token will expire in s or suffix ms|s|m|h|d. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createB2StorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config b2Config `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -129,24 +129,24 @@ type createB2StorageRequest struct { func createB2Storage() {} type boxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - RootFolderId string `default:"0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. - BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location - AccessToken string `json:"accessToken"` // Box App Primary Access Token - BoxSubType string `default:"user" example:"user" json:"boxSubType"` // - UploadCutoff string `default:"50Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload (>= 50 MiB). - CommitRetries int `default:"100" json:"commitRetries"` // Max number of times to try committing a multipart file. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 1-1000. - OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. - Encoding string `default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + RootFolderId string `json:"rootFolderId" default:"0"` // Fill in for rclone to use a non root folder as its starting point. + BoxConfigFile string `json:"boxConfigFile"` // Box App config.json location + AccessToken string `json:"accessToken"` // Box App Primary Access Token + BoxSubType string `json:"boxSubType" default:"user" example:"user"` // + UploadCutoff string `json:"uploadCutoff" default:"50Mi"` // Cutoff for switching to multipart upload (>= 50 MiB). + CommitRetries int `json:"commitRetries" default:"100"` // Max number of times to try committing a multipart file. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 1-1000. + OwnedBy string `json:"ownedBy"` // Only show items owned by the login (email address) passed in. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createBoxStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config boxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -165,53 +165,53 @@ type createBoxStorageRequest struct { func createBoxStorage() {} type driveConfig struct { - ClientId string `json:"clientId"` // Google Application Client Id - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Scope string `example:"drive" json:"scope"` // Scope that rclone should use when requesting access from drive. - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). - AuthOwnerOnly bool `default:"false" json:"authOwnerOnly"` // Only consider files owned by the authenticated user. - UseTrash bool `default:"true" json:"useTrash"` // Send files to the trash instead of deleting permanently. - CopyShortcutContent bool `default:"false" json:"copyShortcutContent"` // Server side copy contents of shortcuts instead of the shortcut. - SkipGdocs bool `default:"false" json:"skipGdocs"` // Skip google documents in all listings. - SkipChecksumGphotos bool `default:"false" json:"skipChecksumGphotos"` // Skip MD5 checksum on Google photos and videos only. - SharedWithMe bool `default:"false" json:"sharedWithMe"` // Only show files that are shared with me. - TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. - StarredOnly bool `default:"false" json:"starredOnly"` // Only show files that are starred. - Formats string `json:"formats"` // Deprecated: See export_formats. - ExportFormats string `default:"docx,xlsx,pptx,svg" json:"exportFormats"` // Comma separated list of preferred formats for downloading Google docs. - ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. - AllowImportNameChange bool `default:"false" json:"allowImportNameChange"` // Allow the filetype to change when uploading Google docs. - UseCreatedDate bool `default:"false" json:"useCreatedDate"` // Use file created date instead of modified date. - UseSharedDate bool `default:"false" json:"useSharedDate"` // Use date file was shared instead of modified date. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk 100-1000, 0 to disable. - Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. - AlternateExport bool `default:"false" json:"alternateExport"` // Deprecated: No longer needed. - UploadCutoff string `default:"8Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"8Mi" json:"chunkSize"` // Upload chunk size. - AcknowledgeAbuse bool `default:"false" json:"acknowledgeAbuse"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. - KeepRevisionForever bool `default:"false" json:"keepRevisionForever"` // Keep new head revision of each file forever. - SizeAsQuota bool `default:"false" json:"sizeAsQuota"` // Show sizes as storage quota usage, not actual size. - V2DownloadMinSize string `default:"off" json:"v2DownloadMinSize"` // If Object's are greater, use drive v2 API to download. - PacerMinSleep string `default:"100ms" json:"pacerMinSleep"` // Minimum time to sleep between API calls. - PacerBurst int `default:"100" json:"pacerBurst"` // Number of API calls to allow without sleeping. - ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different drive configs. - DisableHttp2 bool `default:"true" json:"disableHttp2"` // Disable drive using http2. - StopOnUploadLimit bool `default:"false" json:"stopOnUploadLimit"` // Make upload limit errors be fatal. - StopOnDownloadLimit bool `default:"false" json:"stopOnDownloadLimit"` // Make download limit errors be fatal. - SkipShortcuts bool `default:"false" json:"skipShortcuts"` // If set skip shortcut files. - SkipDanglingShortcuts bool `default:"false" json:"skipDanglingShortcuts"` // If set skip dangling shortcut files. - ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. - Encoding string `default:"InvalidUtf8" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // Google Application Client Id + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Scope string `json:"scope" example:"drive"` // Scope that rclone should use when requesting access from drive. + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + TeamDrive string `json:"teamDrive"` // ID of the Shared Drive (Team Drive). + AuthOwnerOnly bool `json:"authOwnerOnly" default:"false"` // Only consider files owned by the authenticated user. + UseTrash bool `json:"useTrash" default:"true"` // Send files to the trash instead of deleting permanently. + CopyShortcutContent bool `json:"copyShortcutContent" default:"false"` // Server side copy contents of shortcuts instead of the shortcut. + SkipGdocs bool `json:"skipGdocs" default:"false"` // Skip google documents in all listings. + SkipChecksumGphotos bool `json:"skipChecksumGphotos" default:"false"` // Skip MD5 checksum on Google photos and videos only. + SharedWithMe bool `json:"sharedWithMe" default:"false"` // Only show files that are shared with me. + TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. + StarredOnly bool `json:"starredOnly" default:"false"` // Only show files that are starred. + Formats string `json:"formats"` // Deprecated: See export_formats. + ExportFormats string `json:"exportFormats" default:"docx,xlsx,pptx,svg"` // Comma separated list of preferred formats for downloading Google docs. + ImportFormats string `json:"importFormats"` // Comma separated list of preferred formats for uploading Google docs. + AllowImportNameChange bool `json:"allowImportNameChange" default:"false"` // Allow the filetype to change when uploading Google docs. + UseCreatedDate bool `json:"useCreatedDate" default:"false"` // Use file created date instead of modified date. + UseSharedDate bool `json:"useSharedDate" default:"false"` // Use date file was shared instead of modified date. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk 100-1000, 0 to disable. + Impersonate string `json:"impersonate"` // Impersonate this user when using a service account. + AlternateExport bool `json:"alternateExport" default:"false"` // Deprecated: No longer needed. + UploadCutoff string `json:"uploadCutoff" default:"8Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"8Mi"` // Upload chunk size. + AcknowledgeAbuse bool `json:"acknowledgeAbuse" default:"false"` // Set to allow files which return cannotDownloadAbusiveFile to be downloaded. + KeepRevisionForever bool `json:"keepRevisionForever" default:"false"` // Keep new head revision of each file forever. + SizeAsQuota bool `json:"sizeAsQuota" default:"false"` // Show sizes as storage quota usage, not actual size. + V2DownloadMinSize string `json:"v2DownloadMinSize" default:"off"` // If Object's are greater, use drive v2 API to download. + PacerMinSleep string `json:"pacerMinSleep" default:"100ms"` // Minimum time to sleep between API calls. + PacerBurst int `json:"pacerBurst" default:"100"` // Number of API calls to allow without sleeping. + ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different drive configs. + DisableHttp2 bool `json:"disableHttp2" default:"true"` // Disable drive using http2. + StopOnUploadLimit bool `json:"stopOnUploadLimit" default:"false"` // Make upload limit errors be fatal. + StopOnDownloadLimit bool `json:"stopOnDownloadLimit" default:"false"` // Make download limit errors be fatal. + SkipShortcuts bool `json:"skipShortcuts" default:"false"` // If set skip shortcut files. + SkipDanglingShortcuts bool `json:"skipDanglingShortcuts" default:"false"` // If set skip dangling shortcut files. + ResourceKey string `json:"resourceKey"` // Resource key for accessing a link-shared file. + Encoding string `json:"encoding" default:"InvalidUtf8"` // The encoding for the backend. } type createDriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config driveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -230,24 +230,24 @@ type createDriveStorageRequest struct { func createDriveStorage() {} type dropboxConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ChunkSize string `default:"48Mi" json:"chunkSize"` // Upload chunk size (< 150Mi). - Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. - SharedFiles bool `default:"false" json:"sharedFiles"` // Instructs rclone to work on individual shared files. - SharedFolders bool `default:"false" json:"sharedFolders"` // Instructs rclone to work on shared folders. - BatchMode string `default:"sync" json:"batchMode"` // Upload file batching sync|async|off. - BatchSize int `default:"0" json:"batchSize"` // Max number of files in upload batch. - BatchTimeout string `default:"0s" json:"batchTimeout"` // Max time to allow an idle upload batch before uploading. - BatchCommitTimeout string `default:"10m0s" json:"batchCommitTimeout"` // Max time to wait for a batch to finish committing - Encoding string `default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ChunkSize string `json:"chunkSize" default:"48Mi"` // Upload chunk size (< 150Mi). + Impersonate string `json:"impersonate"` // Impersonate this user when using a business account. + SharedFiles bool `json:"sharedFiles" default:"false"` // Instructs rclone to work on individual shared files. + SharedFolders bool `json:"sharedFolders" default:"false"` // Instructs rclone to work on shared folders. + BatchMode string `json:"batchMode" default:"sync"` // Upload file batching sync|async|off. + BatchSize int `json:"batchSize" default:"0"` // Max number of files in upload batch. + BatchTimeout string `json:"batchTimeout" default:"0s"` // Max time to allow an idle upload batch before uploading. + BatchCommitTimeout string `json:"batchCommitTimeout" default:"10m0s"` // Max time to wait for a batch to finish committing + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createDropboxStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config dropboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -270,11 +270,11 @@ type fichierConfig struct { SharedFolder string `json:"sharedFolder"` // If you want to download a shared folder, add this parameter. FilePassword string `json:"filePassword"` // If you want to download a shared file that is password protected, add this parameter. FolderPassword string `json:"folderPassword"` // If you want to list the files in a shared folder that is password protected, add this parameter. - Encoding string `default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createFichierStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config fichierConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -293,17 +293,17 @@ type createFichierStorageRequest struct { func createFichierStorage() {} type filefabricConfig struct { - Url string `example:"https://storagemadeeasy.com" json:"url"` // URL of the Enterprise File Fabric to connect to. + Url string `json:"url" example:"https://storagemadeeasy.com"` // URL of the Enterprise File Fabric to connect to. RootFolderId string `json:"rootFolderId"` // ID of the root folder. PermanentToken string `json:"permanentToken"` // Permanent Authentication Token. Token string `json:"token"` // Session Token. TokenExpiry string `json:"tokenExpiry"` // Token expiry time. Version string `json:"version"` // Version read from the file fabric. - Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createFilefabricStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config filefabricConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -323,29 +323,29 @@ func createFilefabricStorage() {} type ftpConfig struct { Host string `json:"host"` // FTP host to connect to. - User string `default:"$USER" json:"user"` // FTP username. - Port int `default:"21" json:"port"` // FTP port number. + User string `json:"user" default:"$USER"` // FTP username. + Port int `json:"port" default:"21"` // FTP port number. Pass string `json:"pass"` // FTP password. - Tls bool `default:"false" json:"tls"` // Use Implicit FTPS (FTP over TLS). - ExplicitTls bool `default:"false" json:"explicitTls"` // Use Explicit FTPS (FTP over TLS). - Concurrency int `default:"0" json:"concurrency"` // Maximum number of FTP simultaneous connections, 0 for unlimited. - NoCheckCertificate bool `default:"false" json:"noCheckCertificate"` // Do not verify the TLS certificate of the server. - DisableEpsv bool `default:"false" json:"disableEpsv"` // Disable using EPSV even if server advertises support. - DisableMlsd bool `default:"false" json:"disableMlsd"` // Disable using MLSD even if server advertises support. - DisableUtf8 bool `default:"false" json:"disableUtf8"` // Disable using UTF-8 even if server advertises support. - WritingMdtm bool `default:"false" json:"writingMdtm"` // Use MDTM to set modification time (VsFtpd quirk) - ForceListHidden bool `default:"false" json:"forceListHidden"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. - IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. - CloseTimeout string `default:"1m0s" json:"closeTimeout"` // Maximum time to wait for a response to close. - TlsCacheSize int `default:"32" json:"tlsCacheSize"` // Size of TLS session cache for all control and data connections. - DisableTls13 bool `default:"false" json:"disableTls13"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) - ShutTimeout string `default:"1m0s" json:"shutTimeout"` // Maximum time to wait for data connection closing status. - AskPassword bool `default:"false" json:"askPassword"` // Allow asking for FTP password when needed. - Encoding string `default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash" json:"encoding"` // The encoding for the backend. + Tls bool `json:"tls" default:"false"` // Use Implicit FTPS (FTP over TLS). + ExplicitTls bool `json:"explicitTls" default:"false"` // Use Explicit FTPS (FTP over TLS). + Concurrency int `json:"concurrency" default:"0"` // Maximum number of FTP simultaneous connections, 0 for unlimited. + NoCheckCertificate bool `json:"noCheckCertificate" default:"false"` // Do not verify the TLS certificate of the server. + DisableEpsv bool `json:"disableEpsv" default:"false"` // Disable using EPSV even if server advertises support. + DisableMlsd bool `json:"disableMlsd" default:"false"` // Disable using MLSD even if server advertises support. + DisableUtf8 bool `json:"disableUtf8" default:"false"` // Disable using UTF-8 even if server advertises support. + WritingMdtm bool `json:"writingMdtm" default:"false"` // Use MDTM to set modification time (VsFtpd quirk) + ForceListHidden bool `json:"forceListHidden" default:"false"` // Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. + IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. + CloseTimeout string `json:"closeTimeout" default:"1m0s"` // Maximum time to wait for a response to close. + TlsCacheSize int `json:"tlsCacheSize" default:"32"` // Size of TLS session cache for all control and data connections. + DisableTls13 bool `json:"disableTls13" default:"false"` // Disable TLS 1.3 (workaround for FTP servers with buggy TLS) + ShutTimeout string `json:"shutTimeout" default:"1m0s"` // Maximum time to wait for data connection closing status. + AskPassword bool `json:"askPassword" default:"false"` // Allow asking for FTP password when needed. + Encoding string `json:"encoding" default:"Slash,Del,Ctl,RightSpace,Dot" example:"Asterisk,Ctl,Dot,Slash"` // The encoding for the backend. } type createFtpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config ftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -364,29 +364,29 @@ type createFtpStorageRequest struct { func createFtpStorage() {} type gcsConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ProjectNumber string `json:"projectNumber"` // Project number. - ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. - ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. - Anonymous bool `default:"false" json:"anonymous"` // Access public buckets and objects without credentials. - ObjectAcl string `example:"authenticatedRead" json:"objectAcl"` // Access Control List for new objects. - BucketAcl string `example:"authenticatedRead" json:"bucketAcl"` // Access Control List for new buckets. - BucketPolicyOnly bool `default:"false" json:"bucketPolicyOnly"` // Access checks should use bucket-level IAM policies. - Location string `example:"" json:"location"` // Location for the newly created buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing objects in Google Cloud Storage. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - Endpoint string `json:"endpoint"` // Endpoint for the service. - Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ProjectNumber string `json:"projectNumber"` // Project number. + ServiceAccountFile string `json:"serviceAccountFile"` // Service Account Credentials JSON file path. + ServiceAccountCredentials string `json:"serviceAccountCredentials"` // Service Account Credentials JSON blob. + Anonymous bool `json:"anonymous" default:"false"` // Access public buckets and objects without credentials. + ObjectAcl string `json:"objectAcl" example:"authenticatedRead"` // Access Control List for new objects. + BucketAcl string `json:"bucketAcl" example:"authenticatedRead"` // Access Control List for new buckets. + BucketPolicyOnly bool `json:"bucketPolicyOnly" default:"false"` // Access checks should use bucket-level IAM policies. + Location string `json:"location" example:""` // Location for the newly created buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing objects in Google Cloud Storage. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + Endpoint string `json:"endpoint"` // Endpoint for the service. + Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). } type createGcsStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gcsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -405,20 +405,20 @@ type createGcsStorageRequest struct { func createGcsStorage() {} type gphotosConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ReadOnly bool `default:"false" json:"readOnly"` // Set to make the Google Photos backend read only. - ReadSize bool `default:"false" json:"readSize"` // Set to read the size of media items. - StartYear int `default:"2000" json:"startYear"` // Year limits the photos to be downloaded to those which are uploaded after the given year. - IncludeArchived bool `default:"false" json:"includeArchived"` // Also view and download archived media. - Encoding string `default:"Slash,CrLf,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ReadOnly bool `json:"readOnly" default:"false"` // Set to make the Google Photos backend read only. + ReadSize bool `json:"readSize" default:"false"` // Set to read the size of media items. + StartYear int `json:"startYear" default:"2000"` // Year limits the photos to be downloaded to those which are uploaded after the given year. + IncludeArchived bool `json:"includeArchived" default:"false"` // Also view and download archived media. + Encoding string `json:"encoding" default:"Slash,CrLf,InvalidUtf8,Dot"` // The encoding for the backend. } type createGphotosStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config gphotosConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -437,15 +437,15 @@ type createGphotosStorageRequest struct { func createGphotosStorage() {} type hdfsConfig struct { - Namenode string `json:"namenode"` // Hadoop name node and port. - Username string `example:"root" json:"username"` // Hadoop user name. - ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. - DataTransferProtection string `example:"privacy" json:"dataTransferProtection"` // Kerberos data transfer protection: authentication|integrity|privacy. - Encoding string `default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Namenode string `json:"namenode"` // Hadoop name node and port. + Username string `json:"username" example:"root"` // Hadoop user name. + ServicePrincipalName string `json:"servicePrincipalName"` // Kerberos service principal name for the namenode. + DataTransferProtection string `json:"dataTransferProtection" example:"privacy"` // Kerberos data transfer protection: authentication|integrity|privacy. + Encoding string `json:"encoding" default:"Slash,Colon,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createHdfsStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hdfsConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -464,24 +464,24 @@ type createHdfsStorageRequest struct { func createHdfsStorage() {} type hidriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - ScopeAccess string `default:"rw" example:"rw" json:"scopeAccess"` // Access permissions that rclone should use when requesting access from HiDrive. - ScopeRole string `default:"user" example:"user" json:"scopeRole"` // User-level that rclone should use when requesting access from HiDrive. - RootPrefix string `default:"/" example:"/" json:"rootPrefix"` // The root/parent folder for all paths. - Endpoint string `default:"https://api.hidrive.strato.com/2.1" json:"endpoint"` // Endpoint for the service. - DisableFetchingMemberCount bool `default:"false" json:"disableFetchingMemberCount"` // Do not fetch number of objects in directories unless it is absolutely necessary. - ChunkSize string `default:"48Mi" json:"chunkSize"` // Chunksize for chunked uploads. - UploadCutoff string `default:"96Mi" json:"uploadCutoff"` // Cutoff/Threshold for chunked uploads. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for chunked uploads. - Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + ScopeAccess string `json:"scopeAccess" default:"rw" example:"rw"` // Access permissions that rclone should use when requesting access from HiDrive. + ScopeRole string `json:"scopeRole" default:"user" example:"user"` // User-level that rclone should use when requesting access from HiDrive. + RootPrefix string `json:"rootPrefix" default:"/" example:"/"` // The root/parent folder for all paths. + Endpoint string `json:"endpoint" default:"https://api.hidrive.strato.com/2.1"` // Endpoint for the service. + DisableFetchingMemberCount bool `json:"disableFetchingMemberCount" default:"false"` // Do not fetch number of objects in directories unless it is absolutely necessary. + ChunkSize string `json:"chunkSize" default:"48Mi"` // Chunksize for chunked uploads. + UploadCutoff string `json:"uploadCutoff" default:"96Mi"` // Cutoff/Threshold for chunked uploads. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for chunked uploads. + Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. } type createHidriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config hidriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -502,12 +502,12 @@ func createHidriveStorage() {} type httpConfig struct { Url string `json:"url"` // URL of HTTP host to connect to. Headers string `json:"headers"` // Set HTTP headers for all transactions. - NoSlash bool `default:"false" json:"noSlash"` // Set this if the site doesn't end directories with /. - NoHead bool `default:"false" json:"noHead"` // Don't use HEAD requests. + NoSlash bool `json:"noSlash" default:"false"` // Set this if the site doesn't end directories with /. + NoHead bool `json:"noHead" default:"false"` // Don't use HEAD requests. } type createHttpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config httpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -526,17 +526,17 @@ type createHttpStorageRequest struct { func createHttpStorage() {} type internetarchiveConfig struct { - AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. - SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). - Endpoint string `default:"https://s3.us.archive.org" json:"endpoint"` // IAS3 Endpoint. - FrontEndpoint string `default:"https://archive.org" json:"frontEndpoint"` // Host of InternetArchive Frontend. - DisableChecksum bool `default:"true" json:"disableChecksum"` // Don't ask the server to test against MD5 checksum calculated by rclone. - WaitArchive string `default:"0s" json:"waitArchive"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. - Encoding string `default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + AccessKeyId string `json:"accessKeyId"` // IAS3 Access Key. + SecretAccessKey string `json:"secretAccessKey"` // IAS3 Secret Key (password). + Endpoint string `json:"endpoint" default:"https://s3.us.archive.org"` // IAS3 Endpoint. + FrontEndpoint string `json:"frontEndpoint" default:"https://archive.org"` // Host of InternetArchive Frontend. + DisableChecksum bool `json:"disableChecksum" default:"true"` // Don't ask the server to test against MD5 checksum calculated by rclone. + WaitArchive string `json:"waitArchive" default:"0s"` // Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. + Encoding string `json:"encoding" default:"Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createInternetarchiveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config internetarchiveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -555,16 +555,16 @@ type createInternetarchiveStorageRequest struct { func createInternetarchiveStorage() {} type jottacloudConfig struct { - Md5MemoryLimit string `default:"10Mi" json:"md5MemoryLimit"` // Files bigger than this will be cached on disk to calculate the MD5 if required. - TrashedOnly bool `default:"false" json:"trashedOnly"` // Only show files that are in the trash. - HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. - UploadResumeLimit string `default:"10Mi" json:"uploadResumeLimit"` // Files bigger than this can be resumed if the upload fail's. - NoVersions bool `default:"false" json:"noVersions"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Md5MemoryLimit string `json:"md5MemoryLimit" default:"10Mi"` // Files bigger than this will be cached on disk to calculate the MD5 if required. + TrashedOnly bool `json:"trashedOnly" default:"false"` // Only show files that are in the trash. + HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. + UploadResumeLimit string `json:"uploadResumeLimit" default:"10Mi"` // Files bigger than this can be resumed if the upload fail's. + NoVersions bool `json:"noVersions" default:"false"` // Avoid server side versioning by deleting files and recreating files instead of overwriting them. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createJottacloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config jottacloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -584,14 +584,14 @@ func createJottacloudStorage() {} type koofrDigistorageConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. + Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password). - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createKoofrDigistorageStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrDigistorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -611,14 +611,14 @@ func createKoofrDigistorageStorage() {} type koofrKoofrConfig struct { Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. + Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createKoofrKoofrStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrKoofrConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -639,14 +639,14 @@ func createKoofrKoofrStorage() {} type koofrOtherConfig struct { Endpoint string `json:"endpoint"` // The Koofr API endpoint to use. Mountid string `json:"mountid"` // Mount ID of the mount to use. - Setmtime bool `default:"true" json:"setmtime"` // Does the backend support setting modification time. + Setmtime bool `json:"setmtime" default:"true"` // Does the backend support setting modification time. User string `json:"user"` // Your user name. Password string `json:"password"` // Your password for rclone (generate one at your service's settings page). - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createKoofrOtherStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config koofrOtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -665,24 +665,24 @@ type createKoofrOtherStorageRequest struct { func createKoofrOtherStorage() {} type localConfig struct { - Nounc bool `default:"false" example:"true" json:"nounc"` // Disable UNC (long path names) conversion on Windows. - CopyLinks bool `default:"false" json:"copyLinks"` // Follow symlinks and copy the pointed to item. - Links bool `default:"false" json:"links"` // Translate symlinks to/from regular files with a '.rclonelink' extension. - SkipLinks bool `default:"false" json:"skipLinks"` // Don't warn about skipped symlinks. - ZeroSizeLinks bool `default:"false" json:"zeroSizeLinks"` // Assume the Stat size of links is zero (and read them instead) (deprecated). - UnicodeNormalization bool `default:"false" json:"unicodeNormalization"` // Apply unicode NFC normalization to paths and filenames. - NoCheckUpdated bool `default:"false" json:"noCheckUpdated"` // Don't check to see if the files change during upload. - OneFileSystem bool `default:"false" json:"oneFileSystem"` // Don't cross filesystem boundaries (unix/macOS only). - CaseSensitive bool `default:"false" json:"caseSensitive"` // Force the filesystem to report itself as case sensitive. - CaseInsensitive bool `default:"false" json:"caseInsensitive"` // Force the filesystem to report itself as case insensitive. - NoPreallocate bool `default:"false" json:"noPreallocate"` // Disable preallocation of disk space for transferred files. - NoSparse bool `default:"false" json:"noSparse"` // Disable sparse files for multi-thread downloads. - NoSetModtime bool `default:"false" json:"noSetModtime"` // Disable setting modtime. - Encoding string `default:"Slash,Dot" json:"encoding"` // The encoding for the backend. + Nounc bool `json:"nounc" default:"false" example:"true"` // Disable UNC (long path names) conversion on Windows. + CopyLinks bool `json:"copyLinks" default:"false"` // Follow symlinks and copy the pointed to item. + Links bool `json:"links" default:"false"` // Translate symlinks to/from regular files with a '.rclonelink' extension. + SkipLinks bool `json:"skipLinks" default:"false"` // Don't warn about skipped symlinks. + ZeroSizeLinks bool `json:"zeroSizeLinks" default:"false"` // Assume the Stat size of links is zero (and read them instead) (deprecated). + UnicodeNormalization bool `json:"unicodeNormalization" default:"false"` // Apply unicode NFC normalization to paths and filenames. + NoCheckUpdated bool `json:"noCheckUpdated" default:"false"` // Don't check to see if the files change during upload. + OneFileSystem bool `json:"oneFileSystem" default:"false"` // Don't cross filesystem boundaries (unix/macOS only). + CaseSensitive bool `json:"caseSensitive" default:"false"` // Force the filesystem to report itself as case sensitive. + CaseInsensitive bool `json:"caseInsensitive" default:"false"` // Force the filesystem to report itself as case insensitive. + NoPreallocate bool `json:"noPreallocate" default:"false"` // Disable preallocation of disk space for transferred files. + NoSparse bool `json:"noSparse" default:"false"` // Disable sparse files for multi-thread downloads. + NoSetModtime bool `json:"noSetModtime" default:"false"` // Disable setting modtime. + Encoding string `json:"encoding" default:"Slash,Dot"` // The encoding for the backend. } type createLocalStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config localConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -701,20 +701,20 @@ type createLocalStorageRequest struct { func createLocalStorage() {} type mailruConfig struct { - User string `json:"user"` // User name (usually email). - Pass string `json:"pass"` // Password. - SpeedupEnable bool `default:"true" example:"true" json:"speedupEnable"` // Skip full upload if there is another file with same data hash. - SpeedupFilePatterns string `default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:"" json:"speedupFilePatterns"` // Comma separated list of file name patterns eligible for speedup (put by hash). - SpeedupMaxDisk string `default:"3Gi" example:"0" json:"speedupMaxDisk"` // This option allows you to disable speedup (put by hash) for large files. - SpeedupMaxMemory string `default:"32Mi" example:"0" json:"speedupMaxMemory"` // Files larger than the size given below will always be hashed on disk. - CheckHash bool `default:"true" example:"true" json:"checkHash"` // What should copy do if file checksum is mismatched or invalid. - UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. - Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + User string `json:"user"` // User name (usually email). + Pass string `json:"pass"` // Password. + SpeedupEnable bool `json:"speedupEnable" default:"true" example:"true"` // Skip full upload if there is another file with same data hash. + SpeedupFilePatterns string `json:"speedupFilePatterns" default:"*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" example:""` // Comma separated list of file name patterns eligible for speedup (put by hash). + SpeedupMaxDisk string `json:"speedupMaxDisk" default:"3Gi" example:"0"` // This option allows you to disable speedup (put by hash) for large files. + SpeedupMaxMemory string `json:"speedupMaxMemory" default:"32Mi" example:"0"` // Files larger than the size given below will always be hashed on disk. + CheckHash bool `json:"checkHash" default:"true" example:"true"` // What should copy do if file checksum is mismatched or invalid. + UserAgent string `json:"userAgent"` // HTTP user agent used internally by client. + Quirks string `json:"quirks"` // Comma separated list of internal maintenance flags. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createMailruStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config mailruConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -733,16 +733,16 @@ type createMailruStorageRequest struct { func createMailruStorage() {} type megaConfig struct { - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - Debug bool `default:"false" json:"debug"` // Output more debug from Mega. - HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. - UseHttps bool `default:"false" json:"useHttps"` // Use HTTPS for transfers. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + Debug bool `json:"debug" default:"false"` // Output more debug from Mega. + HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. + UseHttps bool `json:"useHttps" default:"false"` // Use HTTPS for transfers. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. } type createMegaStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config megaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -761,14 +761,14 @@ type createMegaStorageRequest struct { func createMegaStorage() {} type netstorageConfig struct { - Protocol string `default:"https" example:"http" json:"protocol"` // Select between HTTP or HTTPS protocol. + Protocol string `json:"protocol" default:"https" example:"http"` // Select between HTTP or HTTPS protocol. Host string `json:"host"` // Domain+path of NetStorage host to connect to. Account string `json:"account"` // Set the NetStorage account name Secret string `json:"secret"` // Set the NetStorage account secret/G2O key for authentication. } type createNetstorageStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config netstorageConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -787,31 +787,31 @@ type createNetstorageStorageRequest struct { func createNetstorageStorage() {} type onedriveConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `default:"global" example:"global" json:"region"` // Choose national cloud region for OneDrive. - ChunkSize string `default:"10Mi" json:"chunkSize"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). - DriveId string `json:"driveId"` // The ID of the drive to use. - DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). - RootFolderId string `json:"rootFolderId"` // ID of the root folder. - AccessScopes string `default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" json:"accessScopes"` // Set scopes to be requested by rclone. - DisableSitePermission bool `default:"false" json:"disableSitePermission"` // Disable the request for Sites.Read.All permission. - ExposeOnenoteFiles bool `default:"false" json:"exposeOnenoteFiles"` // Set to make OneNote files show up in directory listings. - ServerSideAcrossConfigs bool `default:"false" json:"serverSideAcrossConfigs"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk. - NoVersions bool `default:"false" json:"noVersions"` // Remove all versions on modifying operations. - LinkScope string `default:"anonymous" example:"anonymous" json:"linkScope"` // Set the scope of the links created by the link command. - LinkType string `default:"view" example:"view" json:"linkType"` // Set the type of the links created by the link command. - LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. - HashType string `default:"auto" example:"auto" json:"hashType"` // Specify the hash in use for the backend. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Region string `json:"region" default:"global" example:"global"` // Choose national cloud region for OneDrive. + ChunkSize string `json:"chunkSize" default:"10Mi"` // Chunk size to upload files with - must be multiple of 320k (327,680 bytes). + DriveId string `json:"driveId"` // The ID of the drive to use. + DriveType string `json:"driveType"` // The type of the drive (personal | business | documentLibrary). + RootFolderId string `json:"rootFolderId"` // ID of the root folder. + AccessScopes string `json:"accessScopes" default:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" example:"Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access"` // Set scopes to be requested by rclone. + DisableSitePermission bool `json:"disableSitePermission" default:"false"` // Disable the request for Sites.Read.All permission. + ExposeOnenoteFiles bool `json:"exposeOnenoteFiles" default:"false"` // Set to make OneNote files show up in directory listings. + ServerSideAcrossConfigs bool `json:"serverSideAcrossConfigs" default:"false"` // Allow server-side operations (e.g. copy) to work across different onedrive configs. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk. + NoVersions bool `json:"noVersions" default:"false"` // Remove all versions on modifying operations. + LinkScope string `json:"linkScope" default:"anonymous" example:"anonymous"` // Set the scope of the links created by the link command. + LinkType string `json:"linkType" default:"view" example:"view"` // Set the type of the links created by the link command. + LinkPassword string `json:"linkPassword"` // Set the password for links created by the link command. + HashType string `json:"hashType" default:"auto" example:"auto"` // Specify the hash in use for the backend. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. } type createOnedriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config onedriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -830,29 +830,29 @@ type createOnedriveStorageRequest struct { func createOnedriveStorage() {} type oosEnv_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosEnv_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosEnv_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -871,29 +871,29 @@ type createOosEnv_authStorageRequest struct { func createOosEnv_authStorage() {} type oosInstance_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosInstance_principal_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosInstance_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -912,28 +912,28 @@ type createOosInstance_principal_authStorageRequest struct { func createOosInstance_principal_authStorage() {} type oosNo_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosNo_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosNo_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -952,29 +952,29 @@ type createOosNo_authStorageRequest struct { func createOosNo_authStorage() {} type oosResource_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosResource_principal_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosResource_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -993,31 +993,31 @@ type createOosResource_principal_authStorageRequest struct { func createOosResource_principal_authStorage() {} type oosUser_principal_authConfig struct { - Namespace string `json:"namespace"` // Object storage namespace - Compartment string `json:"compartment"` // Object storage compartment OCID - Region string `json:"region"` // Object storage Region - Endpoint string `json:"endpoint"` // Endpoint for Object storage API. - ConfigFile string `default:"~/.oci/config" example:"~/.oci/config" json:"configFile"` // Path to OCI config file - ConfigProfile string `default:"Default" example:"Default" json:"configProfile"` // Profile name inside the oci config file - StorageTier string `default:"Standard" example:"Standard" json:"storageTier"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"10" json:"uploadConcurrency"` // Concurrency for multipart uploads. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - CopyTimeout string `default:"1m0s" json:"copyTimeout"` // Timeout for copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - SseCustomerKeyFile string `example:"" json:"sseCustomerKeyFile"` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to - SseCustomerKeySha256 string `example:"" json:"sseCustomerKeySha256"` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // if using using your own master key in vault, this header specifies the - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. + Namespace string `json:"namespace"` // Object storage namespace + Compartment string `json:"compartment"` // Object storage compartment OCID + Region string `json:"region"` // Object storage Region + Endpoint string `json:"endpoint"` // Endpoint for Object storage API. + ConfigFile string `json:"configFile" default:"~/.oci/config" example:"~/.oci/config"` // Path to OCI config file + ConfigProfile string `json:"configProfile" default:"Default" example:"Default"` // Profile name inside the oci config file + StorageTier string `json:"storageTier" default:"Standard" example:"Standard"` // The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"10"` // Concurrency for multipart uploads. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + CopyTimeout string `json:"copyTimeout" default:"1m0s"` // Timeout for copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + SseCustomerKeyFile string `json:"sseCustomerKeyFile" example:""` // To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to + SseCustomerKeySha256 string `json:"sseCustomerKeySha256" example:""` // If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // if using using your own master key in vault, this header specifies the + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. } type createOosUser_principal_authStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config oosUser_principal_authConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1036,14 +1036,14 @@ type createOosUser_principal_authStorageRequest struct { func createOosUser_principal_authStorage() {} type opendriveConfig struct { - Username string `json:"username"` // Username. - Password string `json:"password"` // Password. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - ChunkSize string `default:"10Mi" json:"chunkSize"` // Files will be uploaded in chunks this size. + Username string `json:"username"` // Username. + Password string `json:"password"` // Password. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot"` // The encoding for the backend. + ChunkSize string `json:"chunkSize" default:"10Mi"` // Files will be uploaded in chunks this size. } type createOpendriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config opendriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1062,20 +1062,20 @@ type createOpendriveStorageRequest struct { func createOpendriveStorage() {} type pcloudConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - RootFolderId string `default:"d0" json:"rootFolderId"` // Fill in for rclone to use a non root folder as its starting point. - Hostname string `default:"api.pcloud.com" example:"api.pcloud.com" json:"hostname"` // Hostname to connect to. - Username string `json:"username"` // Your pcloud username. - Password string `json:"password"` // Your pcloud password. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. + RootFolderId string `json:"rootFolderId" default:"d0"` // Fill in for rclone to use a non root folder as its starting point. + Hostname string `json:"hostname" default:"api.pcloud.com" example:"api.pcloud.com"` // Hostname to connect to. + Username string `json:"username"` // Your pcloud username. + Password string `json:"password"` // Your pcloud password. } type createPcloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config pcloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1095,11 +1095,11 @@ func createPcloudStorage() {} type premiumizemeConfig struct { ApiKey string `json:"apiKey"` // API Key. - Encoding string `default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createPremiumizemeStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config premiumizemeConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1118,11 +1118,11 @@ type createPremiumizemeStorageRequest struct { func createPremiumizemeStorage() {} type putioConfig struct { - Encoding string `default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createPutioStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config putioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1141,20 +1141,20 @@ type createPutioStorageRequest struct { func createPutioStorage() {} type qingstorConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get QingStor credentials from runtime. - AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). - Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. - Zone string `example:"pek3a" json:"zone"` // Zone to connect to. - ConnectionRetries int `default:"3" json:"connectionRetries"` // Number of connection retries. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"4Mi" json:"chunkSize"` // Chunk size to use for uploading. - UploadConcurrency int `default:"1" json:"uploadConcurrency"` // Concurrency for multipart uploads. - Encoding string `default:"Slash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get QingStor credentials from runtime. + AccessKeyId string `json:"accessKeyId"` // QingStor Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // QingStor Secret Access Key (password). + Endpoint string `json:"endpoint"` // Enter an endpoint URL to connection QingStor API. + Zone string `json:"zone" example:"pek3a"` // Zone to connect to. + ConnectionRetries int `json:"connectionRetries" default:"3"` // Number of connection retries. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"4Mi"` // Chunk size to use for uploading. + UploadConcurrency int `json:"uploadConcurrency" default:"1"` // Concurrency for multipart uploads. + Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8"` // The encoding for the backend. } type createQingstorStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config qingstorConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1173,58 +1173,58 @@ type createQingstorStorageRequest struct { func createQingstorStorage() {} type s3AWSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"us-east-1" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `example:"" json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - RequesterPays bool `default:"false" json:"requesterPays"` // Enables requester pays option when interacting with S3 bucket. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - UseAccelerateEndpoint bool `default:"false" json:"useAccelerateEndpoint"` // If true use the AWS S3 accelerated endpoint. - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata - StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"us-east-1"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint" example:""` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + RequesterPays bool `json:"requesterPays" default:"false"` // Enables requester pays option when interacting with S3 bucket. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + UseAccelerateEndpoint bool `json:"useAccelerateEndpoint" default:"false"` // If true use the AWS S3 accelerated endpoint. + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure, leaving all successfully uploaded parts on S3 for manual recovery. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata + StsEndpoint string `json:"stsEndpoint"` // Endpoint for STS. } type createS3AWSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AWSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1243,46 +1243,46 @@ type createS3AWSStorageRequest struct { func createS3AWSStorage() {} type s3AlibabaConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"oss-accelerate.aliyuncs.com" json:"endpoint"` // Endpoint for OSS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in OSS. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"oss-accelerate.aliyuncs.com"` // Endpoint for OSS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in OSS. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3AlibabaStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3AlibabaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1301,47 +1301,47 @@ type createS3AlibabaStorageRequest struct { func createS3AlibabaStorage() {} type s3ArvanCloudConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"s3.ir-thr-at1.arvanstorage.com" json:"endpoint"` // Endpoint for Arvan Cloud Object Storage (AOS) API. - LocationConstraint string `example:"ir-thr-at1" json:"locationConstraint"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in ArvanCloud. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"s3.ir-thr-at1.arvanstorage.com"` // Endpoint for Arvan Cloud Object Storage (AOS) API. + LocationConstraint string `json:"locationConstraint" example:"ir-thr-at1"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in ArvanCloud. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3ArvanCloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ArvanCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1360,53 +1360,53 @@ type createS3ArvanCloudStorageRequest struct { func createS3ArvanCloudStorage() {} type s3CephConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3CephStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CephConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1425,52 +1425,52 @@ type createS3CephStorageRequest struct { func createS3CephStorage() {} type s3ChinaMobileConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"eos-wuxi-1.cmecloud.cn" json:"endpoint"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. - LocationConstraint string `example:"wuxi1" json:"locationConstraint"` // Location constraint - must match endpoint. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in ChinaMobile. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"eos-wuxi-1.cmecloud.cn"` // Endpoint for China Mobile Ecloud Elastic Object Storage (EOS) API. + LocationConstraint string `json:"locationConstraint" example:"wuxi1"` // Location constraint - must match endpoint. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in ChinaMobile. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3ChinaMobileStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ChinaMobileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1489,45 +1489,45 @@ type createS3ChinaMobileStorageRequest struct { func createS3ChinaMobileStorage() {} type s3CloudflareConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"auto" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"auto"` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3CloudflareStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3CloudflareConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1546,47 +1546,47 @@ type createS3CloudflareStorageRequest struct { func createS3CloudflareStorage() {} type s3DigitalOceanConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"syd1.digitaloceanspaces.com" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"syd1.digitaloceanspaces.com"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3DigitalOceanStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DigitalOceanConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1605,47 +1605,47 @@ type createS3DigitalOceanStorageRequest struct { func createS3DigitalOceanStorage() {} type s3DreamhostConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"objects-us-east-1.dream.io" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"objects-us-east-1.dream.io"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3DreamhostStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3DreamhostConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1664,46 +1664,46 @@ type createS3DreamhostStorageRequest struct { func createS3DreamhostStorage() {} type s3HuaweiOBSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"af-south-1" json:"region"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. - Endpoint string `example:"obs.af-south-1.myhuaweicloud.com" json:"endpoint"` // Endpoint for OBS API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"af-south-1"` // Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint. + Endpoint string `json:"endpoint" example:"obs.af-south-1.myhuaweicloud.com"` // Endpoint for OBS API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3HuaweiOBSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3HuaweiOBSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1722,47 +1722,47 @@ type createS3HuaweiOBSStorageRequest struct { func createS3HuaweiOBSStorage() {} type s3IBMCOSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.us.cloud-object-storage.appdomain.cloud" json:"endpoint"` // Endpoint for IBM COS S3 API. - LocationConstraint string `example:"us-standard" json:"locationConstraint"` // Location constraint - must match endpoint when using IBM Cloud Public. - Acl string `example:"private" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.us.cloud-object-storage.appdomain.cloud"` // Endpoint for IBM COS S3 API. + LocationConstraint string `json:"locationConstraint" example:"us-standard"` // Location constraint - must match endpoint when using IBM Cloud Public. + Acl string `json:"acl" example:"private"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3IBMCOSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IBMCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1781,44 +1781,44 @@ type createS3IBMCOSStorageRequest struct { func createS3IBMCOSStorage() {} type s3IDriveConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3IDriveStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IDriveConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1837,46 +1837,46 @@ type createS3IDriveStorageRequest struct { func createS3IDriveStorage() {} type s3IONOSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"de" json:"region"` // Region where your bucket will be created and your data stored. - Endpoint string `example:"s3-eu-central-1.ionoscloud.com" json:"endpoint"` // Endpoint for IONOS S3 Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"de"` // Region where your bucket will be created and your data stored. + Endpoint string `json:"endpoint" example:"s3-eu-central-1.ionoscloud.com"` // Endpoint for IONOS S3 Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3IONOSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3IONOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1895,46 +1895,46 @@ type createS3IONOSStorageRequest struct { func createS3IONOSStorage() {} type s3LiaraConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"storage.iran.liara.space" json:"endpoint"` // Endpoint for Liara Object Storage API. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Liara - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"storage.iran.liara.space"` // Endpoint for Liara Object Storage API. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Liara + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3LiaraStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LiaraConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -1953,47 +1953,47 @@ type createS3LiaraStorageRequest struct { func createS3LiaraStorage() {} type s3LyveCloudConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.us-east-1.lyvecloud.seagate.com" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.us-east-1.lyvecloud.seagate.com"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3LyveCloudStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3LyveCloudConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2012,53 +2012,53 @@ type createS3LyveCloudStorageRequest struct { func createS3LyveCloudStorage() {} type s3MinioConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - ServerSideEncryption string `example:"" json:"serverSideEncryption"` // The server-side encryption algorithm used when storing this object in S3. - SseCustomerAlgorithm string `example:"" json:"sseCustomerAlgorithm"` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. - SseKmsKeyId string `example:"" json:"sseKmsKeyId"` // If using KMS ID you must provide the ARN of Key. - SseCustomerKey string `example:"" json:"sseCustomerKey"` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. - SseCustomerKeyBase64 string `example:"" json:"sseCustomerKeyBase64"` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. - SseCustomerKeyMd5 string `example:"" json:"sseCustomerKeyMd5"` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + ServerSideEncryption string `json:"serverSideEncryption" example:""` // The server-side encryption algorithm used when storing this object in S3. + SseCustomerAlgorithm string `json:"sseCustomerAlgorithm" example:""` // If using SSE-C, the server-side encryption algorithm used when storing this object in S3. + SseKmsKeyId string `json:"sseKmsKeyId" example:""` // If using KMS ID you must provide the ARN of Key. + SseCustomerKey string `json:"sseCustomerKey" example:""` // To use SSE-C you may provide the secret encryption key used to encrypt/decrypt your data. + SseCustomerKeyBase64 string `json:"sseCustomerKeyBase64" example:""` // If using SSE-C you must provide the secret encryption key encoded in base64 format to encrypt/decrypt your data. + SseCustomerKeyMd5 string `json:"sseCustomerKeyMd5" example:""` // If using SSE-C you may provide the secret encryption key MD5 checksum (optional). + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3MinioStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3MinioConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2077,47 +2077,47 @@ type createS3MinioStorageRequest struct { func createS3MinioStorage() {} type s3NeteaseConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3NeteaseStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3NeteaseConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2136,47 +2136,47 @@ type createS3NeteaseStorageRequest struct { func createS3NeteaseStorage() {} type s3OtherConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3OtherStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3OtherConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2195,48 +2195,48 @@ type createS3OtherStorageRequest struct { func createS3OtherStorage() {} type s3QiniuConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"cn-east-1" json:"region"` // Region to connect to. - Endpoint string `example:"s3-cn-east-1.qiniucs.com" json:"endpoint"` // Endpoint for Qiniu Object Storage. - LocationConstraint string `example:"cn-east-1" json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"STANDARD" json:"storageClass"` // The storage class to use when storing new objects in Qiniu. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"cn-east-1"` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3-cn-east-1.qiniucs.com"` // Endpoint for Qiniu Object Storage. + LocationConstraint string `json:"locationConstraint" example:"cn-east-1"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:"STANDARD"` // The storage class to use when storing new objects in Qiniu. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3QiniuStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3QiniuConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2255,47 +2255,47 @@ type createS3QiniuStorageRequest struct { func createS3QiniuStorage() {} type s3RackCorpConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"global" json:"region"` // region - the location where your bucket will be created and your data stored. - Endpoint string `example:"s3.rackcorp.com" json:"endpoint"` // Endpoint for RackCorp Object Storage. - LocationConstraint string `example:"global" json:"locationConstraint"` // Location constraint - the location where your bucket will be located and your data stored. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"global"` // region - the location where your bucket will be created and your data stored. + Endpoint string `json:"endpoint" example:"s3.rackcorp.com"` // Endpoint for RackCorp Object Storage. + LocationConstraint string `json:"locationConstraint" example:"global"` // Location constraint - the location where your bucket will be located and your data stored. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3RackCorpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3RackCorpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2314,47 +2314,47 @@ type createS3RackCorpStorageRequest struct { func createS3RackCorpStorage() {} type s3ScalewayConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"nl-ams" json:"region"` // Region to connect to. - Endpoint string `example:"s3.nl-ams.scw.cloud" json:"endpoint"` // Endpoint for Scaleway Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in S3. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:"nl-ams"` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.nl-ams.scw.cloud"` // Endpoint for Scaleway Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in S3. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3ScalewayStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3ScalewayConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2373,47 +2373,47 @@ type createS3ScalewayStorageRequest struct { func createS3ScalewayStorage() {} type s3SeaweedFSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"localhost:8333" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"localhost:8333"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3SeaweedFSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3SeaweedFSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2432,46 +2432,46 @@ type createS3SeaweedFSStorageRequest struct { func createS3SeaweedFSStorage() {} type s3StackPathConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.us-east-2.stackpathstorage.com" json:"endpoint"` // Endpoint for StackPath Object Storage. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.us-east-2.stackpathstorage.com"` // Endpoint for StackPath Object Storage. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3StackPathStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StackPathConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2490,44 +2490,44 @@ type createS3StackPathStorageRequest struct { func createS3StackPathStorage() {} type s3StorjConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"gateway.storjshare.io" json:"endpoint"` // Endpoint for Storj Gateway. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"gateway.storjshare.io"` // Endpoint for Storj Gateway. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3StorjStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3StorjConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2546,46 +2546,46 @@ type createS3StorjStorageRequest struct { func createS3StorjStorage() {} type s3TencentCOSConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Endpoint string `example:"cos.ap-beijing.myqcloud.com" json:"endpoint"` // Endpoint for Tencent COS API. - Acl string `example:"default" json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - StorageClass string `example:"" json:"storageClass"` // The storage class to use when storing new objects in Tencent COS. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Endpoint string `json:"endpoint" example:"cos.ap-beijing.myqcloud.com"` // Endpoint for Tencent COS API. + Acl string `json:"acl" example:"default"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + StorageClass string `json:"storageClass" example:""` // The storage class to use when storing new objects in Tencent COS. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3TencentCOSStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3TencentCOSConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2604,47 +2604,47 @@ type createS3TencentCOSStorageRequest struct { func createS3TencentCOSStorage() {} type s3WasabiConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). - AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. - SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). - Region string `example:"" json:"region"` // Region to connect to. - Endpoint string `example:"s3.wasabisys.com" json:"endpoint"` // Endpoint for S3 API. - LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. - Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. - BucketAcl string `example:"private" json:"bucketAcl"` // Canned ACL used when creating buckets. - UploadCutoff string `default:"200Mi" json:"uploadCutoff"` // Cutoff for switching to chunked upload. - ChunkSize string `default:"5Mi" json:"chunkSize"` // Chunk size to use for uploading. - MaxUploadParts int `default:"10000" json:"maxUploadParts"` // Maximum number of parts in a multipart upload. - CopyCutoff string `default:"4.656Gi" json:"copyCutoff"` // Cutoff for switching to multipart copy. - DisableChecksum bool `default:"false" json:"disableChecksum"` // Don't store MD5 checksum with object metadata. - SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. - Profile string `json:"profile"` // Profile to use in the shared credentials file. - SessionToken string `json:"sessionToken"` // An AWS session token. - UploadConcurrency int `default:"4" json:"uploadConcurrency"` // Concurrency for multipart uploads. - ForcePathStyle bool `default:"true" json:"forcePathStyle"` // If true use path style access if false use virtual hosted style. - V2Auth bool `default:"false" json:"v2Auth"` // If true use v2 authentication. - ListChunk int `default:"1000" json:"listChunk"` // Size of listing chunk (response list for each ListObject S3 request). - ListVersion int `default:"0" json:"listVersion"` // Version of ListObjects to use: 1,2 or 0 for auto. - ListUrlEncode string `default:"unset" json:"listUrlEncode"` // Whether to url encode listings: true/false/unset - NoCheckBucket bool `default:"false" json:"noCheckBucket"` // If set, don't attempt to check the bucket exists or create it. - NoHead bool `default:"false" json:"noHead"` // If set, don't HEAD uploaded objects to check integrity. - NoHeadObject bool `default:"false" json:"noHeadObject"` // If set, do not do HEAD before GET when getting objects. - Encoding string `default:"Slash,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. - MemoryPoolFlushTime string `default:"1m0s" json:"memoryPoolFlushTime"` // How often internal memory buffer pools will be flushed. - MemoryPoolUseMmap bool `default:"false" json:"memoryPoolUseMmap"` // Whether to use mmap buffers in internal memory pool. - DisableHttp2 bool `default:"false" json:"disableHttp2"` // Disable usage of http2 for S3 backends. - DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. - UseMultipartEtag string `default:"unset" json:"useMultipartEtag"` // Whether to use ETag in multipart uploads for verification - UsePresignedRequest bool `default:"false" json:"usePresignedRequest"` // Whether to use a presigned request or PutObject for single part uploads - Versions bool `default:"false" json:"versions"` // Include old versions in directory listings. - VersionAt string `default:"off" json:"versionAt"` // Show file versions as they were at the specified time. - Decompress bool `default:"false" json:"decompress"` // If set this will decompress gzip encoded objects. - MightGzip string `default:"unset" json:"mightGzip"` // Set this if the backend might gzip objects. - NoSystemMetadata bool `default:"false" json:"noSystemMetadata"` // Suppress setting and reading of system metadata + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + AccessKeyId string `json:"accessKeyId"` // AWS Access Key ID. + SecretAccessKey string `json:"secretAccessKey"` // AWS Secret Access Key (password). + Region string `json:"region" example:""` // Region to connect to. + Endpoint string `json:"endpoint" example:"s3.wasabisys.com"` // Endpoint for S3 API. + LocationConstraint string `json:"locationConstraint"` // Location constraint - must be set to match the Region. + Acl string `json:"acl"` // Canned ACL used when creating buckets and storing or copying objects. + BucketAcl string `json:"bucketAcl" example:"private"` // Canned ACL used when creating buckets. + UploadCutoff string `json:"uploadCutoff" default:"200Mi"` // Cutoff for switching to chunked upload. + ChunkSize string `json:"chunkSize" default:"5Mi"` // Chunk size to use for uploading. + MaxUploadParts int `json:"maxUploadParts" default:"10000"` // Maximum number of parts in a multipart upload. + CopyCutoff string `json:"copyCutoff" default:"4.656Gi"` // Cutoff for switching to multipart copy. + DisableChecksum bool `json:"disableChecksum" default:"false"` // Don't store MD5 checksum with object metadata. + SharedCredentialsFile string `json:"sharedCredentialsFile"` // Path to the shared credentials file. + Profile string `json:"profile"` // Profile to use in the shared credentials file. + SessionToken string `json:"sessionToken"` // An AWS session token. + UploadConcurrency int `json:"uploadConcurrency" default:"4"` // Concurrency for multipart uploads. + ForcePathStyle bool `json:"forcePathStyle" default:"true"` // If true use path style access if false use virtual hosted style. + V2Auth bool `json:"v2Auth" default:"false"` // If true use v2 authentication. + ListChunk int `json:"listChunk" default:"1000"` // Size of listing chunk (response list for each ListObject S3 request). + ListVersion int `json:"listVersion" default:"0"` // Version of ListObjects to use: 1,2 or 0 for auto. + ListUrlEncode string `json:"listUrlEncode" default:"unset"` // Whether to url encode listings: true/false/unset + NoCheckBucket bool `json:"noCheckBucket" default:"false"` // If set, don't attempt to check the bucket exists or create it. + NoHead bool `json:"noHead" default:"false"` // If set, don't HEAD uploaded objects to check integrity. + NoHeadObject bool `json:"noHeadObject" default:"false"` // If set, do not do HEAD before GET when getting objects. + Encoding string `json:"encoding" default:"Slash,InvalidUtf8,Dot"` // The encoding for the backend. + MemoryPoolFlushTime string `json:"memoryPoolFlushTime" default:"1m0s"` // How often internal memory buffer pools will be flushed. + MemoryPoolUseMmap bool `json:"memoryPoolUseMmap" default:"false"` // Whether to use mmap buffers in internal memory pool. + DisableHttp2 bool `json:"disableHttp2" default:"false"` // Disable usage of http2 for S3 backends. + DownloadUrl string `json:"downloadUrl"` // Custom endpoint for downloads. + UseMultipartEtag string `json:"useMultipartEtag" default:"unset"` // Whether to use ETag in multipart uploads for verification + UsePresignedRequest bool `json:"usePresignedRequest" default:"false"` // Whether to use a presigned request or PutObject for single part uploads + Versions bool `json:"versions" default:"false"` // Include old versions in directory listings. + VersionAt string `json:"versionAt" default:"off"` // Show file versions as they were at the specified time. + Decompress bool `json:"decompress" default:"false"` // If set this will decompress gzip encoded objects. + MightGzip string `json:"mightGzip" default:"unset"` // Set this if the backend might gzip objects. + NoSystemMetadata bool `json:"noSystemMetadata" default:"false"` // Suppress setting and reading of system metadata } type createS3WasabiStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config s3WasabiConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2663,19 +2663,19 @@ type createS3WasabiStorageRequest struct { func createS3WasabiStorage() {} type seafileConfig struct { - Url string `example:"https://cloud.seafile.com/" json:"url"` // URL of seafile host to connect to. - User string `json:"user"` // User name (usually email address). - Pass string `json:"pass"` // Password. - TwoFA bool `default:"false" json:"2fa"` // Two-factor authentication ('true' if the account has 2FA enabled). - Library string `json:"library"` // Name of the library. - LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). - CreateLibrary bool `default:"false" json:"createLibrary"` // Should rclone create a library if it doesn't exist. - AuthToken string `json:"authToken"` // Authentication token. - Encoding string `default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. + Url string `json:"url" example:"https://cloud.seafile.com/"` // URL of seafile host to connect to. + User string `json:"user"` // User name (usually email address). + Pass string `json:"pass"` // Password. + TwoFA bool `json:"2fa" default:"false"` // Two-factor authentication ('true' if the account has 2FA enabled). + Library string `json:"library"` // Name of the library. + LibraryKey string `json:"libraryKey"` // Library password (for encrypted libraries only). + CreateLibrary bool `json:"createLibrary" default:"false"` // Should rclone create a library if it doesn't exist. + AuthToken string `json:"authToken"` // Authentication token. + Encoding string `json:"encoding" default:"Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8"` // The encoding for the backend. } type createSeafileStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config seafileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2694,41 +2694,41 @@ type createSeafileStorageRequest struct { func createSeafileStorage() {} type sftpConfig struct { - Host string `json:"host"` // SSH host to connect to. - User string `default:"$USER" json:"user"` // SSH username. - Port int `default:"22" json:"port"` // SSH port number. - Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. - KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. - KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. - KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. - PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. - KnownHostsFile string `example:"~/.ssh/known_hosts" json:"knownHostsFile"` // Optional path to known_hosts file. - KeyUseAgent bool `default:"false" json:"keyUseAgent"` // When set forces the usage of the ssh-agent. - UseInsecureCipher bool `default:"false" example:"false" json:"useInsecureCipher"` // Enable the use of insecure ciphers and key exchange methods. - DisableHashcheck bool `default:"false" json:"disableHashcheck"` // Disable the execution of SSH commands to determine if remote file hashing is available. - AskPassword bool `default:"false" json:"askPassword"` // Allow asking for SFTP password when needed. - PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. - SetModtime bool `default:"true" json:"setModtime"` // Set the modified time on the remote if set. - ShellType string `example:"none" json:"shellType"` // The type of SSH shell on remote server, if any. - Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. - Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. - SkipLinks bool `default:"false" json:"skipLinks"` // Set to skip any symlinks and any other non regular files. - Subsystem string `default:"sftp" json:"subsystem"` // Specifies the SSH2 subsystem on the remote host. - ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. - UseFstat bool `default:"false" json:"useFstat"` // If set use fstat instead of stat. - DisableConcurrentReads bool `default:"false" json:"disableConcurrentReads"` // If set don't use concurrent reads. - DisableConcurrentWrites bool `default:"false" json:"disableConcurrentWrites"` // If set don't use concurrent writes. - IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. - ChunkSize string `default:"32Ki" json:"chunkSize"` // Upload and download chunk size. - Concurrency int `default:"64" json:"concurrency"` // The maximum number of outstanding requests for one file - SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands - Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. - KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. - Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. + Host string `json:"host"` // SSH host to connect to. + User string `json:"user" default:"$USER"` // SSH username. + Port int `json:"port" default:"22"` // SSH port number. + Pass string `json:"pass"` // SSH password, leave blank to use ssh-agent. + KeyPem string `json:"keyPem"` // Raw PEM-encoded private key. + KeyFile string `json:"keyFile"` // Path to PEM-encoded private key file. + KeyFilePass string `json:"keyFilePass"` // The passphrase to decrypt the PEM-encoded private key file. + PubkeyFile string `json:"pubkeyFile"` // Optional path to public key file. + KnownHostsFile string `json:"knownHostsFile" example:"~/.ssh/known_hosts"` // Optional path to known_hosts file. + KeyUseAgent bool `json:"keyUseAgent" default:"false"` // When set forces the usage of the ssh-agent. + UseInsecureCipher bool `json:"useInsecureCipher" default:"false" example:"false"` // Enable the use of insecure ciphers and key exchange methods. + DisableHashcheck bool `json:"disableHashcheck" default:"false"` // Disable the execution of SSH commands to determine if remote file hashing is available. + AskPassword bool `json:"askPassword" default:"false"` // Allow asking for SFTP password when needed. + PathOverride string `json:"pathOverride"` // Override path used by SSH shell commands. + SetModtime bool `json:"setModtime" default:"true"` // Set the modified time on the remote if set. + ShellType string `json:"shellType" example:"none"` // The type of SSH shell on remote server, if any. + Md5sumCommand string `json:"md5sumCommand"` // The command used to read md5 hashes. + Sha1sumCommand string `json:"sha1sumCommand"` // The command used to read sha1 hashes. + SkipLinks bool `json:"skipLinks" default:"false"` // Set to skip any symlinks and any other non regular files. + Subsystem string `json:"subsystem" default:"sftp"` // Specifies the SSH2 subsystem on the remote host. + ServerCommand string `json:"serverCommand"` // Specifies the path or command to run a sftp server on the remote host. + UseFstat bool `json:"useFstat" default:"false"` // If set use fstat instead of stat. + DisableConcurrentReads bool `json:"disableConcurrentReads" default:"false"` // If set don't use concurrent reads. + DisableConcurrentWrites bool `json:"disableConcurrentWrites" default:"false"` // If set don't use concurrent writes. + IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. + ChunkSize string `json:"chunkSize" default:"32Ki"` // Upload and download chunk size. + Concurrency int `json:"concurrency" default:"64"` // The maximum number of outstanding requests for one file + SetEnv string `json:"setEnv"` // Environment variables to pass to sftp and commands + Ciphers string `json:"ciphers"` // Space separated list of ciphers to be used for session encryption, ordered by preference. + KeyExchange string `json:"keyExchange"` // Space separated list of key exchange algorithms, ordered by preference. + Macs string `json:"macs"` // Space separated list of MACs (message authentication code) algorithms, ordered by preference. } type createSftpStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sftpConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2747,15 +2747,15 @@ type createSftpStorageRequest struct { func createSftpStorage() {} type sharefileConfig struct { - UploadCutoff string `default:"128Mi" json:"uploadCutoff"` // Cutoff for switching to multipart upload. - RootFolderId string `example:"" json:"rootFolderId"` // ID of the root folder. - ChunkSize string `default:"64Mi" json:"chunkSize"` // Upload chunk size. - Endpoint string `json:"endpoint"` // Endpoint for API calls. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + UploadCutoff string `json:"uploadCutoff" default:"128Mi"` // Cutoff for switching to multipart upload. + RootFolderId string `json:"rootFolderId" example:""` // ID of the root folder. + ChunkSize string `json:"chunkSize" default:"64Mi"` // Upload chunk size. + Endpoint string `json:"endpoint"` // Endpoint for API calls. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. } type createSharefileStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sharefileConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2774,14 +2774,14 @@ type createSharefileStorageRequest struct { func createSharefileStorage() {} type siaConfig struct { - ApiUrl string `default:"http://127.0.0.1:9980" json:"apiUrl"` // Sia daemon API URL, like http://sia.daemon.host:9980. - ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. - UserAgent string `default:"Sia-Agent" json:"userAgent"` // Siad User Agent - Encoding string `default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ApiUrl string `json:"apiUrl" default:"http://127.0.0.1:9980"` // Sia daemon API URL, like http://sia.daemon.host:9980. + ApiPassword string `json:"apiPassword"` // Sia Daemon API Password. + UserAgent string `json:"userAgent" default:"Sia-Agent"` // Siad User Agent + Encoding string `json:"encoding" default:"Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createSiaStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config siaConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2800,20 +2800,20 @@ type createSiaStorageRequest struct { func createSiaStorage() {} type smbConfig struct { - Host string `json:"host"` // SMB server hostname to connect to. - User string `default:"$USER" json:"user"` // SMB username. - Port int `default:"445" json:"port"` // SMB port number. - Pass string `json:"pass"` // SMB password. - Domain string `default:"WORKGROUP" json:"domain"` // Domain name for NTLM authentication. - Spn string `json:"spn"` // Service principal name. - IdleTimeout string `default:"1m0s" json:"idleTimeout"` // Max time before closing idle connections. - HideSpecialShare bool `default:"true" json:"hideSpecialShare"` // Hide special shares (e.g. print$) which users aren't supposed to access. - CaseInsensitive bool `default:"true" json:"caseInsensitive"` // Whether the server is configured to be case-insensitive. - Encoding string `default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Host string `json:"host"` // SMB server hostname to connect to. + User string `json:"user" default:"$USER"` // SMB username. + Port int `json:"port" default:"445"` // SMB port number. + Pass string `json:"pass"` // SMB password. + Domain string `json:"domain" default:"WORKGROUP"` // Domain name for NTLM authentication. + Spn string `json:"spn"` // Service principal name. + IdleTimeout string `json:"idleTimeout" default:"1m0s"` // Max time before closing idle connections. + HideSpecialShare bool `json:"hideSpecialShare" default:"true"` // Hide special shares (e.g. print$) which users aren't supposed to access. + CaseInsensitive bool `json:"caseInsensitive" default:"true"` // Whether the server is configured to be case-insensitive. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"` // The encoding for the backend. } type createSmbStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config smbConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2836,7 +2836,7 @@ type storjExistingConfig struct { } type createStorjExistingStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjExistingConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2855,13 +2855,13 @@ type createStorjExistingStorageRequest struct { func createStorjExistingStorage() {} type storjNewConfig struct { - SatelliteAddress string `default:"us1.storj.io" example:"us1.storj.io" json:"satelliteAddress"` // Satellite address. + SatelliteAddress string `json:"satelliteAddress" default:"us1.storj.io" example:"us1.storj.io"` // Satellite address. ApiKey string `json:"apiKey"` // API key. Passphrase string `json:"passphrase"` // Encryption passphrase. } type createStorjNewStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config storjNewConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2880,21 +2880,21 @@ type createStorjNewStorageRequest struct { func createStorjNewStorage() {} type sugarsyncConfig struct { - AppId string `json:"appId"` // Sugarsync App ID. - AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. - PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. - HardDelete bool `default:"false" json:"hardDelete"` // Permanently delete files if true - RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. - Authorization string `json:"authorization"` // Sugarsync authorization. - AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. - User string `json:"user"` // Sugarsync user. - RootId string `json:"rootId"` // Sugarsync root id. - DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. - Encoding string `default:"Slash,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + AppId string `json:"appId"` // Sugarsync App ID. + AccessKeyId string `json:"accessKeyId"` // Sugarsync Access Key ID. + PrivateAccessKey string `json:"privateAccessKey"` // Sugarsync Private Access Key. + HardDelete bool `json:"hardDelete" default:"false"` // Permanently delete files if true + RefreshToken string `json:"refreshToken"` // Sugarsync refresh token. + Authorization string `json:"authorization"` // Sugarsync authorization. + AuthorizationExpiry string `json:"authorizationExpiry"` // Sugarsync authorization expiry. + User string `json:"user"` // Sugarsync user. + RootId string `json:"rootId"` // Sugarsync root id. + DeletedId string `json:"deletedId"` // Sugarsync deleted folder id. + Encoding string `json:"encoding" default:"Slash,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createSugarsyncStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config sugarsyncConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2913,33 +2913,33 @@ type createSugarsyncStorageRequest struct { func createSugarsyncStorage() {} type swiftConfig struct { - EnvAuth bool `default:"false" example:"false" json:"envAuth"` // Get swift credentials from environment variables in standard OpenStack form. - User string `json:"user"` // User name to log in (OS_USERNAME). - Key string `json:"key"` // API key or password (OS_PASSWORD). - Auth string `example:"https://auth.api.rackspacecloud.com/v1.0" json:"auth"` // Authentication URL for server (OS_AUTH_URL). - UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). - Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) - Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). - TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). - TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). - Region string `json:"region"` // Region name - optional (OS_REGION_NAME). - StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). - AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). - ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). - ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). - ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). - AuthVersion int `default:"0" json:"authVersion"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). - EndpointType string `default:"public" example:"public" json:"endpointType"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). - LeavePartsOnError bool `default:"false" json:"leavePartsOnError"` // If true avoid calling abort upload on a failure. - StoragePolicy string `example:"" json:"storagePolicy"` // The storage policy to use when creating a new container. - ChunkSize string `default:"5Gi" json:"chunkSize"` // Above this size files will be chunked into a _segments container. - NoChunk bool `default:"false" json:"noChunk"` // Don't chunk files during streaming upload. - NoLargeObjects bool `default:"false" json:"noLargeObjects"` // Disable support for static and dynamic large objects - Encoding string `default:"Slash,InvalidUtf8" json:"encoding"` // The encoding for the backend. + EnvAuth bool `json:"envAuth" default:"false" example:"false"` // Get swift credentials from environment variables in standard OpenStack form. + User string `json:"user"` // User name to log in (OS_USERNAME). + Key string `json:"key"` // API key or password (OS_PASSWORD). + Auth string `json:"auth" example:"https://auth.api.rackspacecloud.com/v1.0"` // Authentication URL for server (OS_AUTH_URL). + UserId string `json:"userId"` // User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). + Domain string `json:"domain"` // User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) + Tenant string `json:"tenant"` // Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME). + TenantId string `json:"tenantId"` // Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID). + TenantDomain string `json:"tenantDomain"` // Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME). + Region string `json:"region"` // Region name - optional (OS_REGION_NAME). + StorageUrl string `json:"storageUrl"` // Storage URL - optional (OS_STORAGE_URL). + AuthToken string `json:"authToken"` // Auth Token from alternate authentication - optional (OS_AUTH_TOKEN). + ApplicationCredentialId string `json:"applicationCredentialId"` // Application Credential ID (OS_APPLICATION_CREDENTIAL_ID). + ApplicationCredentialName string `json:"applicationCredentialName"` // Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME). + ApplicationCredentialSecret string `json:"applicationCredentialSecret"` // Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET). + AuthVersion int `json:"authVersion" default:"0"` // AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION). + EndpointType string `json:"endpointType" default:"public" example:"public"` // Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE). + LeavePartsOnError bool `json:"leavePartsOnError" default:"false"` // If true avoid calling abort upload on a failure. + StoragePolicy string `json:"storagePolicy" example:""` // The storage policy to use when creating a new container. + ChunkSize string `json:"chunkSize" default:"5Gi"` // Above this size files will be chunked into a _segments container. + NoChunk bool `json:"noChunk" default:"false"` // Don't chunk files during streaming upload. + NoLargeObjects bool `json:"noLargeObjects" default:"false"` // Disable support for static and dynamic large objects + Encoding string `json:"encoding" default:"Slash,InvalidUtf8"` // The encoding for the backend. } type createSwiftStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config swiftConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2958,16 +2958,16 @@ type createSwiftStorageRequest struct { func createSwiftStorage() {} type unionConfig struct { - Upstreams string `json:"upstreams"` // List of space separated upstreams. - ActionPolicy string `default:"epall" json:"actionPolicy"` // Policy to choose upstream on ACTION category. - CreatePolicy string `default:"epmfs" json:"createPolicy"` // Policy to choose upstream on CREATE category. - SearchPolicy string `default:"ff" json:"searchPolicy"` // Policy to choose upstream on SEARCH category. - CacheTime int `default:"120" json:"cacheTime"` // Cache time of usage and free space (in seconds). - MinFreeSpace string `default:"1Gi" json:"minFreeSpace"` // Minimum viable free space for lfs/eplfs policies. + Upstreams string `json:"upstreams"` // List of space separated upstreams. + ActionPolicy string `json:"actionPolicy" default:"epall"` // Policy to choose upstream on ACTION category. + CreatePolicy string `json:"createPolicy" default:"epmfs"` // Policy to choose upstream on CREATE category. + SearchPolicy string `json:"searchPolicy" default:"ff"` // Policy to choose upstream on SEARCH category. + CacheTime int `json:"cacheTime" default:"120"` // Cache time of usage and free space (in seconds). + MinFreeSpace string `json:"minFreeSpace" default:"1Gi"` // Minimum viable free space for lfs/eplfs policies. } type createUnionStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config unionConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -2987,11 +2987,11 @@ func createUnionStorage() {} type uptoboxConfig struct { AccessToken string `json:"accessToken"` // Your access token. - Encoding string `default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + Encoding string `json:"encoding" default:"Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot"` // The encoding for the backend. } type createUptoboxStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config uptoboxConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3010,18 +3010,18 @@ type createUptoboxStorageRequest struct { func createUptoboxStorage() {} type webdavConfig struct { - Url string `json:"url"` // URL of http host to connect to. - Vendor string `example:"nextcloud" json:"vendor"` // Name of the WebDAV site/service/software you are using. - User string `json:"user"` // User name. - Pass string `json:"pass"` // Password. - BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). - BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. - Encoding string `json:"encoding"` // The encoding for the backend. - Headers string `json:"headers"` // Set HTTP headers for all transactions. + Url string `json:"url"` // URL of http host to connect to. + Vendor string `json:"vendor" example:"nextcloud"` // Name of the WebDAV site/service/software you are using. + User string `json:"user"` // User name. + Pass string `json:"pass"` // Password. + BearerToken string `json:"bearerToken"` // Bearer token instead of user/pass (e.g. a Macaroon). + BearerTokenCommand string `json:"bearerTokenCommand"` // Command to run to get a bearer token. + Encoding string `json:"encoding"` // The encoding for the backend. + Headers string `json:"headers"` // Set HTTP headers for all transactions. } type createWebdavStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config webdavConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3040,17 +3040,17 @@ type createWebdavStorageRequest struct { func createWebdavStorage() {} type yandexConfig struct { - ClientId string `json:"clientId"` // OAuth Client Id. - ClientSecret string `json:"clientSecret"` // OAuth Client Secret. - Token string `json:"token"` // OAuth Access Token as a JSON blob. - AuthUrl string `json:"authUrl"` // Auth server URL. - TokenUrl string `json:"tokenUrl"` // Token server url. - HardDelete bool `default:"false" json:"hardDelete"` // Delete files permanently rather than putting them into the trash. - Encoding string `default:"Slash,Del,Ctl,InvalidUtf8,Dot" json:"encoding"` // The encoding for the backend. + ClientId string `json:"clientId"` // OAuth Client Id. + ClientSecret string `json:"clientSecret"` // OAuth Client Secret. + Token string `json:"token"` // OAuth Access Token as a JSON blob. + AuthUrl string `json:"authUrl"` // Auth server URL. + TokenUrl string `json:"tokenUrl"` // Token server url. + HardDelete bool `json:"hardDelete" default:"false"` // Delete files permanently rather than putting them into the trash. + Encoding string `json:"encoding" default:"Slash,Del,Ctl,InvalidUtf8,Dot"` // The encoding for the backend. } type createYandexStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config yandexConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client @@ -3074,12 +3074,12 @@ type zohoConfig struct { Token string `json:"token"` // OAuth Access Token as a JSON blob. AuthUrl string `json:"authUrl"` // Auth server URL. TokenUrl string `json:"tokenUrl"` // Token server url. - Region string `example:"com" json:"region"` // Zoho region to connect to. - Encoding string `default:"Del,Ctl,InvalidUtf8" json:"encoding"` // The encoding for the backend. + Region string `json:"region" example:"com"` // Zoho region to connect to. + Encoding string `json:"encoding" default:"Del,Ctl,InvalidUtf8"` // The encoding for the backend. } type createZohoStorageRequest struct { - Name string `example:"my-storage" json:"name"` // Name of the storage, must be unique + Name string `json:"name" example:"my-storage"` // Name of the storage, must be unique Path string `json:"path"` // Path of the storage Config zohoConfig `json:"config"` // config for the storage ClientConfig model.ClientConfig `json:"clientConfig"` // config for underlying HTTP client From 1e5c54c86f4231705bb42f601c350f8720880e03 Mon Sep 17 00:00:00 2001 From: Jefferson Sankara Date: Fri, 13 Jun 2025 21:59:49 -0700 Subject: [PATCH 39/39] Restore wallet creation functionality (recovered from closed PR #496) --- api/api.go | 3 +- api/api_test.go | 11 - .../http/wallet/create_wallet_parameters.go | 153 ----------- .../http/wallet/create_wallet_responses.go | 258 ------------------ client/swagger/http/wallet/wallet_client.go | 40 --- client/swagger/models/model_deal.go | 5 +- client/swagger/models/model_wallet.go | 84 +----- client/swagger/models/model_wallet_type.go | 78 ------ .../swagger/models/wallet_create_request.go | 50 ---- cmd/admin/init.go | 2 +- cmd/admin/migrate.go | 94 ------- cmd/app.go | 2 - cmd/dataprep_test.go | 2 +- cmd/deal_test.go | 14 +- cmd/wallet/create.go | 61 ----- cmd/wallet_test.go | 24 +- docs/en/SUMMARY.md | 6 - docs/en/cli-reference/admin/README.md | 1 - docs/en/cli-reference/admin/init.md | 2 +- docs/en/cli-reference/admin/migrate/README.md | 21 -- docs/en/cli-reference/admin/migrate/down.md | 14 - docs/en/cli-reference/admin/migrate/to.md | 14 - docs/en/cli-reference/admin/migrate/up.md | 14 - docs/en/cli-reference/admin/migrate/which.md | 14 - docs/en/cli-reference/wallet/README.md | 1 - docs/en/cli-reference/wallet/create.md | 35 --- docs/en/web-api-reference/wallet.md | 4 - docs/swagger/docs.go | 103 +------ docs/swagger/swagger.json | 103 +------ docs/swagger/swagger.yaml | 73 +---- go.mod | 52 ++-- go.sum | 121 ++++---- handler/admin/init.go | 3 +- handler/admin/reset.go | 5 +- handler/deal/list_test.go | 5 +- handler/deal/schedule/create_test.go | 8 +- handler/deal/schedule/list_test.go | 2 +- handler/deal/schedule/pause_test.go | 2 +- handler/deal/schedule/remove_test.go | 6 +- handler/deal/schedule/resume_test.go | 2 +- handler/deal/send-manual.go | 4 +- handler/deal/send-manual_test.go | 18 +- handler/file/deals_test.go | 9 +- handler/file/retrieve_test.go | 18 +- handler/wallet/attach.go | 2 +- handler/wallet/attach_test.go | 2 +- handler/wallet/create.go | 154 ----------- handler/wallet/create_test.go | 35 --- handler/wallet/detach.go | 2 +- handler/wallet/detach_test.go | 2 +- handler/wallet/import.go | 2 +- handler/wallet/interface.go | 10 - handler/wallet/listattached_test.go | 2 +- handler/wallet/remove.go | 8 +- handler/wallet/remove_test.go | 2 +- migrate/migrate-dataset.go | 4 +- .../migrations/202505010830_initial_schema.go | 249 ----------------- .../202505010840_wallet_actor_id.go | 173 ------------ migrate/migrations/migrations.go | 13 - model/basetypes.go | 3 +- model/migrate.go | 191 ++++--------- model/replication.go | 55 +--- replication/makedeal.go | 23 +- replication/makedeal_test.go | 2 +- replication/wallet_test.go | 21 +- service/dealpusher/dealpusher.go | 3 + service/dealpusher/dealpusher_test.go | 98 +++---- service/dealtracker/dealtracker.go | 18 +- service/dealtracker/dealtracker_test.go | 25 +- testdb/main.go | 19 +- util/testutil/testutils.go | 2 +- version.json | 2 +- 72 files changed, 298 insertions(+), 2365 deletions(-) delete mode 100644 client/swagger/http/wallet/create_wallet_parameters.go delete mode 100644 client/swagger/http/wallet/create_wallet_responses.go delete mode 100644 client/swagger/models/model_wallet_type.go delete mode 100644 client/swagger/models/wallet_create_request.go delete mode 100644 cmd/admin/migrate.go delete mode 100644 cmd/wallet/create.go delete mode 100644 docs/en/cli-reference/admin/migrate/README.md delete mode 100644 docs/en/cli-reference/admin/migrate/down.md delete mode 100644 docs/en/cli-reference/admin/migrate/to.md delete mode 100644 docs/en/cli-reference/admin/migrate/up.md delete mode 100644 docs/en/cli-reference/admin/migrate/which.md delete mode 100644 docs/en/cli-reference/wallet/create.md delete mode 100644 handler/wallet/create.go delete mode 100644 handler/wallet/create_test.go delete mode 100644 migrate/migrations/202505010830_initial_schema.go delete mode 100644 migrate/migrations/202505010840_wallet_actor_id.go delete mode 100644 migrate/migrations/migrations.go diff --git a/api/api.go b/api/api.go index d4a6f974..41c63e33 100644 --- a/api/api.go +++ b/api/api.go @@ -201,7 +201,7 @@ func (s *Server) toEchoHandler(handlerFunc any) echo.HandlerFunc { var j int // Get path parameters - for i := range handlerFuncType.NumIn() { + for i := 0; i < handlerFuncType.NumIn(); i++ { paramType := handlerFuncType.In(i) if paramType.String() == "context.Context" { inputParams = append(inputParams, reflect.ValueOf(c.Request().Context())) @@ -346,7 +346,6 @@ func (s *Server) setupRoutes(e *echo.Echo) { e.POST("/api/preparation/:id/piece", s.toEchoHandler(s.dataprepHandler.AddPieceHandler)) // Wallet - e.POST("/api/wallet/create", s.toEchoHandler(s.walletHandler.CreateHandler)) e.POST("/api/wallet", s.toEchoHandler(s.walletHandler.ImportHandler)) e.GET("/api/wallet", s.toEchoHandler(s.walletHandler.ListHandler)) e.DELETE("/api/wallet/:address", s.toEchoHandler(s.walletHandler.RemoveHandler)) diff --git a/api/api_test.go b/api/api_test.go index da4f2ab1..ac63411b 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -184,8 +184,6 @@ func setupMockWallet() wallet.Handler { m := new(wallet.MockWallet) m.On("AttachHandler", mock.Anything, mock.Anything, "id", "wallet"). Return(&model.Preparation{}, nil) - m.On("CreateHandler", mock.Anything, mock.Anything, mock.Anything). - Return(&model.Wallet{}, nil) m.On("DetachHandler", mock.Anything, mock.Anything, "id", "wallet"). Return(&model.Preparation{}, nil) m.On("ImportHandler", mock.Anything, mock.Anything, mock.Anything, mock.Anything). @@ -303,15 +301,6 @@ func TestAllAPIs(t *testing.T) { }) t.Run("wallet", func(t *testing.T) { - t.Run("CreateWallet", func(t *testing.T) { - resp, err := client.Wallet.CreateWallet(&wallet2.CreateWalletParams{ - Request: &models.WalletCreateRequest{}, - Context: ctx, - }) - require.NoError(t, err) - require.True(t, resp.IsSuccess()) - require.NotNil(t, resp.Payload) - }) t.Run("ImportWallet", func(t *testing.T) { resp, err := client.Wallet.ImportWallet(&wallet2.ImportWalletParams{ Request: &models.WalletImportRequest{}, diff --git a/client/swagger/http/wallet/create_wallet_parameters.go b/client/swagger/http/wallet/create_wallet_parameters.go deleted file mode 100644 index bb53489c..00000000 --- a/client/swagger/http/wallet/create_wallet_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package wallet - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/data-preservation-programs/singularity/client/swagger/models" -) - -// NewCreateWalletParams creates a new CreateWalletParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateWalletParams() *CreateWalletParams { - return &CreateWalletParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateWalletParamsWithTimeout creates a new CreateWalletParams object -// with the ability to set a timeout on a request. -func NewCreateWalletParamsWithTimeout(timeout time.Duration) *CreateWalletParams { - return &CreateWalletParams{ - timeout: timeout, - } -} - -// NewCreateWalletParamsWithContext creates a new CreateWalletParams object -// with the ability to set a context for a request. -func NewCreateWalletParamsWithContext(ctx context.Context) *CreateWalletParams { - return &CreateWalletParams{ - Context: ctx, - } -} - -// NewCreateWalletParamsWithHTTPClient creates a new CreateWalletParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateWalletParamsWithHTTPClient(client *http.Client) *CreateWalletParams { - return &CreateWalletParams{ - HTTPClient: client, - } -} - -/* -CreateWalletParams contains all the parameters to send to the API endpoint - - for the create wallet operation. - - Typically these are written to a http.Request. -*/ -type CreateWalletParams struct { - - /* Request. - - Request body - */ - Request *models.WalletCreateRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create wallet params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateWalletParams) WithDefaults() *CreateWalletParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create wallet params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateWalletParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create wallet params -func (o *CreateWalletParams) WithTimeout(timeout time.Duration) *CreateWalletParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create wallet params -func (o *CreateWalletParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create wallet params -func (o *CreateWalletParams) WithContext(ctx context.Context) *CreateWalletParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create wallet params -func (o *CreateWalletParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create wallet params -func (o *CreateWalletParams) WithHTTPClient(client *http.Client) *CreateWalletParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create wallet params -func (o *CreateWalletParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRequest adds the request to the create wallet params -func (o *CreateWalletParams) WithRequest(request *models.WalletCreateRequest) *CreateWalletParams { - o.SetRequest(request) - return o -} - -// SetRequest adds the request to the create wallet params -func (o *CreateWalletParams) SetRequest(request *models.WalletCreateRequest) { - o.Request = request -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateWalletParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Request != nil { - if err := r.SetBodyParam(o.Request); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/swagger/http/wallet/create_wallet_responses.go b/client/swagger/http/wallet/create_wallet_responses.go deleted file mode 100644 index 14c6fef9..00000000 --- a/client/swagger/http/wallet/create_wallet_responses.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package wallet - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/data-preservation-programs/singularity/client/swagger/models" -) - -// CreateWalletReader is a Reader for the CreateWallet structure. -type CreateWalletReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateWalletReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateWalletOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateWalletBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateWalletInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /wallet/create] CreateWallet", response, response.Code()) - } -} - -// NewCreateWalletOK creates a CreateWalletOK with default headers values -func NewCreateWalletOK() *CreateWalletOK { - return &CreateWalletOK{} -} - -/* -CreateWalletOK describes a response with status code 200, with default header values. - -OK -*/ -type CreateWalletOK struct { - Payload *models.ModelWallet -} - -// IsSuccess returns true when this create wallet o k response has a 2xx status code -func (o *CreateWalletOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create wallet o k response has a 3xx status code -func (o *CreateWalletOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create wallet o k response has a 4xx status code -func (o *CreateWalletOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create wallet o k response has a 5xx status code -func (o *CreateWalletOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create wallet o k response a status code equal to that given -func (o *CreateWalletOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create wallet o k response -func (o *CreateWalletOK) Code() int { - return 200 -} - -func (o *CreateWalletOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /wallet/create][%d] createWalletOK %s", 200, payload) -} - -func (o *CreateWalletOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /wallet/create][%d] createWalletOK %s", 200, payload) -} - -func (o *CreateWalletOK) GetPayload() *models.ModelWallet { - return o.Payload -} - -func (o *CreateWalletOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ModelWallet) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateWalletBadRequest creates a CreateWalletBadRequest with default headers values -func NewCreateWalletBadRequest() *CreateWalletBadRequest { - return &CreateWalletBadRequest{} -} - -/* -CreateWalletBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateWalletBadRequest struct { - Payload *models.APIHTTPError -} - -// IsSuccess returns true when this create wallet bad request response has a 2xx status code -func (o *CreateWalletBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create wallet bad request response has a 3xx status code -func (o *CreateWalletBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create wallet bad request response has a 4xx status code -func (o *CreateWalletBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create wallet bad request response has a 5xx status code -func (o *CreateWalletBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create wallet bad request response a status code equal to that given -func (o *CreateWalletBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create wallet bad request response -func (o *CreateWalletBadRequest) Code() int { - return 400 -} - -func (o *CreateWalletBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /wallet/create][%d] createWalletBadRequest %s", 400, payload) -} - -func (o *CreateWalletBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /wallet/create][%d] createWalletBadRequest %s", 400, payload) -} - -func (o *CreateWalletBadRequest) GetPayload() *models.APIHTTPError { - return o.Payload -} - -func (o *CreateWalletBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIHTTPError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateWalletInternalServerError creates a CreateWalletInternalServerError with default headers values -func NewCreateWalletInternalServerError() *CreateWalletInternalServerError { - return &CreateWalletInternalServerError{} -} - -/* -CreateWalletInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateWalletInternalServerError struct { - Payload *models.APIHTTPError -} - -// IsSuccess returns true when this create wallet internal server error response has a 2xx status code -func (o *CreateWalletInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create wallet internal server error response has a 3xx status code -func (o *CreateWalletInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create wallet internal server error response has a 4xx status code -func (o *CreateWalletInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create wallet internal server error response has a 5xx status code -func (o *CreateWalletInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create wallet internal server error response a status code equal to that given -func (o *CreateWalletInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create wallet internal server error response -func (o *CreateWalletInternalServerError) Code() int { - return 500 -} - -func (o *CreateWalletInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /wallet/create][%d] createWalletInternalServerError %s", 500, payload) -} - -func (o *CreateWalletInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /wallet/create][%d] createWalletInternalServerError %s", 500, payload) -} - -func (o *CreateWalletInternalServerError) GetPayload() *models.APIHTTPError { - return o.Payload -} - -func (o *CreateWalletInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIHTTPError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/swagger/http/wallet/wallet_client.go b/client/swagger/http/wallet/wallet_client.go index e3373fe6..598b3d31 100644 --- a/client/swagger/http/wallet/wallet_client.go +++ b/client/swagger/http/wallet/wallet_client.go @@ -56,8 +56,6 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateWallet(params *CreateWalletParams, opts ...ClientOption) (*CreateWalletOK, error) - ImportWallet(params *ImportWalletParams, opts ...ClientOption) (*ImportWalletOK, error) ListWallets(params *ListWalletsParams, opts ...ClientOption) (*ListWalletsOK, error) @@ -67,44 +65,6 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } -/* -CreateWallet creates new wallet -*/ -func (a *Client) CreateWallet(params *CreateWalletParams, opts ...ClientOption) (*CreateWalletOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateWalletParams() - } - op := &runtime.ClientOperation{ - ID: "CreateWallet", - Method: "POST", - PathPattern: "/wallet/create", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateWalletReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateWalletOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for CreateWallet: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* ImportWallet imports a private key */ diff --git a/client/swagger/models/model_deal.go b/client/swagger/models/model_deal.go index 6d760f88..eb73cbea 100644 --- a/client/swagger/models/model_deal.go +++ b/client/swagger/models/model_deal.go @@ -18,11 +18,8 @@ import ( // swagger:model model.Deal type ModelDeal struct { - // client actor Id - ClientActorID string `json:"clientActorId,omitempty"` - // client Id - ClientID int64 `json:"clientId,omitempty"` + ClientID string `json:"clientId,omitempty"` // created at CreatedAt string `json:"createdAt,omitempty"` diff --git a/client/swagger/models/model_wallet.go b/client/swagger/models/model_wallet.go index c6196011..dc2ff9fe 100644 --- a/client/swagger/models/model_wallet.go +++ b/client/swagger/models/model_wallet.go @@ -8,7 +8,6 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -18,100 +17,23 @@ import ( // swagger:model model.Wallet type ModelWallet struct { - // ActorID is the short ID of the wallet - ActorID string `json:"actorId,omitempty"` - - // ActorName is readable label for the wallet - ActorName string `json:"actorName,omitempty"` - // Address is the Filecoin full address of the wallet Address string `json:"address,omitempty"` - // Balance is in Fil cached from chain - Balance float64 `json:"balance,omitempty"` - - // BalancePlus is in Fil+ cached from chain - BalancePlus float64 `json:"balancePlus,omitempty"` - - // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain - BalanceUpdatedAt string `json:"balanceUpdatedAt,omitempty"` - - // ContactInfo is optional email for SP wallets - ContactInfo string `json:"contactInfo,omitempty"` - - // id - ID int64 `json:"id,omitempty"` - - // Location is optional region, country for SP wallets - Location string `json:"location,omitempty"` + // ID is the short ID of the wallet + ID string `json:"id,omitempty"` // PrivateKey is the private key of the wallet PrivateKey string `json:"privateKey,omitempty"` - - // wallet type - WalletType ModelWalletType `json:"walletType,omitempty"` } // Validate validates this model wallet func (m *ModelWallet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWalletType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ModelWallet) validateWalletType(formats strfmt.Registry) error { - if swag.IsZero(m.WalletType) { // not required - return nil - } - - if err := m.WalletType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("walletType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("walletType") - } - return err - } - - return nil -} - -// ContextValidate validate this model wallet based on the context it is used +// ContextValidate validates this model wallet based on context it is used func (m *ModelWallet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWalletType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ModelWallet) contextValidateWalletType(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.WalletType) { // not required - return nil - } - - if err := m.WalletType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("walletType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("walletType") - } - return err - } - return nil } diff --git a/client/swagger/models/model_wallet_type.go b/client/swagger/models/model_wallet_type.go deleted file mode 100644 index 9e33fae9..00000000 --- a/client/swagger/models/model_wallet_type.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// ModelWalletType model wallet type -// -// swagger:model model.WalletType -type ModelWalletType string - -func NewModelWalletType(value ModelWalletType) *ModelWalletType { - return &value -} - -// Pointer returns a pointer to a freshly-allocated ModelWalletType. -func (m ModelWalletType) Pointer() *ModelWalletType { - return &m -} - -const ( - - // ModelWalletTypeUserWallet captures enum value "UserWallet" - ModelWalletTypeUserWallet ModelWalletType = "UserWallet" - - // ModelWalletTypeSPWallet captures enum value "SPWallet" - ModelWalletTypeSPWallet ModelWalletType = "SPWallet" -) - -// for schema -var modelWalletTypeEnum []interface{} - -func init() { - var res []ModelWalletType - if err := json.Unmarshal([]byte(`["UserWallet","SPWallet"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - modelWalletTypeEnum = append(modelWalletTypeEnum, v) - } -} - -func (m ModelWalletType) validateModelWalletTypeEnum(path, location string, value ModelWalletType) error { - if err := validate.EnumCase(path, location, value, modelWalletTypeEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this model wallet type -func (m ModelWalletType) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateModelWalletTypeEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this model wallet type based on context it is used -func (m ModelWalletType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/client/swagger/models/wallet_create_request.go b/client/swagger/models/wallet_create_request.go deleted file mode 100644 index a1411264..00000000 --- a/client/swagger/models/wallet_create_request.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// WalletCreateRequest wallet create request -// -// swagger:model wallet.CreateRequest -type WalletCreateRequest struct { - - // This is either "secp256k1" or "bls" - KeyType string `json:"keyType,omitempty"` -} - -// Validate validates this wallet create request -func (m *WalletCreateRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this wallet create request based on context it is used -func (m *WalletCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WalletCreateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WalletCreateRequest) UnmarshalBinary(b []byte) error { - var res WalletCreateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/cmd/admin/init.go b/cmd/admin/init.go index ad3a0213..59cf0eaf 100644 --- a/cmd/admin/init.go +++ b/cmd/admin/init.go @@ -16,7 +16,7 @@ var InitCmd = &cli.Command{ Usage: "Name of the user or service that is running the Singularity for tracking and logging purpose", }, }, - Description: "This command needs to be run before running any singularity daemon or after any version upgrade", + Description: "This commands need to be run before running any singularity daemon or after any version upgrade", Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { diff --git a/cmd/admin/migrate.go b/cmd/admin/migrate.go deleted file mode 100644 index ede8bf97..00000000 --- a/cmd/admin/migrate.go +++ /dev/null @@ -1,94 +0,0 @@ -package admin - -import ( - "fmt" - - "github.com/cockroachdb/errors" - "github.com/data-preservation-programs/singularity/cmd/cliutil" - "github.com/data-preservation-programs/singularity/database" - "github.com/data-preservation-programs/singularity/model" - "github.com/urfave/cli/v2" -) - -var MigrateCmd = &cli.Command{ - Name: "migrate", - Usage: "Migrate database up, down, or to a certain version", - Subcommands: []*cli.Command{ - { - Name: "up", - Usage: "Execute any unrun migrations", - Action: func(c *cli.Context) error { - db, closer, err := database.OpenFromCLI(c) - if err != nil { - return errors.WithStack(err) - } - defer closer.Close() - return model.GetMigrator(db).Migrate() - }, - }, - { - Name: "down", - Usage: "Rollback to previous migration", - Action: func(c *cli.Context) error { - db, closer, err := database.OpenFromCLI(c) - if err != nil { - return errors.WithStack(err) - } - defer closer.Close() - return model.GetMigrator(db).RollbackLast() - }, - }, - { - Name: "to", - Usage: "Migrate to specified version", - ArgsUsage: "", - Before: cliutil.CheckNArgs, - Action: func(c *cli.Context) error { - db, closer, err := database.OpenFromCLI(c) - if err != nil { - return errors.WithStack(err) - } - defer closer.Close() - - id := c.Args().Get(0) - - migrator := model.GetMigrator(db) - last, err := migrator.GetLastMigration() - if err != nil { - return errors.WithStack(err) - } - if last == id { - fmt.Println("Already at requested migration") - return nil - } - - alreadyRan, err := migrator.HasRunMigration(id) - if err != nil { - return errors.WithStack(err) - } else if alreadyRan { - return migrator.RollbackTo(id) - } else { - return migrator.MigrateTo(id) - } - }, - }, - { - Name: "which", - Usage: "Print current migration ID", - Action: func(c *cli.Context) error { - db, closer, err := database.OpenFromCLI(c) - if err != nil { - return errors.WithStack(err) - } - defer closer.Close() - - last, err := model.GetMigrator(db).GetLastMigration() - if err != nil { - return errors.WithStack(err) - } - fmt.Printf("Current migration: " + last + "\n") - return nil - }, - }, - }, -} diff --git a/cmd/app.go b/cmd/app.go index d59a6319..2d21eab7 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -120,7 +120,6 @@ Upgrading: Subcommands: []*cli.Command{ admin.InitCmd, admin.ResetCmd, - admin.MigrateCmd, admin.MigrateDatasetCmd, admin.MigrateScheduleCmd, }, @@ -166,7 +165,6 @@ Upgrading: Category: "Operations", Usage: "Wallet management", Subcommands: []*cli.Command{ - wallet.CreateCmd, wallet.ImportCmd, wallet.ListCmd, wallet.RemoveCmd, diff --git a/cmd/dataprep_test.go b/cmd/dataprep_test.go index 9c7b6664..3bea7156 100644 --- a/cmd/dataprep_test.go +++ b/cmd/dataprep_test.go @@ -24,7 +24,7 @@ var testPreparation = model.Preparation{ MaxSize: 100, PieceSize: 200, Wallets: []model.Wallet{{ - ActorID: "client_id", + ID: "client_id", Address: "client_address", PrivateKey: "private_key", }}, diff --git a/cmd/deal_test.go b/cmd/deal_test.go index fd418270..4430543b 100644 --- a/cmd/deal_test.go +++ b/cmd/deal_test.go @@ -24,7 +24,7 @@ func swapDealHandler(mockHandler deal.Handler) func() { func TestSendDealHandler(t *testing.T) { testutil.One(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - err := db.Create(&model.Wallet{ActorID: "client_id"}).Error + err := db.Create(&model.Wallet{ID: "client_id"}).Error require.NoError(t, err) runner := NewRunner() defer runner.Save(t) @@ -42,8 +42,7 @@ func TestSendDealHandler(t *testing.T) { SectorStartEpoch: 1500, Price: "0", Verified: true, - ClientID: ptr.Of(model.WalletID(1)), - ClientActorID: "client_id", + ClientID: "client_id", }, nil).Once() _, _, err = runner.Run(ctx, "singularity deal send-manual --client client --provider provider --piece-cid piece_cid --piece-size 1024 --save") require.NoError(t, err) @@ -59,8 +58,7 @@ func TestSendDealHandler(t *testing.T) { SectorStartEpoch: 1500, Price: "0", Verified: true, - ClientID: ptr.Of(model.WalletID(1)), - ClientActorID: "client_id", + ClientID: "client_id", }, nil).Once() _, _, err = runner.Run(ctx, "singularity --verbose deal send-manual --client client --provider provider --piece-cid piece_cid --piece-size 1024 --save") require.NoError(t, err) @@ -91,8 +89,7 @@ func TestListDealHandler(t *testing.T) { Price: "0", Verified: true, ScheduleID: ptr.Of(model.ScheduleID(5)), - ClientID: ptr.Of(model.WalletID(1)), - ClientActorID: "client_id", + ClientID: "client_id", }, { ID: 2, @@ -110,8 +107,7 @@ func TestListDealHandler(t *testing.T) { Price: "0", Verified: false, ScheduleID: ptr.Of(model.ScheduleID(5)), - ClientID: ptr.Of(model.WalletID(1)), - ClientActorID: "client_id", + ClientID: "client_id", }, }, nil) _, _, err := runner.Run(ctx, "singularity deal list --preparation 1 --source source --schedule 5 --provider f01 --state active") diff --git a/cmd/wallet/create.go b/cmd/wallet/create.go deleted file mode 100644 index 6c08f37c..00000000 --- a/cmd/wallet/create.go +++ /dev/null @@ -1,61 +0,0 @@ -package wallet - -import ( - "github.com/cockroachdb/errors" - "github.com/data-preservation-programs/singularity/cmd/cliutil" - "github.com/data-preservation-programs/singularity/database" - "github.com/data-preservation-programs/singularity/handler/wallet" - "github.com/urfave/cli/v2" -) - -var CreateCmd = &cli.Command{ - Name: "create", - Usage: "Create a new wallet", - ArgsUsage: "[type]", - Description: `Create a new Filecoin wallet using offline keypair generation. - -The wallet will be stored locally in the Singularity database and can be used for making deals and other operations. The private key is generated securely and stored encrypted. - -SUPPORTED KEY TYPES: - secp256k1 ECDSA using the secp256k1 curve (default, most common) - bls BLS signature scheme (Boneh-Lynn-Shacham) - -EXAMPLES: - # Create a secp256k1 wallet (default) - singularity wallet create - - # Create a secp256k1 wallet explicitly - singularity wallet create secp256k1 - - # Create a BLS wallet - singularity wallet create bls - -The newly created wallet address and other details will be displayed upon successful creation.`, - Before: cliutil.CheckNArgs, - Action: func(c *cli.Context) error { - db, closer, err := database.OpenFromCLI(c) - if err != nil { - return errors.WithStack(err) - } - defer closer.Close() - - // Default to secp256k1 if no type is provided - keyType := c.Args().Get(0) - if keyType == "" { - keyType = wallet.KTSecp256k1.String() - } - - w, err := wallet.Default.CreateHandler( - c.Context, - db, - wallet.CreateRequest{ - KeyType: keyType, - }) - if err != nil { - return errors.WithStack(err) - } - - cliutil.Print(c, w) - return nil - }, -} diff --git a/cmd/wallet_test.go b/cmd/wallet_test.go index f10061d0..ff2892cd 100644 --- a/cmd/wallet_test.go +++ b/cmd/wallet_test.go @@ -23,24 +23,6 @@ func swapWalletHandler(mockHandler wallet.Handler) func() { } } -func TestWalletCreate(t *testing.T) { - testutil.OneWithoutReset(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - runner := NewRunner() - defer runner.Save(t) - mockHandler := new(wallet.MockWallet) - defer swapWalletHandler(mockHandler)() - mockHandler.On("CreateHandler", mock.Anything, mock.Anything, mock.Anything).Return(&model.Wallet{ - ActorID: "id", - Address: "address", - PrivateKey: "private", - }, nil) - _, _, err := runner.Run(ctx, "singularity wallet create") - require.NoError(t, err) - _, _, err = runner.Run(ctx, "singularity --verbose wallet create") - require.NoError(t, err) - }) -} - func TestWalletImport(t *testing.T) { testutil.OneWithoutReset(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { tmp := t.TempDir() @@ -51,7 +33,7 @@ func TestWalletImport(t *testing.T) { mockHandler := new(wallet.MockWallet) defer swapWalletHandler(mockHandler)() mockHandler.On("ImportHandler", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&model.Wallet{ - ActorID: "id", + ID: "id", Address: "address", PrivateKey: "private", }, nil) @@ -69,11 +51,11 @@ func TestWalletList(t *testing.T) { mockHandler := new(wallet.MockWallet) defer swapWalletHandler(mockHandler)() mockHandler.On("ListHandler", mock.Anything, mock.Anything).Return([]model.Wallet{{ - ActorID: "id1", + ID: "id1", Address: "address1", PrivateKey: "private1", }, { - ActorID: "id2", + ID: "id2", Address: "address2", PrivateKey: "private2", }}, nil) diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index c9d134c1..f1b32fcc 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -40,11 +40,6 @@ * [Admin](cli-reference/admin/README.md) * [Init](cli-reference/admin/init.md) * [Reset](cli-reference/admin/reset.md) - * [Migrate](cli-reference/admin/migrate/README.md) - * [Up](cli-reference/admin/migrate/up.md) - * [Down](cli-reference/admin/migrate/down.md) - * [To](cli-reference/admin/migrate/to.md) - * [Which](cli-reference/admin/migrate/which.md) * [Migrate Dataset](cli-reference/admin/migrate-dataset.md) * [Migrate Schedule](cli-reference/admin/migrate-schedule.md) * [Download](cli-reference/download.md) @@ -67,7 +62,6 @@ * [Deal Pusher](cli-reference/run/deal-pusher.md) * [Download Server](cli-reference/run/download-server.md) * [Wallet](cli-reference/wallet/README.md) - * [Create](cli-reference/wallet/create.md) * [Import](cli-reference/wallet/import.md) * [List](cli-reference/wallet/list.md) * [Remove](cli-reference/wallet/remove.md) diff --git a/docs/en/cli-reference/admin/README.md b/docs/en/cli-reference/admin/README.md index a0a6900a..f7e036d6 100644 --- a/docs/en/cli-reference/admin/README.md +++ b/docs/en/cli-reference/admin/README.md @@ -11,7 +11,6 @@ USAGE: COMMANDS: init Initialize or upgrade the database reset Reset the database - migrate Migrate database up, down, or to a certain version migrate-dataset Migrate dataset from old singularity mongodb migrate-schedule Migrate schedule from old singularity mongodb help, h Shows a list of commands or help for one command diff --git a/docs/en/cli-reference/admin/init.md b/docs/en/cli-reference/admin/init.md index b321cbf2..cb59e97a 100644 --- a/docs/en/cli-reference/admin/init.md +++ b/docs/en/cli-reference/admin/init.md @@ -9,7 +9,7 @@ USAGE: singularity admin init [command options] DESCRIPTION: - This command needs to be run before running any singularity daemon or after any version upgrade + This commands need to be run before running any singularity daemon or after any version upgrade OPTIONS: --identity value Name of the user or service that is running the Singularity for tracking and logging purpose diff --git a/docs/en/cli-reference/admin/migrate/README.md b/docs/en/cli-reference/admin/migrate/README.md deleted file mode 100644 index e97e8385..00000000 --- a/docs/en/cli-reference/admin/migrate/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Migrate database up, down, or to a certain version - -{% code fullWidth="true" %} -``` -NAME: - singularity admin migrate - Migrate database up, down, or to a certain version - -USAGE: - singularity admin migrate command [command options] - -COMMANDS: - up Execute any unrun migrations - down Rollback to previous migration - to Migrate to specified version - which Print current migration ID - help, h Shows a list of commands or help for one command - -OPTIONS: - --help, -h show help -``` -{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/down.md b/docs/en/cli-reference/admin/migrate/down.md deleted file mode 100644 index bd8d6db8..00000000 --- a/docs/en/cli-reference/admin/migrate/down.md +++ /dev/null @@ -1,14 +0,0 @@ -# Rollback to previous migration - -{% code fullWidth="true" %} -``` -NAME: - singularity admin migrate down - Rollback to previous migration - -USAGE: - singularity admin migrate down [command options] - -OPTIONS: - --help, -h show help -``` -{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/to.md b/docs/en/cli-reference/admin/migrate/to.md deleted file mode 100644 index 3b1f802e..00000000 --- a/docs/en/cli-reference/admin/migrate/to.md +++ /dev/null @@ -1,14 +0,0 @@ -# Migrate to specified version - -{% code fullWidth="true" %} -``` -NAME: - singularity admin migrate to - Migrate to specified version - -USAGE: - singularity admin migrate to [command options] - -OPTIONS: - --help, -h show help -``` -{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/up.md b/docs/en/cli-reference/admin/migrate/up.md deleted file mode 100644 index 1abb1970..00000000 --- a/docs/en/cli-reference/admin/migrate/up.md +++ /dev/null @@ -1,14 +0,0 @@ -# Execute any unrun migrations - -{% code fullWidth="true" %} -``` -NAME: - singularity admin migrate up - Execute any unrun migrations - -USAGE: - singularity admin migrate up [command options] - -OPTIONS: - --help, -h show help -``` -{% endcode %} diff --git a/docs/en/cli-reference/admin/migrate/which.md b/docs/en/cli-reference/admin/migrate/which.md deleted file mode 100644 index f8c6131d..00000000 --- a/docs/en/cli-reference/admin/migrate/which.md +++ /dev/null @@ -1,14 +0,0 @@ -# Print current migration ID - -{% code fullWidth="true" %} -``` -NAME: - singularity admin migrate which - Print current migration ID - -USAGE: - singularity admin migrate which [command options] - -OPTIONS: - --help, -h show help -``` -{% endcode %} diff --git a/docs/en/cli-reference/wallet/README.md b/docs/en/cli-reference/wallet/README.md index 1710883b..7096416a 100644 --- a/docs/en/cli-reference/wallet/README.md +++ b/docs/en/cli-reference/wallet/README.md @@ -9,7 +9,6 @@ USAGE: singularity wallet command [command options] COMMANDS: - create Create a new wallet import Import a wallet from exported private key list List all imported wallets remove Remove a wallet diff --git a/docs/en/cli-reference/wallet/create.md b/docs/en/cli-reference/wallet/create.md deleted file mode 100644 index 743ffadd..00000000 --- a/docs/en/cli-reference/wallet/create.md +++ /dev/null @@ -1,35 +0,0 @@ -# Create a new wallet - -{% code fullWidth="true" %} -``` -NAME: - singularity wallet create - Create a new wallet - -USAGE: - singularity wallet create [command options] [type] - -DESCRIPTION: - Create a new Filecoin wallet using offline keypair generation. - - The wallet will be stored locally in the Singularity database and can be used for making deals and other operations. The private key is generated securely and stored encrypted. - - SUPPORTED KEY TYPES: - secp256k1 ECDSA using the secp256k1 curve (default, most common) - bls BLS signature scheme (Boneh-Lynn-Shacham) - - EXAMPLES: - # Create a secp256k1 wallet (default) - singularity wallet create - - # Create a secp256k1 wallet explicitly - singularity wallet create secp256k1 - - # Create a BLS wallet - singularity wallet create bls - - The newly created wallet address and other details will be displayed upon successful creation. - -OPTIONS: - --help, -h show help -``` -{% endcode %} diff --git a/docs/en/web-api-reference/wallet.md b/docs/en/web-api-reference/wallet.md index 28a14954..0aa3ad4f 100644 --- a/docs/en/web-api-reference/wallet.md +++ b/docs/en/web-api-reference/wallet.md @@ -8,10 +8,6 @@ [https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml](https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml) {% endswagger %} -{% swagger src="https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml" path="/wallet/create" method="post" %} -[https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml](https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml) -{% endswagger %} - {% swagger src="https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml" path="/wallet/{address}" method="delete" %} [https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml](https://raw.githubusercontent.com/data-preservation-programs/singularity/main/docs/swagger/swagger.yaml) {% endswagger %} diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go index f4db4ee4..424f209f 100644 --- a/docs/swagger/docs.go +++ b/docs/swagger/docs.go @@ -5532,52 +5532,6 @@ const docTemplate = `{ } } }, - "/wallet/create": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Wallet" - ], - "summary": "Create new wallet", - "operationId": "CreateWallet", - "parameters": [ - { - "description": "Request body", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/wallet.CreateRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.Wallet" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/api.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/api.HTTPError" - } - } - } - } - }, "/wallet/{address}": { "delete": { "tags": [ @@ -6124,11 +6078,8 @@ const docTemplate = `{ "model.Deal": { "type": "object", "properties": { - "clientActorId": { - "type": "string" - }, "clientId": { - "type": "integer" + "type": "string" }, "createdAt": { "type": "string" @@ -6550,61 +6501,20 @@ const docTemplate = `{ "model.Wallet": { "type": "object", "properties": { - "actorId": { - "description": "ActorID is the short ID of the wallet", - "type": "string" - }, - "actorName": { - "description": "ActorName is readable label for the wallet", - "type": "string" - }, "address": { "description": "Address is the Filecoin full address of the wallet", "type": "string" }, - "balance": { - "description": "Balance is in Fil cached from chain", - "type": "number" - }, - "balancePlus": { - "description": "BalancePlus is in Fil+ cached from chain", - "type": "number" - }, - "balanceUpdatedAt": { - "description": "BalanceUpdatedAt is a timestamp when balance info was last pulled from chain", - "type": "string" - }, - "contactInfo": { - "description": "ContactInfo is optional email for SP wallets", - "type": "string" - }, "id": { - "type": "integer" - }, - "location": { - "description": "Location is optional region, country for SP wallets", + "description": "ID is the short ID of the wallet", "type": "string" }, "privateKey": { "description": "PrivateKey is the private key of the wallet", "type": "string" - }, - "walletType": { - "$ref": "#/definitions/model.WalletType" } } }, - "model.WalletType": { - "type": "string", - "enum": [ - "UserWallet", - "SPWallet" - ], - "x-enum-varnames": [ - "UserWallet", - "SPWallet" - ] - }, "schedule.CreateRequest": { "type": "object", "properties": { @@ -16493,15 +16403,6 @@ const docTemplate = `{ "store.PieceReader": { "type": "object" }, - "wallet.CreateRequest": { - "type": "object", - "properties": { - "keyType": { - "description": "This is either \"secp256k1\" or \"bls\"", - "type": "string" - } - } - }, "wallet.ImportRequest": { "type": "object", "properties": { diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index 5244a1e3..2bf8a3a6 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -5526,52 +5526,6 @@ } } }, - "/wallet/create": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Wallet" - ], - "summary": "Create new wallet", - "operationId": "CreateWallet", - "parameters": [ - { - "description": "Request body", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/wallet.CreateRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.Wallet" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/api.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/api.HTTPError" - } - } - } - } - }, "/wallet/{address}": { "delete": { "tags": [ @@ -6118,11 +6072,8 @@ "model.Deal": { "type": "object", "properties": { - "clientActorId": { - "type": "string" - }, "clientId": { - "type": "integer" + "type": "string" }, "createdAt": { "type": "string" @@ -6544,61 +6495,20 @@ "model.Wallet": { "type": "object", "properties": { - "actorId": { - "description": "ActorID is the short ID of the wallet", - "type": "string" - }, - "actorName": { - "description": "ActorName is readable label for the wallet", - "type": "string" - }, "address": { "description": "Address is the Filecoin full address of the wallet", "type": "string" }, - "balance": { - "description": "Balance is in Fil cached from chain", - "type": "number" - }, - "balancePlus": { - "description": "BalancePlus is in Fil+ cached from chain", - "type": "number" - }, - "balanceUpdatedAt": { - "description": "BalanceUpdatedAt is a timestamp when balance info was last pulled from chain", - "type": "string" - }, - "contactInfo": { - "description": "ContactInfo is optional email for SP wallets", - "type": "string" - }, "id": { - "type": "integer" - }, - "location": { - "description": "Location is optional region, country for SP wallets", + "description": "ID is the short ID of the wallet", "type": "string" }, "privateKey": { "description": "PrivateKey is the private key of the wallet", "type": "string" - }, - "walletType": { - "$ref": "#/definitions/model.WalletType" } } }, - "model.WalletType": { - "type": "string", - "enum": [ - "UserWallet", - "SPWallet" - ], - "x-enum-varnames": [ - "UserWallet", - "SPWallet" - ] - }, "schedule.CreateRequest": { "type": "object", "properties": { @@ -16487,15 +16397,6 @@ "store.PieceReader": { "type": "object" }, - "wallet.CreateRequest": { - "type": "object", - "properties": { - "keyType": { - "description": "This is either \"secp256k1\" or \"bls\"", - "type": "string" - } - } - }, "wallet.ImportRequest": { "type": "object", "properties": { diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index de07188a..490d4d59 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -372,10 +372,8 @@ definitions: type: object model.Deal: properties: - clientActorId: - type: string clientId: - type: integer + type: string createdAt: type: string dealId: @@ -672,47 +670,16 @@ definitions: type: object model.Wallet: properties: - actorId: - description: ActorID is the short ID of the wallet - type: string - actorName: - description: ActorName is readable label for the wallet - type: string address: description: Address is the Filecoin full address of the wallet type: string - balance: - description: Balance is in Fil cached from chain - type: number - balancePlus: - description: BalancePlus is in Fil+ cached from chain - type: number - balanceUpdatedAt: - description: BalanceUpdatedAt is a timestamp when balance info was last pulled - from chain - type: string - contactInfo: - description: ContactInfo is optional email for SP wallets - type: string id: - type: integer - location: - description: Location is optional region, country for SP wallets + description: ID is the short ID of the wallet type: string privateKey: description: PrivateKey is the private key of the wallet type: string - walletType: - $ref: '#/definitions/model.WalletType' type: object - model.WalletType: - enum: - - UserWallet - - SPWallet - type: string - x-enum-varnames: - - UserWallet - - SPWallet schedule.CreateRequest: properties: allowedPieceCids: @@ -8210,12 +8177,6 @@ definitions: type: object store.PieceReader: type: object - wallet.CreateRequest: - properties: - keyType: - description: This is either "secp256k1" or "bls" - type: string - type: object wallet.ImportRequest: properties: privateKey: @@ -11886,36 +11847,6 @@ paths: summary: Remove a wallet tags: - Wallet - /wallet/create: - post: - consumes: - - application/json - operationId: CreateWallet - parameters: - - description: Request body - in: body - name: request - required: true - schema: - $ref: '#/definitions/wallet.CreateRequest' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/model.Wallet' - "400": - description: Bad Request - schema: - $ref: '#/definitions/api.HTTPError' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/api.HTTPError' - summary: Create new wallet - tags: - - Wallet produces: - application/json swagger: "2.0" diff --git a/go.mod b/go.mod index 786ec682..ea0c1711 100644 --- a/go.mod +++ b/go.mod @@ -10,14 +10,13 @@ require ( github.com/cockroachdb/errors v1.11.3 github.com/data-preservation-programs/table v0.0.3 github.com/dustin/go-humanize v1.0.1 - github.com/fatih/color v1.18.0 - github.com/filecoin-project/go-address v1.2.0 + github.com/fatih/color v1.17.0 + github.com/filecoin-project/go-address v1.1.0 github.com/filecoin-project/go-cbor-util v0.0.1 - github.com/filecoin-project/go-crypto v0.1.0 - github.com/filecoin-project/go-fil-commcid v0.2.0 + github.com/filecoin-project/go-fil-commcid v0.1.0 github.com/filecoin-project/go-fil-commp-hashhash v0.2.1-0.20230811065821-2e9c683db589 github.com/filecoin-project/go-fil-markets v1.28.3 - github.com/filecoin-project/go-state-types v0.16.0 + github.com/filecoin-project/go-state-types v0.12.0 github.com/filecoin-project/lassie v0.23.2 github.com/filecoin-shipyard/boostly v0.0.0-20230813165216-a449c35ece79 github.com/fxamacker/cbor/v2 v2.4.0 @@ -36,7 +35,7 @@ require ( github.com/ipfs/go-cid v0.5.0 github.com/ipfs/go-datastore v0.6.0 github.com/ipfs/go-ipfs-routing v0.3.0 - github.com/ipfs/go-ipld-cbor v0.2.0 + github.com/ipfs/go-ipld-cbor v0.1.0 github.com/ipfs/go-ipld-format v0.6.0 github.com/ipfs/go-ipld-legacy v0.2.1 github.com/ipfs/go-log v1.0.5 @@ -64,7 +63,6 @@ require ( github.com/multiformats/go-varint v0.0.7 github.com/orlangure/gnomock v0.30.0 github.com/parnurzeal/gorequest v0.2.16 - github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844 github.com/rclone/rclone v1.62.2 github.com/rjNemo/underscore v0.5.0 github.com/robfig/cron/v3 v3.0.1 @@ -78,17 +76,11 @@ require ( go.mongodb.org/mongo-driver v1.12.1 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/text v0.23.0 - golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da + golang.org/x/text v0.22.0 gorm.io/driver/mysql v1.5.0 gorm.io/driver/postgres v1.5.0 gorm.io/driver/sqlite v1.5.2 - gorm.io/gorm v1.25.12 -) - -require ( - github.com/google/go-cmp v0.7.0 // indirect - golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect + gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 ) require ( @@ -135,12 +127,12 @@ require ( github.com/elastic/gosigar v0.14.3 // indirect github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-amt-ipld/v4 v4.4.0 // indirect + github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 // indirect github.com/filecoin-project/go-bitfield v0.2.4 // indirect github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 // indirect github.com/filecoin-project/go-ds-versioning v0.1.2 // indirect github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect - github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0 // indirect + github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 // indirect github.com/filecoin-project/go-padreader v0.0.1 // indirect github.com/filecoin-project/go-retrieval-types v1.2.0 // indirect github.com/filecoin-project/go-statemachine v1.0.3 // indirect @@ -148,13 +140,12 @@ require ( github.com/filecoin-project/specs-actors v0.9.13 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect - github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gammazero/deque v0.2.1 // indirect github.com/geoffgarside/ber v1.1.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/glebarez/go-sqlite v1.21.1 // indirect github.com/go-chi/chi/v5 v5.0.8 // indirect - github.com/go-gormigrate/gormigrate/v2 v2.1.4 github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -254,6 +245,7 @@ require ( github.com/miekg/dns v1.1.63 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect + github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/montanaflynn/stats v0.7.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -299,7 +291,7 @@ require ( github.com/pion/turn/v4 v4.0.0 // indirect github.com/pion/webrtc/v4 v4.0.8 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/pkg/errors v0.9.1 + github.com/pkg/errors v0.9.1 // indirect github.com/pkg/sftp v1.13.6-0.20230213180117-971c283182b6 // indirect github.com/pkg/xattr v0.4.9 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -334,7 +326,7 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 // indirect github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect - github.com/whyrusleeping/cbor-gen v0.3.1 // indirect + github.com/whyrusleeping/cbor-gen v0.1.2 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect github.com/wlynxg/anet v0.0.5 // indirect github.com/x448/float16 v0.8.4 // indirect @@ -348,8 +340,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect github.com/zeebo/blake3 v0.2.3 // indirect github.com/zeebo/errs v1.3.0 // indirect - gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect - gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -358,22 +348,24 @@ require ( go.uber.org/dig v1.18.0 // indirect go.uber.org/fx v1.23.0 // indirect go.uber.org/mock v0.5.0 // indirect - golang.org/x/crypto v0.36.0 // indirect + golang.org/x/crypto v0.32.0 // indirect + golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.35.0 // indirect + golang.org/x/net v0.34.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.28.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.30.0 // indirect + golang.org/x/tools v0.29.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.149.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.36.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.2 // indirect + gotest.tools/v3 v3.5.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect modernc.org/libc v1.22.3 // indirect modernc.org/mathutil v1.5.0 // indirect diff --git a/go.sum b/go.sum index 8d929c15..74329b33 100644 --- a/go.sum +++ b/go.sum @@ -105,7 +105,6 @@ github.com/buengese/sgzip v0.1.1/go.mod h1:i5ZiXGF3fhV7gL1xaRRL1nDnmpNj0X061FQzO github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/calebcase/tmpfile v1.0.3 h1:BZrOWZ79gJqQ3XbAQlihYZf/YCV0H4KPIdM5K5oMpJo= github.com/calebcase/tmpfile v1.0.3/go.mod h1:UAUc01aHeC+pudPagY/lWvt2qS9ZO5Zzof6/tIUzqeI= -github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -159,7 +158,6 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPc github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210507181900-4e0be8d2fbb4/go.mod h1:UkVqoxmJlLgUvBjJD+GdJz6mgdSdf3UjX83xfwUAYDk= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dlespiau/covertool v0.0.0-20180314162135-b0c4c6d0583a/go.mod h1:/eQMcW3eA1bzKx23ZYI2H3tXPdJB5JWYTHzoUPBvQY4= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= @@ -194,8 +192,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/filecoin-project/dagstore v0.5.2 h1:Nd6oXdnolbbVhpMpkYT5PJHOjQp4OBSntHpMV5pxj3c= github.com/filecoin-project/dagstore v0.5.2/go.mod h1:mdqKzYrRBHf1pRMthYfMv3n37oOw0Tkx7+TxPt240M0= github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200910194244-f640612a1a1f/go.mod h1:+If3s2VxyjZn+KGGZIoRXBDSFQ9xL404JBJGf4WhEj0= @@ -203,14 +201,12 @@ github.com/filecoin-project/filecoin-ffi v0.30.4-0.20220519234331-bfd1f5f9fe38 h github.com/filecoin-project/filecoin-ffi v0.30.4-0.20220519234331-bfd1f5f9fe38/go.mod h1:GM5pXRYvQM7wyH6V2WtPnJ2k1jt+qotRkWLxBSRCOuE= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= +github.com/filecoin-project/go-address v1.1.0 h1:ofdtUtEsNxkIxkDw67ecSmvtzaVSdcea4boAmLbnHfE= github.com/filecoin-project/go-address v1.1.0/go.mod h1:5t3z6qPmIADZBtuE9EIzi0EwzcRy2nVhpo0I/c1r0OA= -github.com/filecoin-project/go-address v1.2.0 h1:NHmWUE/J7Pi2JZX3gZt32XuY69o9StVZeJxdBodIwOE= -github.com/filecoin-project/go-address v1.2.0/go.mod h1:kQEQ4qZ99a51X7DjT9HiMT4yR6UwLJ9kznlxsOIeDAg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= +github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 h1:XM81BJ4/6h3FV0WfFjh74cIDIgqMbJsMBLM0fIuLUUk= github.com/filecoin-project/go-amt-ipld/v4 v4.0.0/go.mod h1:gF053YQ4BIpzTNDoEwHZas7U3oAwncDVGvOHyY8oDpE= -github.com/filecoin-project/go-amt-ipld/v4 v4.4.0 h1:6kvvMeSpIy4GTU5t3vPHZgWYIMRzGRKLJ73s/cltsoc= -github.com/filecoin-project/go-amt-ipld/v4 v4.4.0/go.mod h1:msgmUxTyRBZ6iXt+5dnUDnIb7SEFqdPsbB1wyo/G3ts= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.4 h1:uZ7MeE+XfM5lqrHJZ93OnhQKc/rveW8p9au0C68JPgk= github.com/filecoin-project/go-bitfield v0.2.4/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= @@ -221,26 +217,24 @@ github.com/filecoin-project/go-commp-utils v0.1.3 h1:rTxbkNXZU7FLgdkBk8RsQIEOuPO github.com/filecoin-project/go-commp-utils v0.1.3/go.mod h1:3ENlD1pZySaUout0p9ANQrY3fDFoXdqyX04J+dWpK30= github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837/go.mod h1:e2YBjSblNVoBckkbv3PPqsq71q98oFkFqL7s1etViGo= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-crypto v0.1.0 h1:Pob2MphoipMbe/ksxZOMcQvmBHAd3sI/WEqcbpIsGI0= -github.com/filecoin-project/go-crypto v0.1.0/go.mod h1:K9UFXvvoyAVvB+0Le7oGlKiT9mgA5FHOJdYQXEE8IhI= +github.com/filecoin-project/go-crypto v0.0.1 h1:AcvpSGGCgjaY8y1az6AMfKQWreF/pWO2JJGLl6gCq6o= +github.com/filecoin-project/go-crypto v0.0.1/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 h1:v+zJS5B6pA3ptWZS4t8tbt1Hz9qENnN4nVr1w99aSWc= github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7/go.mod h1:V3Y4KbttaCwyg1gwkP7iai8CbQx4mZUGjd3h9GZWLKE= github.com/filecoin-project/go-ds-versioning v0.1.2 h1:to4pTadv3IeV1wvgbCbN6Vqd+fu+7tveXgv/rCEZy6w= github.com/filecoin-project/go-ds-versioning v0.1.2/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= +github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-commcid v0.2.0 h1:B+5UX8XGgdg/XsdUpST4pEBviKkFOw+Fvl2bLhSKGpI= -github.com/filecoin-project/go-fil-commcid v0.2.0/go.mod h1:8yigf3JDIil+/WpqR5zoKyP0jBPCOGtEqq/K1CcMy9Q= github.com/filecoin-project/go-fil-commp-hashhash v0.2.1-0.20230811065821-2e9c683db589 h1:PP5FU5JVVDb7zODWZlgzbdmQDtwu3Mm0bK9Bg/Om5yc= github.com/filecoin-project/go-fil-commp-hashhash v0.2.1-0.20230811065821-2e9c683db589/go.mod h1:VH3fAFOru4yyWar4626IoS5+VGE8SfZiBODJLUigEo4= github.com/filecoin-project/go-fil-markets v1.28.3 h1:2cFu7tLZYrfNz4LnxjgERaVD7k5+Wwp0H76mnnTGPBk= github.com/filecoin-project/go-fil-markets v1.28.3/go.mod h1:eryxo/oVgIxaR5g5CNr9PlvZOi+u/bak0IsPL/PT1hk= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= +github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 h1:rVVNq0x6RGQIzCo1iiJlGFm9AGIZzeifggxtKMU7zmI= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g= -github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0 h1:nYs6OPUF8KbZ3E8o9p9HJnQaE8iugjHR5WYVMcicDJc= -github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0/go.mod h1:s0qiHRhFyrgW0SvdQMSJFQxNa4xEIG5XvqCBZUEgcbc= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= github.com/filecoin-project/go-padreader v0.0.1 h1:8h2tVy5HpoNbr2gBRr+WD6zV6VD6XHig+ynSGJg8ZOs= github.com/filecoin-project/go-padreader v0.0.1/go.mod h1:VYVPJqwpsfmtoHnAmPx6MUwmrK6HIcDqZJiuZhtmfLQ= @@ -252,8 +246,8 @@ github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.10.0/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= -github.com/filecoin-project/go-state-types v0.16.0 h1:ajIREDzTGfq71ofIQ29iZR1WXxmkvd2nQNc6ApcP1wI= -github.com/filecoin-project/go-state-types v0.16.0/go.mod h1:YCESyrqnyu17y0MazbV6Uwma5+BrMvEKEQp5QWeIf9g= +github.com/filecoin-project/go-state-types v0.12.0 h1:l+54FdFf3Exkzx7cpYCKoWUPReX7SUQlmT/h+9obVEM= +github.com/filecoin-project/go-state-types v0.12.0/go.mod h1:hm9GXjYuqB1xJs58Ei/ZKy8Nfb0532HP6bR9DI8a+kM= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -272,11 +266,12 @@ github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= @@ -304,8 +299,6 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gormigrate/gormigrate/v2 v2.1.4 h1:KOPEt27qy1cNzHfMZbp9YTmEuzkY4F4wrdsJW9WFk1U= -github.com/go-gormigrate/gormigrate/v2 v2.1.4/go.mod h1:y/6gPAH6QGAgP1UfHMiXcqGeJ88/GRQbfCReE1JJD5Y= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -442,9 +435,10 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -454,7 +448,6 @@ github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190309163659-77426154d546/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -544,6 +537,7 @@ github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnO github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.2.0/go.mod h1:P+HXFDF4CVhaVayiEb4wkAy7zBHxBwsJyt0Y5U6MLro= +github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= github.com/ipfs/go-cid v0.5.0 h1:goEKKhaGm0ul11IHA7I6p1GmKz8kEYniqFopaB5Otwg= github.com/ipfs/go-cid v0.5.0/go.mod h1:0L7vmeNXpQpUS9vt+yEARkJ8rOg43DF3iPgn4GIN0mk= github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= @@ -590,8 +584,8 @@ github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9 github.com/ipfs/go-ipld-cbor v0.0.5/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.6-0.20211211231443-5d9b9e1f6fa8/go.mod h1:ssdxxaLJPXH7OjF5V4NSjBbcfh+evoR4ukuru0oPXMA= github.com/ipfs/go-ipld-cbor v0.0.6/go.mod h1:ssdxxaLJPXH7OjF5V4NSjBbcfh+evoR4ukuru0oPXMA= -github.com/ipfs/go-ipld-cbor v0.2.0 h1:VHIW3HVIjcMd8m4ZLZbrYpwjzqlVUfjLM7oK4T5/YF0= -github.com/ipfs/go-ipld-cbor v0.2.0/go.mod h1:Cp8T7w1NKcu4AQJLqK0tWpd1nkgTxEVB5C6kVpLW6/0= +github.com/ipfs/go-ipld-cbor v0.1.0 h1:dx0nS0kILVivGhfWuB6dUpMa/LAwElHPw1yOGYopoYs= +github.com/ipfs/go-ipld-cbor v0.1.0/go.mod h1:U2aYlmVrJr2wsUBU67K4KgepApSZddGRDWBYR0H4sCk= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= @@ -634,6 +628,7 @@ github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6 github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 h1:QAI/Ridj0+foHD6epbxmB4ugxz9B4vmNdYSmQLGa05E= github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0/go.mod h1:odxGcpiQZLzP5+yGu84Ljo8y3EzCvNAQKEodHNsHLXA= +github.com/ipld/go-ipld-prime v0.19.0/go.mod h1:Q9j3BaVXwaA3o5JUDNvptDDr/x8+F7FG6XJ8WI3ILg4= github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd h1:gMlw/MhNr2Wtp5RwGdsW23cs+yCuj9k2ON7i9MiJlRo= @@ -646,6 +641,7 @@ github.com/ipni/go-libipni v0.6.6 h1:Ms2a0AkPgv1pCblSgqM8tKUz9NHmzn8JP0PO8fYUYZM github.com/ipni/go-libipni v0.6.6/go.mod h1:jh/TDrsKlKuwzHfaYIGTuHudFkX4ioe9zx0835x1fiQ= github.com/ipni/index-provider v0.12.0 h1:R3F6dxxKNv4XkE4GJZNLOG0bDEbBQ/S5iztXwSD8jhQ= github.com/ipni/index-provider v0.12.0/go.mod h1:GhyrADJp7n06fqoc1djzkvL4buZYHzV8SoWrlxEo5F4= +github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= @@ -724,7 +720,9 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -830,7 +828,6 @@ github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mmcloughlin/avo v0.0.0-20190318053554-7a0eb66183da/go.mod h1:lf5GMZxA5kz8dnCweJuER5Rmbx6dDu6qvw0fO3uYKK8= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -862,6 +859,7 @@ github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/g github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= +github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= @@ -871,6 +869,7 @@ github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpK github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= +github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= github.com/multiformats/go-multistream v0.6.0 h1:ZaHKbsL404720283o4c/IHQXiS6gb8qAN5EIJ4PN5EA= @@ -925,8 +924,6 @@ github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 h1:XeOYlK9W1uC github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14/go.mod h1:jVblp62SafmidSkvWrXyxAme3gaTfEtWwRPGz5cpvHg= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= -github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844 h1:Yflyn+XFLEu7RPzxovgEVLP6Es8JLJrHqdXunpm2ak4= -github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pion/datachannel v1.5.10 h1:ly0Q26K1i6ZkGf42W7D4hQYR90pZwzFOjTq5AuCKk4o= @@ -995,6 +992,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= @@ -1093,6 +1091,7 @@ github.com/smartystreets/assertions v1.13.0 h1:Dx1kYM01xsSqKPno3aqLnrwac2LetPvN2 github.com/smartystreets/assertions v1.13.0/go.mod h1:wDmR7qL282YbGsPy6H/yAsesrxfxaaSlJazyFLYVFx8= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= @@ -1145,7 +1144,6 @@ github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYm github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= @@ -1160,10 +1158,12 @@ github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49u github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 h1:zMsHhfK9+Wdl1F7sIKLyx3wrOFofpb3rWFbA4HgcK5k= github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3/go.mod h1:R0Gbuw7ElaGSLOZUSwBm/GgVwMd30jWxBDdAyMOeTuc= +github.com/warpfork/go-testmark v0.10.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 h1:5HZfQkwe0mIfyDmc1Em5GqlNRzcdtlv4HTNmdpt7XH0= @@ -1181,8 +1181,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.3.1 h1:82ioxmhEYut7LBVGhGq8xoRkXPLElVuh5mV67AFfdv0= -github.com/whyrusleeping/cbor-gen v0.3.1/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= +github.com/whyrusleeping/cbor-gen v0.1.2 h1:WQFlrPhpcQl+M2/3dP5cvlTLWPVsL6LGBb9jJt6l/cA= +github.com/whyrusleeping/cbor-gen v0.1.2/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= @@ -1234,10 +1234,6 @@ github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= github.com/zeebo/errs v1.3.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= -gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA= -gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8= -gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= -gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1299,8 +1295,6 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= -golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= -golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1308,7 +1302,6 @@ golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1324,15 +1317,15 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1381,7 +1374,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190326090315-15845e8f865b/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1419,8 +1411,8 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1446,8 +1438,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1459,7 +1451,6 @@ golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1515,6 +1506,7 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1525,11 +1517,10 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1537,11 +1528,10 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1554,11 +1544,10 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1570,13 +1559,11 @@ golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190106171756-3ef68632349c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190325223049-1d95b17f1b04/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1624,14 +1611,14 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= -golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -1759,12 +1746,12 @@ gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1 gorm.io/driver/sqlite v1.5.2 h1:TpQ+/dqCY4uCigCFyrfnrJnrW9zjpelWVoEVNy5qJkc= gorm.io/driver/sqlite v1.5.2/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4= gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= -gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= +gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7wJM0gzgcm8jkIkECQ= +gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= -gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1774,6 +1761,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= @@ -1792,7 +1780,6 @@ modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= diff --git a/handler/admin/init.go b/handler/admin/init.go index 2bec942d..27b860ad 100644 --- a/handler/admin/init.go +++ b/handler/admin/init.go @@ -18,8 +18,7 @@ import ( // - An error, if any occurred during the operation. func (DefaultHandler) InitHandler(ctx context.Context, db *gorm.DB) error { db = db.WithContext(ctx) - - err := model.GetMigrator(db).Migrate() + err := model.AutoMigrate(db) if err != nil { return errors.WithStack(err) } diff --git a/handler/admin/reset.go b/handler/admin/reset.go index c88397a6..4a2da222 100644 --- a/handler/admin/reset.go +++ b/handler/admin/reset.go @@ -21,13 +21,12 @@ import ( // - An error, if any occurred during the operation. func (DefaultHandler) ResetHandler(ctx context.Context, db *gorm.DB) error { db = db.WithContext(ctx) - migrator := model.GetMigrator(db) - err := migrator.DropAll() + err := model.DropAll(db) if err != nil { return errors.WithStack(err) } - err = migrator.Migrate() + err = model.AutoMigrate(db) if err != nil { return errors.WithStack(err) } diff --git a/handler/deal/list_test.go b/handler/deal/list_test.go index b5bd9456..96005ebf 100644 --- a/handler/deal/list_test.go +++ b/handler/deal/list_test.go @@ -6,7 +6,6 @@ import ( "github.com/data-preservation-programs/singularity/model" "github.com/data-preservation-programs/singularity/util/testutil" - "github.com/gotidy/ptr" "github.com/stretchr/testify/require" "gorm.io/gorm" ) @@ -15,7 +14,7 @@ func TestListHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, SourceStorages: []model.Storage{{ Name: "storage", @@ -29,7 +28,7 @@ func TestListHandler(t *testing.T) { PreparationID: 1, }, State: model.DealActive, - ClientID: ptr.Of(model.WalletID(1)), + ClientID: "f01", Provider: "provider", }, }).Error diff --git a/handler/deal/schedule/create_test.go b/handler/deal/schedule/create_test.go index 843adf39..4e1da85f 100644 --- a/handler/deal/schedule/create_test.go +++ b/handler/deal/schedule/create_test.go @@ -190,7 +190,7 @@ func TestCreateHandler_InvalidProvider(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) @@ -207,7 +207,7 @@ func TestCreateHandler_DealSizeNotSetForCron(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) @@ -227,7 +227,7 @@ func TestCreateHandler_ScheduleDealSizeSetForNonCron(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) @@ -248,7 +248,7 @@ func TestCreateHandler_Success(t *testing.T) { err := db.Create(&model.Preparation{ Name: "name", Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/list_test.go b/handler/deal/schedule/list_test.go index 8169eedd..e0c906f2 100644 --- a/handler/deal/schedule/list_test.go +++ b/handler/deal/schedule/list_test.go @@ -14,7 +14,7 @@ func TestListHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/pause_test.go b/handler/deal/schedule/pause_test.go index b7238460..17090f82 100644 --- a/handler/deal/schedule/pause_test.go +++ b/handler/deal/schedule/pause_test.go @@ -15,7 +15,7 @@ func TestPauseHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/remove_test.go b/handler/deal/schedule/remove_test.go index dbb6c6ee..afd825d3 100644 --- a/handler/deal/schedule/remove_test.go +++ b/handler/deal/schedule/remove_test.go @@ -16,7 +16,7 @@ func TestRemoveSchedule_Success(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) @@ -27,7 +27,7 @@ func TestRemoveSchedule_Success(t *testing.T) { require.NoError(t, err) err = db.Create(&model.Deal{ - ClientID: ptr.Of(model.WalletID(1)), + ClientID: "f01", ScheduleID: ptr.Of(model.ScheduleID(1)), }).Error require.NoError(t, err) @@ -57,7 +57,7 @@ func TestRemoveSchedule_StillActive(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/schedule/resume_test.go b/handler/deal/schedule/resume_test.go index eb4c20fc..85d87b95 100644 --- a/handler/deal/schedule/resume_test.go +++ b/handler/deal/schedule/resume_test.go @@ -15,7 +15,7 @@ func TestResumeHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "f01", + ID: "f01", }}, }).Error require.NoError(t, err) diff --git a/handler/deal/send-manual.go b/handler/deal/send-manual.go index 3fe9a754..498cc7bb 100644 --- a/handler/deal/send-manual.go +++ b/handler/deal/send-manual.go @@ -71,8 +71,8 @@ func (DefaultHandler) SendManualHandler( ) (*model.Deal, error) { db = db.WithContext(ctx) // Get the wallet object - var wallet = model.Wallet{} - err := wallet.FindByIDOrAddr(db, request.ClientAddress) + wallet := model.Wallet{} + err := db.Where("id = ? OR address = ?", request.ClientAddress, request.ClientAddress).First(&wallet).Error if errors.Is(err, gorm.ErrRecordNotFound) { return nil, errors.Wrapf(handlererror.ErrNotFound, "client address %s not found", request.ClientAddress) } diff --git a/handler/deal/send-manual_test.go b/handler/deal/send-manual_test.go index b7272971..0d55f66a 100644 --- a/handler/deal/send-manual_test.go +++ b/handler/deal/send-manual_test.go @@ -41,7 +41,7 @@ var proposal = Proposal{ func TestSendManualHandler_WalletNotFound(t *testing.T) { wallet := model.Wallet{ - ActorID: "f09999", + ID: "f09999", Address: "f10000", } @@ -59,7 +59,7 @@ func TestSendManualHandler_WalletNotFound(t *testing.T) { func TestSendManualHandler_InvalidPieceCID(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -79,7 +79,7 @@ func TestSendManualHandler_InvalidPieceCID(t *testing.T) { func TestSendManualHandler_InvalidPieceCID_NOTCOMMP(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -99,7 +99,7 @@ func TestSendManualHandler_InvalidPieceCID_NOTCOMMP(t *testing.T) { func TestSendManualHandler_InvalidPieceSize(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -119,7 +119,7 @@ func TestSendManualHandler_InvalidPieceSize(t *testing.T) { func TestSendManualHandler_InvalidPieceSize_NotPowerOfTwo(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -139,7 +139,7 @@ func TestSendManualHandler_InvalidPieceSize_NotPowerOfTwo(t *testing.T) { func TestSendManualHandler_InvalidRootCID(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -159,7 +159,7 @@ func TestSendManualHandler_InvalidRootCID(t *testing.T) { func TestSendManualHandler_InvalidDuration(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -179,7 +179,7 @@ func TestSendManualHandler_InvalidDuration(t *testing.T) { func TestSendManualHandler_InvalidStartDelay(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } @@ -199,7 +199,7 @@ func TestSendManualHandler_InvalidStartDelay(t *testing.T) { func TestSendManualHandler(t *testing.T) { wallet := model.Wallet{ - ActorID: "f01000", + ID: "f01000", Address: "f10000", } diff --git a/handler/file/deals_test.go b/handler/file/deals_test.go index 5785cf70..b2b5838e 100644 --- a/handler/file/deals_test.go +++ b/handler/file/deals_test.go @@ -75,18 +75,15 @@ func TestGetFileDealsHandler(t *testing.T) { err = db.Create(cars).Error require.NoError(t, err) - wallet := &model.Wallet{ActorID: "f01", Address: "f11"} - err = db.Create(wallet).Error - require.NoError(t, err) deals := []model.Deal{{ PieceCID: model.CID(testCid1), - Wallet: wallet, + Wallet: &model.Wallet{}, }, { PieceCID: model.CID(testCid2), - Wallet: wallet, + Wallet: &model.Wallet{}, }, { PieceCID: model.CID(testCid2), - Wallet: wallet, + Wallet: &model.Wallet{}, }} err = db.Create(deals).Error require.NoError(t, err) diff --git a/handler/file/retrieve_test.go b/handler/file/retrieve_test.go index 792c02fc..46ea5b35 100644 --- a/handler/file/retrieve_test.go +++ b/handler/file/retrieve_test.go @@ -138,17 +138,13 @@ func TestRetrieveFileHandler(t *testing.T) { require.NoError(t, err) } - wallet := &model.Wallet{ActorID: "f01", Address: "f11"} - err = db.Create(wallet).Error - require.NoError(t, err) - deals := make([]model.Deal, 0, 4) for i, testCid := range testCids { deal := model.Deal{ State: model.DealActive, PieceCID: model.CID(testCid), Provider: "apples" + strconv.Itoa(i), - Wallet: wallet, + Wallet: &model.Wallet{}, } err = db.Create(&deal).Error require.NoError(t, err) @@ -162,7 +158,7 @@ func TestRetrieveFileHandler(t *testing.T) { State: state, PieceCID: model.CID(testCid), Provider: "oranges" + strconv.Itoa(i), - Wallet: wallet, + Wallet: &model.Wallet{}, } err = db.Create(&deal).Error require.NoError(t, err) @@ -413,7 +409,7 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) defer cancel() db = db.WithContext(ctx) - require.NoError(b, model.GetMigrator(db).Migrate()) + require.NoError(b, model.AutoMigrate(db)) path := b.TempDir() lsys := cidlink.DefaultLinkSystem() @@ -488,16 +484,12 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { require.NoError(b, err) } - wallet := &model.Wallet{ActorID: "f01", Address: "f11"} - err = db.Create(wallet).Error - require.NoError(b, err) - for i, testCid := range testCids { deal := model.Deal{ State: model.DealActive, PieceCID: model.CID(testCid), Provider: "apples" + strconv.Itoa(i), - Wallet: wallet, + Wallet: &model.Wallet{}, } err = db.Create(&deal).Error require.NoError(b, err) @@ -510,7 +502,7 @@ func BenchmarkFilecoinRetrieve(b *testing.B) { State: state, PieceCID: model.CID(testCid), Provider: "oranges" + strconv.Itoa(i), - Wallet: wallet, + Wallet: &model.Wallet{}, } err = db.Create(&deal).Error require.NoError(b, err) diff --git a/handler/wallet/attach.go b/handler/wallet/attach.go index c02d1b9c..e2b374bf 100644 --- a/handler/wallet/attach.go +++ b/handler/wallet/attach.go @@ -38,7 +38,7 @@ func (DefaultHandler) AttachHandler( } var w model.Wallet - err = w.FindByIDOrAddr(db, wallet) + err = db.Where("address = ? OR id = ?", wallet, wallet).First(&w).Error if errors.Is(err, gorm.ErrRecordNotFound) { return nil, errors.Wrapf(handlererror.ErrNotFound, "wallet %s not found", wallet) } diff --git a/handler/wallet/attach_test.go b/handler/wallet/attach_test.go index 9a8ddca9..1a0ee203 100644 --- a/handler/wallet/attach_test.go +++ b/handler/wallet/attach_test.go @@ -14,7 +14,7 @@ import ( func TestAttachHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Wallet{ - ActorID: "test", + ID: "test", }).Error require.NoError(t, err) err = db.Create(&model.Preparation{}).Error diff --git a/handler/wallet/create.go b/handler/wallet/create.go deleted file mode 100644 index 3bd7f118..00000000 --- a/handler/wallet/create.go +++ /dev/null @@ -1,154 +0,0 @@ -package wallet - -import ( - "context" - "crypto/rand" - "encoding/base64" - "encoding/hex" - "encoding/json" - - "github.com/cockroachdb/errors" - "github.com/data-preservation-programs/singularity/database" - "github.com/data-preservation-programs/singularity/handler/handlererror" - "github.com/data-preservation-programs/singularity/model" - "github.com/data-preservation-programs/singularity/util" - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-crypto" - g1 "github.com/phoreproject/bls/g1pubs" - "golang.org/x/xerrors" - "gorm.io/gorm" -) - -type KeyType string - -const ( - KTSecp256k1 KeyType = "secp256k1" - KTBLS KeyType = "bls" - // TODO: add support for "delegated" or "secp256k1-ledger" types? -) - -func (kt KeyType) String() string { - return string(kt) -} - -// GenerateKey generates a new keypair and returns the private key and address. -// The keypair is generated using the specified key type (secp256k1 or BLS). -func GenerateKey(keyType string) (string, string, error) { - var privKey string - var addr address.Address - var err error - - switch keyType { - case KTSecp256k1.String(): - kb := make([]byte, 32) - _, err = rand.Read(kb) - if err != nil { - return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) - } - - // Format the private key as a Lotus exported key (JSON format) - privKeyJSON := map[string]interface{}{ - "Type": "secp256k1", - "PrivateKey": base64.StdEncoding.EncodeToString(kb), - } - - privKeyBytes, err := json.Marshal(privKeyJSON) - if err != nil { - return "", "", xerrors.Errorf("failed to marshal private key to JSON: %w", err) - } - privKey = hex.EncodeToString(privKeyBytes) - - // Get the public key from private key - pubKey := crypto.PublicKey(kb) - addr, err = address.NewSecp256k1Address(pubKey) - if err != nil { - return "", "", xerrors.Errorf("failed to generate address from %s key: %w", keyType, err) - } - case KTBLS.String(): - priv, err := g1.RandKey(rand.Reader) - if err != nil { - return "", "", xerrors.Errorf("failed to generate %s private key: %w", keyType, err) - } - - // Format the private key as a Lotus exported key (JSON format) - // Convert the private key to base64 format - privKeyBytes := priv.Serialize() - privKeyJSON := map[string]interface{}{ - "Type": "bls", - "PrivateKey": base64.StdEncoding.EncodeToString(privKeyBytes[:]), - } - - privKeyJSONBytes, err := json.Marshal(privKeyJSON) - if err != nil { - return "", "", xerrors.Errorf("failed to marshal private key to JSON: %w", err) - } - privKey = hex.EncodeToString(privKeyJSONBytes) - - // Get the public key from private key - pub := g1.PrivToPub(priv) - pubKey := pub.Serialize() - addr, err = address.NewBLSAddress(pubKey[:]) - if err != nil { - return "", "", xerrors.Errorf("failed to generate address from %s key: %w", keyType, err) - } - default: - return "", "", xerrors.Errorf("unsupported key type: %s", keyType) - } - - return privKey, addr.String(), nil -} - -type CreateRequest struct { - KeyType string `json:"keyType"` // This is either "secp256k1" or "bls" -} - -// @ID CreateWallet -// @Summary Create new wallet -// @Tags Wallet -// @Accept json -// @Produce json -// @Param request body CreateRequest true "Request body" -// @Success 200 {object} model.Wallet -// @Failure 400 {object} api.HTTPError -// @Failure 500 {object} api.HTTPError -// @Router /wallet/create [post] -func _() {} - -// CreateHandler creates a new wallet using offline keypair generation and a new record in the local database. -// -// Parameters: -// - ctx: The context for database transactions and other operations. -// - db: A pointer to the gorm.DB instance representing the database connection. -// -// Returns: -// - A pointer to the created Wallet model if successful. -// - An error, if any occurred during the database insert operation. -func (DefaultHandler) CreateHandler( - ctx context.Context, - db *gorm.DB, - request CreateRequest, -) (*model.Wallet, error) { - db = db.WithContext(ctx) - - // Generate a new keypair - privateKey, address, err := GenerateKey(request.KeyType) - if err != nil { - return nil, errors.WithStack(err) - } - - wallet := model.Wallet{ - Address: address, - PrivateKey: privateKey, - } - err = database.DoRetry(ctx, func() error { - return db.Create(&wallet).Error - }) - if util.IsDuplicateKeyError(err) { - return nil, errors.Wrap(handlererror.ErrDuplicateRecord, "wallet already exists") - } - if err != nil { - return nil, errors.WithStack(err) - } - - return &wallet, nil -} diff --git a/handler/wallet/create_test.go b/handler/wallet/create_test.go deleted file mode 100644 index a966c48f..00000000 --- a/handler/wallet/create_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package wallet - -import ( - "context" - "testing" - - "github.com/data-preservation-programs/singularity/util/testutil" - "github.com/stretchr/testify/require" - "gorm.io/gorm" -) - -func TestCreateHandler(t *testing.T) { - testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - t.Run("success-secp256k1", func(t *testing.T) { - w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTSecp256k1.String()}) - require.NoError(t, err) - require.NotEmpty(t, w.Address) - require.Equal(t, "f1", w.Address[:2]) - require.NotEmpty(t, w.PrivateKey) - }) - - t.Run("success-bls", func(t *testing.T) { - w, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: KTBLS.String()}) - require.NoError(t, err) - require.NotEmpty(t, w.Address) - require.Equal(t, "f3", w.Address[:2]) - require.NotEmpty(t, w.PrivateKey) - }) - - t.Run("invalid-key-type", func(t *testing.T) { - _, err := Default.CreateHandler(ctx, db, CreateRequest{KeyType: "invalid-type"}) - require.Error(t, err) - }) - }) -} diff --git a/handler/wallet/detach.go b/handler/wallet/detach.go index 6ea3d8d6..7dee510f 100644 --- a/handler/wallet/detach.go +++ b/handler/wallet/detach.go @@ -39,7 +39,7 @@ func (DefaultHandler) DetachHandler( } found, err := underscore.Find(preparation.Wallets, func(w model.Wallet) bool { - return w.ActorID == wallet || w.Address == wallet + return w.ID == wallet || w.Address == wallet }) if err != nil { return nil, errors.Wrapf(handlererror.ErrNotFound, "wallet %s not attached to preparation %d", wallet, preparationID) diff --git a/handler/wallet/detach_test.go b/handler/wallet/detach_test.go index eba0205f..268da587 100644 --- a/handler/wallet/detach_test.go +++ b/handler/wallet/detach_test.go @@ -15,7 +15,7 @@ func TestDetachHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "test", + ID: "test", }}, }).Error require.NoError(t, err) diff --git a/handler/wallet/import.go b/handler/wallet/import.go index e27c162c..3775d8cc 100644 --- a/handler/wallet/import.go +++ b/handler/wallet/import.go @@ -73,7 +73,7 @@ func (DefaultHandler) ImportHandler( } wallet := model.Wallet{ - ActorID: result, + ID: result, Address: result[:1] + addr.String()[1:], PrivateKey: request.PrivateKey, } diff --git a/handler/wallet/interface.go b/handler/wallet/interface.go index 0a88d848..163dc1c6 100644 --- a/handler/wallet/interface.go +++ b/handler/wallet/interface.go @@ -17,11 +17,6 @@ type Handler interface { preparation string, wallet string, ) (*model.Preparation, error) - CreateHandler( - ctx context.Context, - db *gorm.DB, - request CreateRequest, - ) (*model.Wallet, error) DetachHandler( ctx context.Context, db *gorm.DB, @@ -65,11 +60,6 @@ func (m *MockWallet) AttachHandler(ctx context.Context, db *gorm.DB, preparation return args.Get(0).(*model.Preparation), args.Error(1) } -func (m *MockWallet) CreateHandler(ctx context.Context, db *gorm.DB, request CreateRequest) (*model.Wallet, error) { - args := m.Called(ctx, db, request) - return args.Get(0).(*model.Wallet), args.Error(1) -} - func (m *MockWallet) DetachHandler(ctx context.Context, db *gorm.DB, preparation string, wallet string) (*model.Preparation, error) { args := m.Called(ctx, db, preparation, wallet) return args.Get(0).(*model.Preparation), args.Error(1) diff --git a/handler/wallet/listattached_test.go b/handler/wallet/listattached_test.go index 9f830d84..26fb17fc 100644 --- a/handler/wallet/listattached_test.go +++ b/handler/wallet/listattached_test.go @@ -15,7 +15,7 @@ func TestListAttachedHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { err := db.Create(&model.Preparation{ Wallets: []model.Wallet{{ - ActorID: "test", + ID: "test", }}, }).Error require.NoError(t, err) diff --git a/handler/wallet/remove.go b/handler/wallet/remove.go index 30a37eec..cb5ecbfd 100644 --- a/handler/wallet/remove.go +++ b/handler/wallet/remove.go @@ -2,7 +2,6 @@ package wallet import ( "context" - "strconv" "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/database" @@ -28,12 +27,7 @@ func (DefaultHandler) RemoveHandler( db = db.WithContext(ctx) var affected int64 err := database.DoRetry(ctx, func() error { - var tx *gorm.DB - if id, err := strconv.Atoi(address); err == nil { - tx = db.Where("id = ?", id).Delete(&model.Wallet{}) - } else { - tx = db.Where("address = ? OR actor_id = ?", address, address).Delete(&model.Wallet{}) - } + tx := db.Where("address = ? OR id = ?", address, address).Delete(&model.Wallet{}) affected = tx.RowsAffected return tx.Error }) diff --git a/handler/wallet/remove_test.go b/handler/wallet/remove_test.go index 8539cc96..dd52ecc0 100644 --- a/handler/wallet/remove_test.go +++ b/handler/wallet/remove_test.go @@ -15,7 +15,7 @@ func TestRemoveHandler(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { t.Run("success", func(t *testing.T) { err := db.Create(&model.Wallet{ - ActorID: "test", + ID: "test", }).Error require.NoError(t, err) err = Default.RemoveHandler(ctx, db, "test") diff --git a/migrate/migrate-dataset.go b/migrate/migrate-dataset.go index 38c97b54..db3c5c74 100644 --- a/migrate/migrate-dataset.go +++ b/migrate/migrate-dataset.go @@ -263,9 +263,9 @@ func MigrateDataset(cctx *cli.Context) error { return errors.Wrap(err, "failed to connect to mongo") } - err = model.GetMigrator(db).Migrate() + err = model.AutoMigrate(db) if err != nil { - return errors.Wrap(err, "failed to migrate database") + return errors.Wrap(err, "failed to auto-migrate database") } resp, err := mg.Database("singularity").Collection("scanningrequests").Find(ctx, bson.M{}) diff --git a/migrate/migrations/202505010830_initial_schema.go b/migrate/migrations/202505010830_initial_schema.go deleted file mode 100644 index 989f3795..00000000 --- a/migrate/migrations/202505010830_initial_schema.go +++ /dev/null @@ -1,249 +0,0 @@ -package migrations - -import ( - "strconv" - "time" - - "github.com/go-gormigrate/gormigrate/v2" - "github.com/ipfs/go-cid" - "github.com/pkg/errors" - "gorm.io/gorm" -) - -// NOTE: This recreates original models at time of transition from AutoMigrate -// to versioned migrations so that future modifications to the actual models -// don't change this initial schema definition. -type StringSlice []string -type ConfigMap map[string]string -type CID cid.Cid -type ClientConfig struct { - ConnectTimeout *time.Duration `cbor:"1,keyasint,omitempty" json:"connectTimeout,omitempty" swaggertype:"primitive,integer"` // HTTP Client Connect timeout - Timeout *time.Duration `cbor:"2,keyasint,omitempty" json:"timeout,omitempty" swaggertype:"primitive,integer"` // IO idle timeout - ExpectContinueTimeout *time.Duration `cbor:"3,keyasint,omitempty" json:"expectContinueTimeout,omitempty" swaggertype:"primitive,integer"` // Timeout when using expect / 100-continue in HTTP - InsecureSkipVerify *bool `cbor:"4,keyasint,omitempty" json:"insecureSkipVerify,omitempty"` // Do not verify the server SSL certificate (insecure) - NoGzip *bool `cbor:"5,keyasint,omitempty" json:"noGzip,omitempty"` // Don't set Accept-Encoding: gzip - UserAgent *string `cbor:"6,keyasint,omitempty" json:"userAgent,omitempty"` // Set the user-agent to a specified string - CaCert []string `cbor:"7,keyasint,omitempty" json:"caCert,omitempty"` // Paths to CA certificate used to verify servers - ClientCert *string `cbor:"8,keyasint,omitempty" json:"clientCert,omitempty"` // Path to Client SSL certificate (PEM) for mutual TLS auth - ClientKey *string `cbor:"9,keyasint,omitempty" json:"clientKey,omitempty"` // Path to Client SSL private key (PEM) for mutual TLS auth - Headers map[string]string `cbor:"10,keyasint,omitempty" json:"headers,omitempty"` // Set HTTP header for all transactions - DisableHTTP2 *bool `cbor:"11,keyasint,omitempty" json:"disableHttp2,omitempty"` // Disable HTTP/2 in the transport - DisableHTTPKeepAlives *bool `cbor:"12,keyasint,omitempty" json:"disableHttpKeepAlives,omitempty"` // Disable HTTP keep-alives and use each connection once. - RetryMaxCount *int `cbor:"13,keyasint,omitempty" json:"retryMaxCount,omitempty"` // Maximum number of retries. Default is 10 retries. - RetryDelay *time.Duration `cbor:"14,keyasint,omitempty" json:"retryDelay,omitempty" swaggertype:"primitive,integer"` // Delay between retries. Default is 1s. - RetryBackoff *time.Duration `cbor:"15,keyasint,omitempty" json:"retryBackoff,omitempty" swaggertype:"primitive,integer"` // Constant backoff between retries. Default is 1s. - RetryBackoffExponential *float64 `cbor:"16,keyasint,omitempty" json:"retryBackoffExponential,omitempty"` // Exponential backoff between retries. Default is 1.0. - SkipInaccessibleFile *bool `cbor:"17,keyasint,omitempty" json:"skipInaccessibleFile,omitempty"` // Skip inaccessible files. Default is false. - UseServerModTime *bool `cbor:"18,keyasint,omitempty" json:"useServerModTime,omitempty"` // Use server modified time instead of object metadata - LowLevelRetries *int `cbor:"19,keyasint,omitempty" json:"lowlevelRetries,omitempty"` // Maximum number of retries for low-level client errors. Default is 10 retries. - ScanConcurrency *int `cbor:"20,keyasint,omitempty" json:"scanConcurrency,omitempty"` // Maximum number of concurrent scan requests. Default is 1. -} -type WorkerType string -type Worker struct { - ID string `gorm:"primaryKey" json:"id"` - LastHeartbeat time.Time `json:"lastHeartbeat"` - Hostname string `json:"hostname"` - Type WorkerType `json:"type"` -} -type Global struct { - Key string `gorm:"primaryKey" json:"key"` - Value string `json:"value"` -} -type Wallet struct { - ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet -} -type PreparationID uint32 -type Preparation struct { - ID PreparationID `gorm:"primaryKey" json:"id"` - Name string `gorm:"unique" json:"name"` - CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` - DeleteAfterExport bool `json:"deleteAfterExport"` // DeleteAfterExport is a flag that indicates whether the source files should be deleted after export. - MaxSize int64 `json:"maxSize"` - PieceSize int64 `json:"pieceSize"` - NoInline bool `json:"noInline"` - NoDag bool `json:"noDag"` - Wallets []Wallet `gorm:"many2many:wallet_assignments" json:"wallets,omitempty" swaggerignore:"true" table:"expand"` - SourceStorages []Storage `gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"sourceStorages,omitempty" table:"expand;header:Source Storages:"` - OutputStorages []Storage `gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"outputStorages,omitempty" table:"expand;header:Output Storages:"` -} - -func (s *Preparation) FindByIDOrName(db *gorm.DB, name string, preloads ...string) error { - id, err := strconv.ParseUint(name, 10, 32) - if err == nil { - for _, preload := range preloads { - db = db.Preload(preload) - } - return db.First(s, id).Error - } else { - for _, preload := range preloads { - db = db.Preload(preload) - } - return db.Where("name = ?", name).First(s).Error - } -} -func (s *Preparation) SourceAttachments(db *gorm.DB, preloads ...string) ([]SourceAttachment, error) { - for _, preload := range preloads { - db = db.Preload(preload) - } - var attachments []SourceAttachment - err := db.Where("preparation_id = ?", s.ID).Find(&attachments).Error - return attachments, errors.Wrap(err, "failed to find source attachments") -} - -type StorageID uint32 -type Storage struct { - ID StorageID `cbor:"-" gorm:"primaryKey" json:"id"` - Name string `cbor:"-" gorm:"unique" json:"name"` - CreatedAt time.Time `cbor:"-" json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `cbor:"-" json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` - Type string `cbor:"1,keyasint,omitempty" json:"type"` - Path string `cbor:"2,keyasint,omitempty" json:"path"` // Path is the path to the storage root. - Config ConfigMap `cbor:"3,keyasint,omitempty" gorm:"type:JSON" json:"config" table:"verbose"` // Config is a map of key-value pairs that can be used to store RClone options. - ClientConfig ClientConfig `cbor:"4,keyasint,omitempty" gorm:"type:JSON" json:"clientConfig" table:"verbose"` // ClientConfig is the HTTP configuration for the storage, if applicable. - PreparationsAsSource []Preparation `cbor:"-" gorm:"many2many:source_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsSource,omitempty" table:"expand;header:As Source: "` - PreparationsAsOutput []Preparation `cbor:"-" gorm:"many2many:output_attachments;constraint:OnDelete:CASCADE" json:"preparationsAsOutput,omitempty" table:"expand;header:As Output: "` -} -type ScheduleID uint32 -type ScheduleState string -type Schedule struct { - ID ScheduleID `gorm:"primaryKey" json:"id"` - CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` - URLTemplate string `json:"urlTemplate" table:"verbose"` - HTTPHeaders ConfigMap `gorm:"type:JSON" json:"httpHeaders" table:"verbose"` - Provider string `json:"provider"` - PricePerGBEpoch float64 `json:"pricePerGbEpoch" table:"verbose"` - PricePerGB float64 `json:"pricePerGb" table:"verbose"` - PricePerDeal float64 `json:"pricePerDeal" table:"verbose"` - TotalDealNumber int `json:"totalDealNumber" table:"verbose"` - TotalDealSize int64 `json:"totalDealSize"` - Verified bool `json:"verified"` - KeepUnsealed bool `json:"keepUnsealed" table:"verbose"` - AnnounceToIPNI bool `gorm:"column:announce_to_ipni" json:"announceToIpni" table:"verbose"` - StartDelay time.Duration `json:"startDelay" swaggertype:"primitive,integer"` - Duration time.Duration `json:"duration" swaggertype:"primitive,integer"` - State ScheduleState `json:"state"` - ScheduleCron string `json:"scheduleCron"` - ScheduleCronPerpetual bool `json:"scheduleCronPerpetual"` - ScheduleDealNumber int `json:"scheduleDealNumber"` - ScheduleDealSize int64 `json:"scheduleDealSize"` - MaxPendingDealNumber int `json:"maxPendingDealNumber"` - MaxPendingDealSize int64 `json:"maxPendingDealSize"` - Notes string `json:"notes"` - ErrorMessage string `json:"errorMessage" table:"verbose"` - AllowedPieceCIDs StringSlice `gorm:"type:JSON;column:allowed_piece_cids" json:"allowedPieceCids" table:"verbose"` - Force bool `json:"force"` - PreparationID PreparationID `json:"preparationId"` - Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` -} -type DealState string -type DealID uint64 -type Deal struct { - ID DealID `gorm:"primaryKey" json:"id" table:"verbose"` - CreatedAt time.Time `json:"createdAt" table:"verbose;format:2006-01-02 15:04:05"` - UpdatedAt time.Time `json:"updatedAt" table:"verbose;format:2006-01-02 15:04:05"` - LastVerifiedAt *time.Time `json:"lastVerifiedAt" table:"verbose;format:2006-01-02 15:04:05"` // LastVerifiedAt is the last time the deal was verified as active by the tracker - DealID *uint64 `gorm:"unique" json:"dealId"` - State DealState `gorm:"index:idx_pending" json:"state"` - Provider string `json:"provider"` - ProposalID string `json:"proposalId" table:"verbose"` - Label string `json:"label" table:"verbose"` - PieceCID CID `gorm:"column:piece_cid;index;size:255" json:"pieceCid" swaggertype:"string"` - PieceSize int64 `json:"pieceSize"` - StartEpoch int32 `json:"startEpoch"` - EndEpoch int32 `json:"endEpoch" table:"verbose"` - SectorStartEpoch int32 `json:"sectorStartEpoch" table:"verbose"` - Price string `json:"price"` - Verified bool `json:"verified"` - ErrorMessage string `json:"errorMessage" table:"verbose"` - ScheduleID *ScheduleID `json:"scheduleId" table:"verbose"` - Schedule *Schedule `gorm:"foreignKey:ScheduleID;constraint:OnDelete:SET NULL" json:"schedule,omitempty" swaggerignore:"true" table:"expand"` - ClientID string `gorm:"index:idx_pending" json:"clientId"` - Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` -} -type OutputAttachment struct { - ID uint32 `gorm:"primaryKey"` - PreparationID PreparationID - StorageID StorageID -} -type SourceAttachment struct { - ID uint32 `gorm:"primaryKey"` - PreparationID PreparationID - StorageID StorageID -} -type Job struct { - ID uint32 `gorm:"primaryKey"` - PreparationID PreparationID - Status string - CreatedAt time.Time -} -type File struct { - ID uint32 `gorm:"primaryKey"` - Path string - Size int64 - ModifiedAt time.Time -} -type FileRange struct { - ID uint32 `gorm:"primaryKey"` - FileID uint32 - Offset int64 - Length int64 -} -type Directory struct { - ID uint32 `gorm:"primaryKey"` - Path string - Size int64 -} -type Car struct { - ID uint32 `gorm:"primaryKey"` - RootCID CID - Size int64 -} -type CarBlock struct { - ID uint32 `gorm:"primaryKey"` - CarID uint32 - CID CID - Size int64 -} - -// Create migration for initial database schema -func _202505010830_initial_schema() *gormigrate.Migration { - var InitTables = []any{ - &Worker{}, - &Global{}, - &Preparation{}, - &Storage{}, - &OutputAttachment{}, - &SourceAttachment{}, - &Job{}, - &File{}, - &FileRange{}, - &Directory{}, - &Car{}, - &CarBlock{}, - &Deal{}, - &Schedule{}, - &Wallet{}, - } - - return &gormigrate.Migration{ - ID: "202505010830", - Migrate: func(tx *gorm.DB) error { - // NOTE: this should match any existing database at the time of transition - // to versioned migration strategy - return tx.AutoMigrate(InitTables...) - }, - Rollback: func(tx *gorm.DB) error { - for _, table := range InitTables { - err := tx.Migrator().DropTable(table) - if err != nil { - return errors.Wrap(err, "failed to drop table") - } - } - return nil - }, - } -} diff --git a/migrate/migrations/202505010840_wallet_actor_id.go b/migrate/migrations/202505010840_wallet_actor_id.go deleted file mode 100644 index 2291f8f8..00000000 --- a/migrate/migrations/202505010840_wallet_actor_id.go +++ /dev/null @@ -1,173 +0,0 @@ -package migrations - -import ( - "fmt" - "time" - - "github.com/go-gormigrate/gormigrate/v2" - "gorm.io/gorm" -) - -// Create migration for initial database schema -func _202505010840_wallet_actor_id() *gormigrate.Migration { - // Table names - const WALLET_TABLE = "wallets" - const DEAL_TABLE = "deals" - - // Temporary struct for old Wallet schema - type OldWallet struct { - ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet - Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - } - - type WalletType string - const ( - UserWallet WalletType = "UserWallet" - SPWallet WalletType = "SPWallet" - ) - - type WalletID uint - - // Temporary struct for new Wallet schema - type NewWallet struct { - ID WalletID `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet - ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet - Balance float64 `json:"balance"` // Balance is in Fil cached from chain - BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain - ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets - Location string `json:"location"` // Location is optional region, country for SP wallets - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - WalletType WalletType `gorm:"default:'UserWallet'" json:"walletType"` - } - - type NewDeal struct { - ID uint64 `gorm:"column:id"` - ClientActorID string `json:"clientActorId"` - ClientID *WalletID `gorm:"index:idx_pending" json:"clientId"` - Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` - } - type OldDeal struct { - ID uint64 `gorm:"column:id"` - ClientID string `gorm:"index:idx_pending" json:"clientId"` - Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` - } - - return &gormigrate.Migration{ - ID: "202505010840", - Migrate: func(tx *gorm.DB) error { - // Create new table - if err := tx.Migrator().AutoMigrate(&NewWallet{}); err != nil { - return fmt.Errorf("failed to create new wallets table: %w", err) - } - - // Copy data from old to new table - var oldWallets []OldWallet - if err := tx.Table(WALLET_TABLE).Find(&oldWallets).Error; err != nil { - return err - } - // Create map to store old ID => new ID of wallet - idMap := make(map[string]WalletID) - for _, oldWallet := range oldWallets { - newWallet := NewWallet{ - ActorID: oldWallet.ID, - Address: oldWallet.Address, - PrivateKey: oldWallet.PrivateKey, - WalletType: UserWallet, - } - if err := tx.Create(&newWallet).Error; err != nil { - return err - } - idMap[newWallet.ActorID] = newWallet.ID - } - - // Modify Deals table to replace ActorID FK with new ID column - // Drop old FK constraint since Wallet ID type changed - if err := tx.Migrator().DropConstraint(DEAL_TABLE, "fk_deals_wallet"); err != nil { - // constraint might not exist or have different name, so continue on - fmt.Printf("Warning: could not drop foreign key constraint: %v\n", err) - } - // Rename old column to make it clear it's not the FK - if err := tx.Migrator().RenameColumn(DEAL_TABLE, "client_id", "client_actor_id"); err != nil { - return fmt.Errorf("failed to rename ClientID to ClientActorID: %w", err) - } - // Add new column for updated type - if err := tx.Table(DEAL_TABLE).Migrator().AddColumn(&NewDeal{}, "ClientID"); err != nil { - return fmt.Errorf("failed to create new client_id column: %w", err) - } - // Update data using ID map - var dealRows []NewDeal - if err := tx.Table(DEAL_TABLE).Select("id, client_actor_id, client_id").Find(&dealRows).Error; err != nil { - return fmt.Errorf("failed to fetch deal rows: %w", err) - } - for _, deal := range dealRows { - if err := tx.Table(DEAL_TABLE).Where("id = ?", deal.ID).Update("client_id", idMap[deal.ClientActorID]).Error; err != nil { - return fmt.Errorf("failed to update deal %d with new ClientID: %w", deal.ID, err) - } - } - - // Add new FK constraint on deals table - if err := tx.Table(DEAL_TABLE).Migrator().CreateConstraint(&NewDeal{}, "Wallet"); err != nil { - return fmt.Errorf("failed to add foreign key constraint: %w", err) - } - - // Drop old wallets table and rename new wallets table - if err := tx.Migrator().DropTable(WALLET_TABLE); err != nil { - return err - } - return tx.Migrator().RenameTable(&NewWallet{}, WALLET_TABLE) - }, - Rollback: func(tx *gorm.DB) error { - // Create old table - err := tx.Migrator().CreateTable(&OldWallet{}) - if err != nil { - return err - } - - // Copy data from new to old table - var newWallets []NewWallet - if err := tx.Table(WALLET_TABLE).Find(&newWallets).Error; err != nil { - return err - } - - for _, newWallet := range newWallets { - oldWallet := OldWallet{ - ID: newWallet.ActorID, - Address: newWallet.Address, - PrivateKey: newWallet.PrivateKey, - } - if err := tx.Create(&oldWallet).Error; err != nil { - return err - } - } - - // Modify Deal table back to original FK - // Drop old FK constraint since Wallet ID type changed - if err := tx.Migrator().DropConstraint(DEAL_TABLE, "fk_deals_wallet"); err != nil { - // constraint might not exist or have different name, so continue on - fmt.Printf("Warning: could not drop foreign key constraint: %v\n", err) - } - // Drop new column - if err := tx.Table(DEAL_TABLE).Migrator().DropColumn(&NewDeal{}, "ClientID"); err != nil { - return fmt.Errorf("failed to drop ClientID column: %w", err) - } - // Rename old column back to FK - if err := tx.Migrator().RenameColumn(DEAL_TABLE, "client_actor_id", "client_id"); err != nil { - return fmt.Errorf("failed to rename ClientID to ClientActorID: %w", err) - } - // Add original constraint back - if err := tx.Table(DEAL_TABLE).Migrator().CreateConstraint(&OldDeal{}, "Wallet"); err != nil { - return fmt.Errorf("failed to add foreign key constraint: %w", err) - } - - // Drop new table and rename old table - if err := tx.Migrator().DropTable(WALLET_TABLE); err != nil { - return err - } - return tx.Migrator().RenameTable(&OldWallet{}, WALLET_TABLE) - }, - } -} diff --git a/migrate/migrations/migrations.go b/migrate/migrations/migrations.go deleted file mode 100644 index 8931f781..00000000 --- a/migrate/migrations/migrations.go +++ /dev/null @@ -1,13 +0,0 @@ -package migrations - -import ( - "github.com/go-gormigrate/gormigrate/v2" -) - -// Get collection of all migrations in order -func GetMigrations() []*gormigrate.Migration { - return []*gormigrate.Migration{ - _202505010830_initial_schema(), - _202505010840_wallet_actor_id(), - } -} diff --git a/model/basetypes.go b/model/basetypes.go index 85527f00..2341d85f 100644 --- a/model/basetypes.go +++ b/model/basetypes.go @@ -8,9 +8,10 @@ import ( "strings" "time" + "slices" + "github.com/cockroachdb/errors" "github.com/ipfs/go-cid" - "slices" ) var ( diff --git a/model/migrate.go b/model/migrate.go index 2a8a945d..b2953c42 100644 --- a/model/migrate.go +++ b/model/migrate.go @@ -5,8 +5,6 @@ import ( "encoding/base64" "github.com/cockroachdb/errors" - "github.com/data-preservation-programs/singularity/migrate/migrations" - "github.com/go-gormigrate/gormigrate/v2" "github.com/google/uuid" logging "github.com/ipfs/go-log/v2" "gorm.io/gorm" @@ -33,161 +31,78 @@ var Tables = []any{ var logger = logging.Logger("model") -// Options for gormigrate instance -var options = &gormigrate.Options{ - TableName: "migrations", - IDColumnName: "id", - IDColumnSize: 255, - UseTransaction: false, - ValidateUnknownMigrations: false, -} - -// NOTE: this NEEDS to match the values in MigrationOptions above +// AutoMigrate attempts to automatically migrate the database schema. // -// type struct { -// ID string `gorm:"primaryKey;column:;size:"` -// } -type migration struct { - ID string `gorm:"primaryKey;column:id;size:255"` -} - -// Handle initializing any database if no migrations are found -// -// In the case of existing database: -// 1. Migrations table is created and first migration is inserted, which should match the existing, if outdated, data -// 2. Any remaining migrations are run -// -// In the case of a new database: -// 1. Automatically migrates the tables in the database to match the current structures defined in the application. +// This function performs a few operations: +// 1. Automatically migrates the tables in the database to match the structures defined in the application. // 2. Creates an instance ID if it doesn't already exist. // 3. Generates a new encryption salt and stores it in the database if it doesn't already exist. -func _init(db *gorm.DB) error { - logger.Info("Initializing database") - - // If this is an existing database before versioned migration strategy was implemented - if db.Migrator().HasTable("wallets") && !db.Migrator().HasColumn("wallets", "actor_id") { - // NOTE: We're going to have to recreate some internals of Gormigrate. It would be cleaner - // to use them directly but they're private methods. The general idea is to run all the - // migration functions _except_ the first which is hopefully the state of the database - // when they were on the older automigrate strategy. - logger.Info("Manually creating versioned migration table in existing database") - - // Create migrations table - err := db.Table(options.TableName).AutoMigrate(&migration{}) - if err != nil { - return errors.Wrap(err, "failed to create migrations table on init") - } - - logger.Info("Manually running missing migrations") - // Skip first migration, run the rest to get current - for _, m := range migrations.GetMigrations()[1:] { - err = m.Migrate(db) - if err != nil { - return errors.Wrap(err, "failed to run migration with ID: "+m.ID) - } - } - } else { - logger.Info("Auto migrating tables in clean database") - // This is a brand new database, run automigrate script on current schema - err := db.AutoMigrate(Tables...) - if err != nil { - return errors.Wrap(err, "failed to auto migrate") - } - - logger.Debug("Creating instance id") - err = db.Clauses(clause.OnConflict{ - DoNothing: true, - }).Create(&Global{Key: "instance_id", Value: uuid.NewString()}).Error - if err != nil { - return errors.Wrap(err, "failed to create instance id") - } - - salt := make([]byte, 8) - _, err = rand.Read(salt) - if err != nil { - return errors.Wrap(err, "failed to generate salt") - } - encoded := base64.StdEncoding.EncodeToString(salt) - row := Global{ - Key: "salt", - Value: encoded, - } - - logger.Debug("Creating encryption salt") - err = db.Clauses(clause.OnConflict{ - DoNothing: true, - }).Create(row).Error - if err != nil { - return errors.Wrap(err, "failed to create salt") - } +// +// The purpose of the auto-migration feature is to simplify schema changes and manage +// basic system configurations without manually altering the database. This is especially +// useful during development or when deploying updates that include schema changes. +// +// Parameters: +// - db: A pointer to a gorm.DB object, which provides database access. +// +// Returns: +// - An error if any issues arise during the process, otherwise nil. +func AutoMigrate(db *gorm.DB) error { + logger.Info("Auto migrating tables") + err := db.AutoMigrate(Tables...) + if err != nil { + return errors.Wrap(err, "failed to auto migrate") } - return nil -} - -type migrator struct { - gormigrate.Gormigrate - db *gorm.DB - Options gormigrate.Options -} - -// Drop all current database tables -func (m *migrator) DropAll() error { - tables, err := m.db.Migrator().GetTables() + logger.Debug("Creating instance id") + err = db.Clauses(clause.OnConflict{ + DoNothing: true, + }).Create(&Global{Key: "instance_id", Value: uuid.NewString()}).Error if err != nil { - return errors.Wrap(err, "Failed to get tables") - } - for _, t := range tables { - err = m.db.Migrator().DropTable(t) - if err != nil { - return errors.Wrap(err, "Failed to drop all tables") - } + return errors.Wrap(err, "failed to create instance id") } - return nil -} -// Get all migrations run -func (m *migrator) GetMigrationsRun() ([]migration, error) { - var migrations []migration - err := m.db.Find(&migrations).Error + salt := make([]byte, 8) + _, err = rand.Read(salt) if err != nil { - return nil, err + return errors.Wrap(err, "failed to generate salt") + } + encoded := base64.StdEncoding.EncodeToString(salt) + row := Global{ + Key: "salt", + Value: encoded, } - return migrations, nil -} -// Get ID of last migration ran -func (m *migrator) GetLastMigration() (string, error) { - migrations, err := m.GetMigrationsRun() - if len(migrations) == 0 || err != nil { - return "", err + logger.Debug("Creating encryption salt") + err = db.Clauses(clause.OnConflict{ + DoNothing: true, + }).Create(row).Error + if err != nil { + return errors.Wrap(err, "failed to create salt") } - return migrations[len(migrations)-1].ID, nil -} -// Has migration ID ran -func (m *migrator) HasRunMigration(id string) (bool, error) { - var count int64 - err := m.db.Table(m.Options.TableName).Where(m.Options.IDColumnName+" = ?", id).Count(&count).Error - return count > 0, err + return nil } -// Setup new Gormigrate instance +// DropAll removes all tables specified in the Tables slice from the database. +// +// This function is typically used during development or testing where a clean database +// slate is required. It iterates over the predefined Tables list and drops each table. +// Care should be taken when using this function in production environments as it will +// result in data loss. // // Parameters: // - db: A pointer to a gorm.DB object, which provides database access. // // Returns: -// - A migration interface -func GetMigrator(db *gorm.DB) *migrator { - g := gormigrate.New(db, options, migrations.GetMigrations()) - - // Initialize database with current schema if no previous migrations are found - g.InitSchema(_init) - - return &migrator{ - *g, - db, - *options, +// - An error if any issues arise during the table drop process, otherwise nil. +func DropAll(db *gorm.DB) error { + logger.Info("Dropping all tables") + for _, table := range Tables { + err := db.Migrator().DropTable(table) + if err != nil { + return errors.Wrap(err, "failed to drop table") + } } + return nil } diff --git a/model/replication.go b/model/replication.go index 9a2e69e2..4bcada94 100644 --- a/model/replication.go +++ b/model/replication.go @@ -4,9 +4,6 @@ import ( "fmt" "strconv" "time" - - "github.com/cockroachdb/errors" - "gorm.io/gorm" ) type DealState string @@ -84,7 +81,6 @@ type Deal struct { LastVerifiedAt *time.Time `json:"lastVerifiedAt" table:"verbose;format:2006-01-02 15:04:05"` // LastVerifiedAt is the last time the deal was verified as active by the tracker DealID *uint64 `gorm:"unique" json:"dealId"` State DealState `gorm:"index:idx_pending" json:"state"` - ClientActorID string `json:"clientActorId"` Provider string `json:"provider"` ProposalID string `json:"proposalId" table:"verbose"` Label string `json:"label" table:"verbose"` @@ -100,13 +96,13 @@ type Deal struct { // Associations ScheduleID *ScheduleID `json:"scheduleId" table:"verbose"` Schedule *Schedule `gorm:"foreignKey:ScheduleID;constraint:OnDelete:SET NULL" json:"schedule,omitempty" swaggerignore:"true" table:"expand"` - ClientID *WalletID `gorm:"index:idx_pending" json:"clientId"` + ClientID string `gorm:"index:idx_pending" json:"clientId"` Wallet *Wallet `gorm:"foreignKey:ClientID;constraint:OnDelete:SET NULL" json:"wallet,omitempty" swaggerignore:"true" table:"expand"` } // Key returns a mostly unique key to match deal from locally proposed deals and deals from the chain. func (d Deal) Key() string { - return fmt.Sprintf("%s-%s-%s-%d-%d", d.ClientActorID, d.Provider, d.PieceCID.String(), d.StartEpoch, d.EndEpoch) + return fmt.Sprintf("%s-%s-%s-%d-%d", d.ClientID, d.Provider, d.PieceCID.String(), d.StartEpoch, d.EndEpoch) } type ScheduleID uint32 @@ -145,49 +141,8 @@ type Schedule struct { Preparation *Preparation `gorm:"foreignKey:PreparationID;constraint:OnDelete:CASCADE" json:"preparation,omitempty" swaggerignore:"true" table:"expand"` } -// WalletType distinguishes between user wallets and storage provider wallets -type WalletType string - -const ( - UserWallet WalletType = "UserWallet" - SPWallet WalletType = "SPWallet" -) - -var WalletTypes = []WalletType{ - UserWallet, - SPWallet, -} - -var WalletTypeStrings = []string{ - string(UserWallet), - string(SPWallet), -} - -type WalletID uint - type Wallet struct { - ID WalletID `gorm:"primaryKey" json:"id"` - ActorID string `gorm:"index;size:15" json:"actorId"` // ActorID is the short ID of the wallet - ActorName string `json:"actorName"` // ActorName is readable label for the wallet - Address string `gorm:"uniqueIndex;size:86" json:"address"` // Address is the Filecoin full address of the wallet - Balance float64 `json:"balance"` // Balance is in Fil cached from chain - BalancePlus float64 `json:"balancePlus"` // BalancePlus is in Fil+ cached from chain - BalanceUpdatedAt *time.Time `json:"balanceUpdatedAt" table:"verbose;format:2006-01-02 15:04:05"` // BalanceUpdatedAt is a timestamp when balance info was last pulled from chain - ContactInfo string `json:"contactInfo"` // ContactInfo is optional email for SP wallets - Location string `json:"location"` // Location is optional region, country for SP wallets - PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet - WalletType WalletType `gorm:"default:'UserWallet'" json:"walletType"` -} - -// Find Wallet by ID, ActorID, or Address -func (wallet *Wallet) FindByIDOrAddr(db *gorm.DB, param interface{}) error { - switch v := param.(type) { - case uint, uint64: - return db.Where("id = ?", v).First(wallet).Error - case string: - // TODO: should we determine whether "f0.." or "f1..", for example? - return db.Where("actor_id = ? OR address = ?", v, v).First(wallet).Error - default: - return errors.Errorf("unsupported parameter type: %T", param) - } + ID string `gorm:"primaryKey;size:15" json:"id"` // ID is the short ID of the wallet + Address string `gorm:"index" json:"address"` // Address is the Filecoin full address of the wallet + PrivateKey string `json:"privateKey,omitempty" table:"-"` // PrivateKey is the private key of the wallet } diff --git a/replication/makedeal.go b/replication/makedeal.go index d8dc039b..b074b2d7 100644 --- a/replication/makedeal.go +++ b/replication/makedeal.go @@ -5,10 +5,11 @@ import ( "encoding/base64" "encoding/json" "fmt" - "slices" "strings" "time" + "slices" + "github.com/cockroachdb/errors" "github.com/data-preservation-programs/singularity/analytics" "github.com/data-preservation-programs/singularity/model" @@ -517,7 +518,7 @@ func (d DealConfig) GetPrice(pieceSize int64, duration time.Duration) big.Int { func (d DealMakerImpl) MakeDeal(ctx context.Context, walletObj model.Wallet, car model.Car, dealConfig DealConfig, ) (*model.Deal, error) { - logger.Infow("making deal", "client", walletObj.ActorID, "pieceCID", car.PieceCID.String(), "provider", dealConfig.Provider) + logger.Infow("making deal", "client", walletObj.ID, "pieceCID", car.PieceCID.String(), "provider", dealConfig.Provider) now := time.Now().UTC() addr, err := address.NewFromString(walletObj.Address) if err != nil { @@ -588,14 +589,14 @@ func (d DealMakerImpl) MakeDeal(ctx context.Context, walletObj model.Wallet, } dealModel := &model.Deal{ - State: model.DealProposed, - ClientID: &walletObj.ID, - ClientActorID: walletObj.ActorID, - Provider: dealConfig.Provider, - Label: cid.Cid(car.RootCID).String(), - PieceCID: car.PieceCID, - PieceSize: car.PieceSize, - StartEpoch: int32(startEpoch), + State: model.DealProposed, + ClientID: walletObj.ID, + Provider: dealConfig.Provider, + Label: cid.Cid(car.RootCID).String(), + PieceCID: car.PieceCID, + PieceSize: car.PieceSize, + //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 + StartEpoch: int32(startEpoch), //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 EndEpoch: int32(endEpoch), Price: dealConfig.GetPrice(car.PieceSize, dealConfig.Duration).String(), @@ -634,7 +635,7 @@ func queueDealEvent(deal model.Deal) { DataCID: deal.Label, PieceSize: deal.PieceSize, Provider: deal.Provider, - Client: deal.ClientActorID, + Client: deal.ClientID, Verified: deal.Verified, StartEpoch: deal.StartEpoch, EndEpoch: deal.EndEpoch - deal.StartEpoch, diff --git a/replication/makedeal_test.go b/replication/makedeal_test.go index 81ca77ee..b1496c2f 100644 --- a/replication/makedeal_test.go +++ b/replication/makedeal_test.go @@ -116,7 +116,7 @@ func TestDealMaker_MakeDeal(t *testing.T) { maker := NewDealMaker(nil, client, time.Hour, time.Second) defer maker.Close() wallet := model.Wallet{ - ActorID: "f047684", + ID: "f047684", Address: addr, PrivateKey: key, } diff --git a/replication/wallet_test.go b/replication/wallet_test.go index 3a23394b..cc41d3d9 100644 --- a/replication/wallet_test.go +++ b/replication/wallet_test.go @@ -48,10 +48,10 @@ func TestDatacapWalletChooser_Choose(t *testing.T) { // Set up the test data wallets := []model.Wallet{ - {ActorID: "1", Address: "address1"}, - {ActorID: "2", Address: "address2"}, - {ActorID: "3", Address: "address3"}, - {ActorID: "4", Address: "address4"}, + {ID: "1", Address: "address1"}, + {ID: "2", Address: "address2"}, + {ID: "3", Address: "address3"}, + {ID: "4", Address: "address4"}, } // Set up expectations for the lotusClient mock @@ -82,11 +82,10 @@ func TestDatacapWalletChooser_Choose(t *testing.T) { err := db.Create(&wallets).Error require.NoError(t, err) err = db.Create(&model.Deal{ - ClientID: &wallets[2].ID, - ClientActorID: wallets[2].ActorID, - Verified: true, - State: model.DealProposed, - PieceSize: 500000, + ClientID: "3", + Verified: true, + State: model.DealProposed, + PieceSize: 500000, }).Error require.NoError(t, err) @@ -112,8 +111,8 @@ func TestRandomWalletChooser(t *testing.T) { chooser := &RandomWalletChooser{} ctx := context.Background() wallet, err := chooser.Choose(ctx, []model.Wallet{ - {ActorID: "1", Address: "address1"}, - {ActorID: "2", Address: "address2"}, + {ID: "1", Address: "address1"}, + {ID: "2", Address: "address2"}, }) require.NoError(t, err) require.Contains(t, wallet.Address, "address") diff --git a/service/dealpusher/dealpusher.go b/service/dealpusher/dealpusher.go index f687dd4c..a9f1a037 100644 --- a/service/dealpusher/dealpusher.go +++ b/service/dealpusher/dealpusher.go @@ -435,6 +435,9 @@ func NewDealPusher(db *gorm.DB, lotusURL string, } lotusClient := util.NewLotusClient(lotusURL, lotusToken) dealMaker := replication.NewDealMaker(lotusClient, h, time.Hour, time.Minute) + if err != nil { + return nil, errors.Wrap(err, "failed to init deal maker") + } return &DealPusher{ dbNoContext: db, activeScheduleCancelFunc: make(map[model.ScheduleID]context.CancelFunc), diff --git a/service/dealpusher/dealpusher_test.go b/service/dealpusher/dealpusher_test.go index ab1fe9ce..909d5ec4 100644 --- a/service/dealpusher/dealpusher_test.go +++ b/service/dealpusher/dealpusher_test.go @@ -41,8 +41,7 @@ func (m *MockDealMaker) MakeDeal(ctx context.Context, walletObj model.Wallet, ca deal.ID = 0 deal.PieceCID = car.PieceCID deal.PieceSize = car.PieceSize - deal.ClientID = &walletObj.ID - deal.ClientActorID = walletObj.ActorID + deal.ClientID = walletObj.ID deal.Provider = dealConfig.Provider deal.Verified = dealConfig.Verified deal.ProposalID = uuid.NewString() @@ -113,7 +112,7 @@ func TestDealMakerService_FailtoSend(t *testing.T) { SourceStorages: []model.Storage{{}}, Wallets: []model.Wallet{ { - ActorID: client, Address: "f0xx", + ID: client, Address: "f0xx", }, }}, State: model.ScheduleActive, @@ -169,7 +168,7 @@ func TestDealMakerService_Cron(t *testing.T) { SourceStorages: []model.Storage{{}}, Wallets: []model.Wallet{ { - ActorID: client, Address: "f0xx", + ID: client, Address: "f0xx", }, }}, State: model.ScheduleActive, @@ -264,7 +263,7 @@ func TestDealMakerService_ScheduleWithConstraints(t *testing.T) { SourceStorages: []model.Storage{{}}, Wallets: []model.Wallet{ { - ActorID: client, Address: "f0xx", + ID: client, Address: "f0xx", }, }}, State: model.ScheduleActive, @@ -368,12 +367,12 @@ func TestDealmakerService_Force(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() provider := "f0miner" - clientActorID := "f0client" + client := "f0client" schedule := model.Schedule{ Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ActorID: clientActorID, Address: "f0xx", + ID: client, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -382,7 +381,6 @@ func TestDealmakerService_Force(t *testing.T) { Provider: provider, Force: true, } - clientID := &schedule.Preparation.Wallets[0].ID err = db.Create(&schedule).Error require.NoError(t, err) mockDealmaker.On("MakeDeal", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&model.Deal{ @@ -401,12 +399,11 @@ func TestDealmakerService_Force(t *testing.T) { require.NoError(t, err) err = db.Create([]model.Deal{ { - Provider: provider, - ClientID: clientID, - ClientActorID: clientActorID, - PieceCID: pieceCID, - PieceSize: 1024, - State: model.DealProposed, + Provider: provider, + ClientID: client, + PieceCID: pieceCID, + PieceSize: 1024, + State: model.DealProposed, }, }).Error require.NoError(t, err) @@ -429,12 +426,12 @@ func TestDealMakerService_MaxReplica(t *testing.T) { ctx, cancel := context.WithCancel(ctx) defer cancel() provider := "f0miner" - clientActorID := "f0client" + client := "f0client" schedule := model.Schedule{ Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ActorID: clientActorID, Address: "f0xx", + ID: client, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -442,7 +439,6 @@ func TestDealMakerService_MaxReplica(t *testing.T) { State: model.ScheduleActive, Provider: provider, } - clientID := &schedule.Preparation.Wallets[0].ID err = db.Create(&schedule).Error require.NoError(t, err) mockDealmaker.On("MakeDeal", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&model.Deal{ @@ -460,13 +456,12 @@ func TestDealMakerService_MaxReplica(t *testing.T) { require.NoError(t, err) err = db.Create([]model.Deal{ { - ScheduleID: &schedule.ID, - Provider: "another", - ClientID: clientID, - ClientActorID: clientActorID, - PieceCID: pieceCID, - PieceSize: 1024, - State: model.DealProposed, + ScheduleID: &schedule.ID, + Provider: "another", + ClientID: client, + PieceCID: pieceCID, + PieceSize: 1024, + State: model.DealProposed, }}).Error require.NoError(t, err) service.runOnce(ctx) @@ -497,12 +492,12 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { // All deal proposal will be accepted // Create test schedule provider := "f0miner" - clientActorID := "f0client" + client := "f0client" schedule := model.Schedule{ Preparation: &model.Preparation{ Wallets: []model.Wallet{ { - ActorID: clientActorID, Address: "f0xx", + ID: client, Address: "f0xx", }, }, SourceStorages: []model.Storage{{}}, @@ -511,7 +506,6 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { Provider: provider, AllowedPieceCIDs: underscore.Map(pieceCIDs[:5], func(cid model.CID) string { return cid.String() }), } - clientID := &schedule.Preparation.Wallets[0].ID err = db.Create(&schedule).Error require.NoError(t, err) @@ -572,39 +566,35 @@ func TestDealMakerService_NewScheduleOneOff(t *testing.T) { // Test5 is not proposed err = db.Create([]model.Deal{ { - ScheduleID: &schedule.ID, - Provider: provider, - ClientID: clientID, - ClientActorID: clientActorID, - PieceCID: pieceCIDs[0], - PieceSize: 1024, - State: model.DealProposed, + ScheduleID: &schedule.ID, + Provider: provider, + ClientID: client, + PieceCID: pieceCIDs[0], + PieceSize: 1024, + State: model.DealProposed, }, { - ScheduleID: &schedule.ID, - Provider: provider, - ClientID: clientID, - ClientActorID: clientActorID, - PieceCID: pieceCIDs[1], - PieceSize: 1024, - State: model.DealProposalExpired, + ScheduleID: &schedule.ID, + Provider: provider, + ClientID: client, + PieceCID: pieceCIDs[1], + PieceSize: 1024, + State: model.DealProposalExpired, }, { - ScheduleID: &schedule.ID, - Provider: provider, - ClientID: clientID, - ClientActorID: clientActorID, - PieceCID: pieceCIDs[2], - PieceSize: 1024, - State: model.DealActive, + ScheduleID: &schedule.ID, + Provider: provider, + ClientID: client, + PieceCID: pieceCIDs[2], + PieceSize: 1024, + State: model.DealActive, }, { - Provider: provider, - ClientID: clientID, - ClientActorID: clientActorID, - PieceCID: pieceCIDs[3], - PieceSize: 1024, - State: model.DealProposed, + Provider: provider, + ClientID: client, + PieceCID: pieceCIDs[3], + PieceSize: 1024, + State: model.DealProposed, }, }).Error require.NoError(t, err) diff --git a/service/dealtracker/dealtracker.go b/service/dealtracker/dealtracker.go index 967cbb01..36a2714c 100644 --- a/service/dealtracker/dealtracker.go +++ b/service/dealtracker/dealtracker.go @@ -382,7 +382,7 @@ type KnownDeal struct { } type UnknownDeal struct { ID model.DealID - ClientID *model.WalletID + ClientID string Provider string PieceCID model.CID StartEpoch int32 @@ -432,8 +432,8 @@ func (d *DealTracker) runOnce(ctx context.Context) error { walletIDs := make(map[string]struct{}) for _, wallet := range wallets { - Logger.Infof("tracking deals for wallet %s", wallet.ActorID) - walletIDs[wallet.ActorID] = struct{}{} + Logger.Infof("tracking deals for wallet %s", wallet.ID) + walletIDs[wallet.ID] = struct{}{} } knownDeals := make(map[uint64]model.DealState) @@ -454,14 +454,14 @@ func (d *DealTracker) runOnce(ctx context.Context) error { unknownDeals := make(map[string][]UnknownDeal) rows, err = db.Model(&model.Deal{}).Where("deal_id IS NULL AND state NOT IN ?", []model.DealState{model.DealExpired, model.DealProposalExpired}). - Select("id", "deal_id", "state", "client_id", "client_actor_id", "provider", "piece_cid", + Select("id", "deal_id", "state", "client_id", "provider", "piece_cid", "start_epoch", "end_epoch").Rows() if err != nil { return errors.WithStack(err) } for rows.Next() { var deal model.Deal - err = rows.Scan(&deal.ID, &deal.DealID, &deal.State, &deal.ClientID, &deal.ClientActorID, &deal.Provider, &deal.PieceCID, &deal.StartEpoch, &deal.EndEpoch) + err = rows.Scan(&deal.ID, &deal.DealID, &deal.State, &deal.ClientID, &deal.Provider, &deal.PieceCID, &deal.StartEpoch, &deal.EndEpoch) if err != nil { return errors.WithStack(err) } @@ -552,17 +552,11 @@ func (d *DealTracker) runOnce(ctx context.Context) error { if err != nil { return errors.Wrapf(err, "failed to parse piece CID %s", deal.Proposal.PieceCID.Root) } - - var wallet model.Wallet - if err := db.Where("actor_id = ?", deal.Proposal.Client).First(&wallet).Error; err != nil { - return errors.Wrapf(err, "failed to find wallet for client %s", deal.Proposal.Client) - } - err = database.DoRetry(ctx, func() error { return db.Create(&model.Deal{ DealID: &dealID, State: newState, - ClientID: &wallet.ID, + ClientID: deal.Proposal.Client, Provider: deal.Proposal.Provider, Label: deal.Proposal.Label, PieceCID: model.CID(root), diff --git a/service/dealtracker/dealtracker_test.go b/service/dealtracker/dealtracker_test.go index 3832a489..eb2444d9 100644 --- a/service/dealtracker/dealtracker_test.go +++ b/service/dealtracker/dealtracker_test.go @@ -151,11 +151,10 @@ func TestTrackDeal(t *testing.T) { func TestRunOnce(t *testing.T) { testutil.All(t, func(ctx context.Context, t *testing.T, db *gorm.DB) { - wallet := model.Wallet{ - ActorID: "t0100", + err := db.Create(&model.Wallet{ + ID: "t0100", Address: "t3xxx", - } - err := db.Create(&wallet).Error + }).Error require.NoError(t, err) d1 := uint64(1) d2 := uint64(2) @@ -172,8 +171,7 @@ func TestRunOnce(t *testing.T) { { DealID: &d1, State: model.DealActive, - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + ClientID: "t0100", Provider: "sp1", ProposalID: "proposal1", Label: "label1", @@ -187,8 +185,7 @@ func TestRunOnce(t *testing.T) { { DealID: &d2, State: model.DealPublished, - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + ClientID: "t0100", Provider: "sp1", ProposalID: "proposal2", Label: "label2", @@ -201,8 +198,7 @@ func TestRunOnce(t *testing.T) { }, { State: model.DealProposed, - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + ClientID: "t0100", Provider: "sp1", ProposalID: "proposal3", Label: "label3", @@ -216,8 +212,7 @@ func TestRunOnce(t *testing.T) { { DealID: &d4, State: model.DealActive, - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + ClientID: "t0100", Provider: "sp1", ProposalID: "proposal4", Label: "label4", @@ -230,8 +225,7 @@ func TestRunOnce(t *testing.T) { }, { State: model.DealActive, - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + ClientID: "t0100", Provider: "sp1", ProposalID: "proposal5", Label: "label5", @@ -245,8 +239,7 @@ func TestRunOnce(t *testing.T) { { DealID: &d6, State: model.DealPublished, - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + ClientID: "t0100", Provider: "sp1", ProposalID: "proposal6", Label: "label6", diff --git a/testdb/main.go b/testdb/main.go index 1ee4ad39..26e92636 100644 --- a/testdb/main.go +++ b/testdb/main.go @@ -42,12 +42,12 @@ func run() error { return errors.WithStack(err) } defer closer.Close() - err = model.GetMigrator(db).DropAll() + err = model.DropAll(db) if err != nil { return errors.WithStack(err) } - err = model.GetMigrator(db).Migrate() + err = model.AutoMigrate(db) if err != nil { return errors.WithStack(err) } @@ -76,7 +76,7 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { } // Setup wallet wallet := model.Wallet{ - ActorID: fmt.Sprintf("f0%d", r.Intn(10000)), + ID: fmt.Sprintf("f0%d", r.Intn(10000)), Address: "f1" + randomLetterString(39), } @@ -138,7 +138,7 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { } var files []model.File - for i := range r.Intn(10_000) { + for i := 0; i < r.Intn(10_000); i++ { size := r.Int63n(1 << 20) rCID := randomCID() files = append(files, model.File{ @@ -338,12 +338,11 @@ func createPreparation(ctx context.Context, db *gorm.DB) error { //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 StartEpoch: int32(10000 + r.Intn(10000)), //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 - EndEpoch: int32(20000 + r.Intn(10000)), - Price: "0", - Verified: true, - ScheduleID: ptr.Of(schedule.ID), - ClientID: &wallet.ID, - ClientActorID: wallet.ActorID, + EndEpoch: int32(20000 + r.Intn(10000)), + Price: "0", + Verified: true, + ScheduleID: ptr.Of(schedule.ID), + ClientID: wallet.ID, } if state == model.DealActive { //nolint:gosec // G115: Safe conversion, max int32 epoch won't occur until year 4062 diff --git a/util/testutil/testutils.go b/util/testutil/testutils.go index aaba3023..064fdbe5 100644 --- a/util/testutil/testutils.go +++ b/util/testutil/testutils.go @@ -144,7 +144,7 @@ func doOne(t *testing.T, backend string, testFunc func(ctx context.Context, t *t defer cancel() db = db.WithContext(ctx) - err := model.GetMigrator(db).Migrate() + err := model.AutoMigrate(db) require.NoError(t, err) t.Run(backend, func(t *testing.T) { diff --git a/version.json b/version.json index 16e19ce2..51b0d58d 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.17-RC1" + "version": "v0.2.33" }