Compare commits

..

28 Commits

Author SHA1 Message Date
Cesar N.
adfc96074f Release v1.7.0 (#3418) 2024-08-02 15:20:47 -07:00
jinapurapu
7cc7b874d1 Fix MinIO videos link (#3417) 2024-08-02 13:48:54 -07:00
Ramon de Klein
4d12a5061d Remove obsolete KES functionality (#3414) 2024-08-02 11:50:33 -06:00
Prakash Senthil Vel
b274add4da fix nested directory object display (#3415) 2024-08-02 10:06:10 -07:00
Alex
fd51c9dc4c Updated UI dependencies (#3411)
- Fixed an issue with servers list not closing correctly in certain circumstances
- Updated internal UI dependencies

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-07-22 10:44:46 -06:00
Alex
51f8794aa6 Release v1.6.3 (#3408) 2024-07-12 16:07:49 -06:00
Alex
3db998f9c4 Release v1.6.2 (#3407)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-07-12 12:43:59 -07:00
Alex
0a2a7087a7 Updated UI Project Dependencies (#3406)
Updated Project Dependencies

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-07-12 13:08:30 -06:00
Alex
8f0eb11ced Updated License page with new design (#3405) 2024-07-12 10:18:17 -06:00
Anis Eleuch
e3e3599095 ws: Calculate the client IP from the WS request headers as well (#3403)
Currently, the websocket code adds an IP to X-Forwarded-For where the IP is
calculated from the TCP connection established to Console, however the established
TCP connection can be coming from the load balancer as well, hence the
necesssity to evaluate the client IP based on X-Forwarded-For or
X-Real-IP headers

Look for client IPs in the websocket request connection.

Co-authored-by: Anis Eleuch <anis@min.io>
2024-07-10 08:04:50 -07:00
dependabot[bot]
aa74e31453 Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#3404)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 09:15:51 +02:00
jiuker
e1f6e729fd format to loginfo (#3400) 2024-07-08 09:08:27 -06:00
Ramon de Klein
13d83a6d1c User session fixes (#3397) 2024-07-04 18:22:36 -07:00
Ramon de Klein
6075387654 Upgrade Go to v1.22.5 and upgrade Github actions (#3398) 2024-07-04 07:28:24 -07:00
Victor Bayas
69fad3f55f Improvements to Drives list UI (#3395) 2024-07-01 17:27:33 -06:00
Alex
e3864b62a4 Release v1.6.1 (#3393) 2024-06-25 10:26:58 -07:00
Harshavardhana
22176f4e0f fix: objectManager implementation avoid racy goroutines (#3392)
fixes #3391
2024-06-25 08:50:31 -07:00
dependabot[bot]
a89d7ec0ea Bump ws from 7.5.9 to 7.5.10 in /web-app (#3390) 2024-06-18 15:22:19 -07:00
Ramon de Klein
8262049e20 Fix showing object-name in legal hold dialog (#3389) 2024-06-18 15:20:03 -07:00
Alex
c61e1e0a2a Added debounce to Share file fields (#3388)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-06-17 16:02:13 -06:00
Alex
b376cf6c65 Improvements to Share Link component behavior (#3387)
Improvements to Share Link component to avoid multiple re-renders during common actions

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-06-17 11:40:27 -06:00
Cesar N
16bae25ce6 Release v1.6.0 (#3386) 2024-06-13 14:26:03 -07:00
Alex
57ba17a12e Changed License plans validation to not allow AGPL as a registered plan (#3385)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-06-13 14:36:08 -06:00
Ramon de Klein
f4d98a4910 Fix share link issue (#3382) (#3384) 2024-06-13 13:30:33 -06:00
Cesar N
fa32d78ff1 Add Tiers improvements for Bucket Lifecycle management (#3380) 2024-06-13 13:17:49 -06:00
jinapurapu
56f22a4479 Fix storageClass on EditLifecycleModal (#3379) 2024-06-13 11:06:30 -07:00
Alex
7b88d3a1bc Updated UI package dependencies (#3381)
Updated package dependencies

- Updated react-pdf to fix security vulnerability
- Removed ignored security alerts

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-06-13 11:23:50 -06:00
Prakash Senthil Vel
c8a39f9544 update logo as per mineos plans (#3383) 2024-06-13 08:01:25 -07:00
365 changed files with 116050 additions and 134856 deletions

View File

@@ -26,13 +26,12 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -75,12 +74,12 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
cache: "yarn"
cache-dependency-path: web-app/yarn.lock
- uses: actions/cache@v3
- uses: actions/cache@v4
id: assets-cache
name: Assets Cache
with:
@@ -133,7 +132,7 @@ jobs:
(git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
fi
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go-minio
@@ -158,18 +157,17 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
./console
key: ${{ runner.os }}-binary-${{ github.run_id }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: assets-cache
name: Assets Cache
with:
@@ -201,7 +199,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -210,7 +208,7 @@ jobs:
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -255,7 +253,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -264,7 +262,7 @@ jobs:
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -308,7 +306,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -316,7 +314,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -360,7 +358,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -368,7 +366,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -412,7 +410,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -420,7 +418,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -460,7 +458,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -468,7 +466,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -508,7 +506,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -516,7 +514,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -556,7 +554,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -564,7 +562,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -603,7 +601,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -611,7 +609,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -651,7 +649,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -659,7 +657,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -702,7 +700,7 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Install MinIO JS
@@ -710,7 +708,7 @@ jobs:
continue-on-error: false
run: |
yarn add minio
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache
with:
path: |
@@ -752,10 +750,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -765,7 +762,7 @@ jobs:
run: |
make test-pkg
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-pkg
name: Coverage Cache Pkg
with:
@@ -788,10 +785,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -801,7 +797,7 @@ jobs:
run: |
make test
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-api
name: Coverage Cache API
with:
@@ -841,7 +837,7 @@ jobs:
git remote add alt $ALTREPO
(git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
fi
- uses: actions/cache@v3
- uses: actions/cache@v4
id: minio-latest-cache
name: MinIO Latest Cache
with:
@@ -849,10 +845,9 @@ jobs:
./minio
key: ${{ runner.os }}-minio-latest-${{ hashFiles('./minio_repository/go.sum') }}
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -881,7 +876,7 @@ jobs:
echo "Create the folder to put the all.out file"
make test-integration MINIO_VERSION=$MINIO_VERSION;
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache
name: Coverage Cache
with:
@@ -923,10 +918,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Clone github.com/minio/minio
@@ -946,7 +940,7 @@ jobs:
git remote add alt $ALTREPO
(git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
fi
- uses: actions/cache@v3
- uses: actions/cache@v4
id: minio-latest-cache
name: MinIO Latest Cache
with:
@@ -973,7 +967,7 @@ jobs:
echo $MINIO_VERSION;
make test-replication MINIO_VERSION=$MINIO_VERSION;
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-replication
name: Coverage Cache Replication
with:
@@ -1006,10 +1000,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Clone github.com/minio/minio
@@ -1035,7 +1028,7 @@ jobs:
git checkout "${{ github.head_ref || github.ref_name }}" || echo "Okay, we'll stay on the master branch"
- uses: actions/cache@v3
- uses: actions/cache@v4
id: minio-latest-cache
name: MinIO Latest Cache
with:
@@ -1050,7 +1043,7 @@ jobs:
echo "replace github.com/minio/console => ../" >> go.mod
echo "updates to go.mod needed; to update it: go mod tidy"
go mod tidy -compat=1.21
go mod tidy -compat=1.22
echo "Get git version to build MinIO Image";
VERSION=`git rev-parse HEAD`;
@@ -1067,7 +1060,7 @@ jobs:
echo $MINIO_VERSION;
make test-sso-integration MINIO_VERSION=$MINIO_VERSION;
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-sso
name: Coverage Cache SSO
with:
@@ -1091,10 +1084,9 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Check out gocovmerge as a nested repository
uses: actions/checkout@v3
@@ -1102,7 +1094,7 @@ jobs:
repository: wadey/gocovmerge
path: gocovmerge
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache
name: Coverage Cache
with:
@@ -1110,7 +1102,7 @@ jobs:
./integration/coverage/
key: ${{ runner.os }}-coverage-2-${{ github.run_id }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-sso
name: Coverage Cache SSO
with:
@@ -1118,7 +1110,7 @@ jobs:
./sso-integration/coverage/
key: ${{ runner.os }}-sso-coverage-2-${{ github.run_id }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-replication
name: Coverage Cache Replication
with:
@@ -1126,7 +1118,7 @@ jobs:
./replication/coverage/
key: ${{ runner.os }}-replication-coverage-2-${{ github.run_id }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-api
name: Coverage Cache API
with:
@@ -1134,7 +1126,7 @@ jobs:
./api/coverage/
key: ${{ runner.os }}-coverage-api-2-${{ github.run_id }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: coverage-cache-pkg
name: Coverage Cache Pkg
with:
@@ -1155,7 +1147,7 @@ jobs:
echo "download golang x tools"
go mod download golang.org/x/tools
echo "go mod tidy compat mode"
go mod tidy -compat=1.21
go mod tidy -compat=1.22
echo "go build gocoverage.go"
go build gocovmerge.go
echo "put together the outs for final coverage resolution"
@@ -1241,12 +1233,12 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
cache: "yarn"
cache-dependency-path: web-app/yarn.lock
- uses: actions/cache@v3
- uses: actions/cache@v4
id: assets-cache-istanbul-coverage
name: Assets Cache Istanbul Coverage
with:
@@ -1280,18 +1272,17 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache Istanbul Coverage
with:
path: |
./console
key: ${{ runner.os }}-binary-istanbul-coverage-${{ github.run_id }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: assets-cache-istanbul-coverage
name: Assets Cache Istanbul Coverage
with:
@@ -1321,10 +1312,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -1349,10 +1339,9 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -1378,10 +1367,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -1407,10 +1395,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -1436,10 +1423,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
@@ -1458,7 +1444,7 @@ jobs:
- uses: actions/checkout@v3
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -1474,7 +1460,7 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Console Binary Cache Istanbul Coverage
with:
path: |

View File

@@ -17,9 +17,9 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.22.4
go-version: 1.22.5
check-latest: true
- name: Get official govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.22.4 ]
go-version: [ 1.22.5 ]
os: [ ubuntu-latest ]
steps:
- name: Check out code
@@ -43,18 +43,11 @@ jobs:
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: Checks for known security issues with the installed packages
working-directory: ./web-app
continue-on-error: false
run: |
# Ignore "pdfjs-dist" advisory, because it's a dependency
# of "react-pdf" that cannot be upgraded. Because the
# "isEvalSupported" value is always set to "false", it
# isn't a security problem. See also
# - https://github.com/wojtekmaj/react-pdf/issues/1789
# - https://github.com/wojtekmaj/react-pdf/discussions/1786
# - https://www.npmjs.com/advisories/1097244
yarn npm audit --recursive --environment production --no-deprecations --ignore 1097244
yarn npm audit --recursive --environment production --no-deprecations

View File

@@ -2,6 +2,60 @@
# Changelog
## Release v1.7.0
Bug Fix:
- Fixed directory listing
- Fix MinIO videos link
Additional Changes:
- Removed deprecated KES functionality
## Release v1.6.3
Additional Changes:
- Updated go.mod version
## Release v1.6.2
Bug Fix:
- Fixed minor user session issues
- Updated project dependencies
Additional Changes:
- Improved Drives List visualization
- Improved WS request logic
- Updated License page with current MinIO plans.
## Release v1.6.1
Bug Fix:
- Fixed objectManager issues under certain conditions
- Fixed Security vulnerability in dependencies
Additional Changes:
- Improved Share Link behavior
## Release v1.6.0
Bug Fix:
- Fixed share link encoding
- Fixed Edit Lifecycle Storage Class
- Added Tiers Improvements for Bucket Lifecycle management
Additional Changes:
- Vulnerability updates
- Update Logo logic
## Release v1.5.0
Features:

View File

@@ -35,7 +35,7 @@ In case a Console standalone binary is needed, it can be generated by building t
### Build from source
> You will need a working Go environment. Therefore, please follow [How to install Go](https://golang.org/doc/install).
> Minimum version required is go1.21
> Minimum version required is go1.22
```
go install github.com/minio/console/cmd/console@latest

View File

@@ -66,11 +66,12 @@ var (
deleteSiteReplicationInfoMock func(ctx context.Context, removeReq madmin.SRRemoveReq) (*madmin.ReplicateRemoveStatus, error)
getSiteReplicationStatus func(ctx context.Context, params madmin.SRStatusOptions) (*madmin.SRStatusInfo, error)
minioListTiersMock func(ctx context.Context) ([]*madmin.TierConfig, error)
minioTierStatsMock func(ctx context.Context) ([]madmin.TierInfo, error)
minioAddTiersMock func(ctx context.Context, tier *madmin.TierConfig) error
minioRemoveTierMock func(ctx context.Context, tierName string) error
minioEditTiersMock func(ctx context.Context, tierName string, creds madmin.TierCreds) error
minioListTiersMock func(ctx context.Context) ([]*madmin.TierConfig, error)
minioTierStatsMock func(ctx context.Context) ([]madmin.TierInfo, error)
minioAddTiersMock func(ctx context.Context, tier *madmin.TierConfig) error
minioRemoveTierMock func(ctx context.Context, tierName string) error
minioEditTiersMock func(ctx context.Context, tierName string, creds madmin.TierCreds) error
minioVerifyTierStatusMock func(ctx context.Context, tierName string) error
minioServiceTraceMock func(ctx context.Context, threshold int64, s3, internal, storage, os, errTrace bool) <-chan madmin.ServiceTraceInfo
@@ -121,8 +122,8 @@ func (ac AdminClientMock) speedtest(_ context.Context, _ madmin.SpeedtestOpts) (
return nil, nil
}
func (ac AdminClientMock) verifyTierStatus(_ context.Context, _ string) error {
return nil
func (ac AdminClientMock) verifyTierStatus(ctx context.Context, tier string) error {
return minioVerifyTierStatusMock(ctx, tier)
}
// mock function helpConfigKV()
@@ -215,10 +216,6 @@ func (ac AdminClientMock) createKey(_ context.Context, _ string) error {
return nil
}
func (ac AdminClientMock) importKey(_ context.Context, _ string, _ []byte) error {
return nil
}
func (ac AdminClientMock) listKeys(_ context.Context, _ string) ([]madmin.KMSKeyInfo, error) {
return []madmin.KMSKeyInfo{{
Name: "name",
@@ -230,55 +227,6 @@ func (ac AdminClientMock) keyStatus(_ context.Context, _ string) (*madmin.KMSKey
return &madmin.KMSKeyStatus{KeyID: "key"}, nil
}
func (ac AdminClientMock) deleteKey(_ context.Context, _ string) error {
return nil
}
func (ac AdminClientMock) setKMSPolicy(_ context.Context, _ string, _ []byte) error {
return nil
}
func (ac AdminClientMock) assignPolicy(_ context.Context, _ string, _ []byte) error {
return nil
}
func (ac AdminClientMock) describePolicy(_ context.Context, _ string) (*madmin.KMSDescribePolicy, error) {
return &madmin.KMSDescribePolicy{Name: "name"}, nil
}
func (ac AdminClientMock) getKMSPolicy(_ context.Context, _ string) (*madmin.KMSPolicy, error) {
return &madmin.KMSPolicy{Allow: []string{""}, Deny: []string{""}}, nil
}
func (ac AdminClientMock) listKMSPolicies(_ context.Context, _ string) ([]madmin.KMSPolicyInfo, error) {
return []madmin.KMSPolicyInfo{{
Name: "name",
CreatedBy: "by",
}}, nil
}
func (ac AdminClientMock) deletePolicy(_ context.Context, _ string) error {
return nil
}
func (ac AdminClientMock) describeIdentity(_ context.Context, _ string) (*madmin.KMSDescribeIdentity, error) {
return &madmin.KMSDescribeIdentity{}, nil
}
func (ac AdminClientMock) describeSelfIdentity(_ context.Context) (*madmin.KMSDescribeSelfIdentity, error) {
return &madmin.KMSDescribeSelfIdentity{
Policy: &madmin.KMSPolicy{Allow: []string{}, Deny: []string{}},
}, nil
}
func (ac AdminClientMock) deleteIdentity(_ context.Context, _ string) error {
return nil
}
func (ac AdminClientMock) listIdentities(_ context.Context, _ string) ([]madmin.KMSIdentityInfo, error) {
return []madmin.KMSIdentityInfo{{Identity: "identity"}}, nil
}
func (ac AdminClientMock) listPolicies(_ context.Context) (map[string]*iampolicy.Policy, error) {
return minioListPoliciesMock()
}

View File

@@ -19,7 +19,6 @@ package api
import (
"context"
"encoding/json"
"sort"
"github.com/go-openapi/runtime/middleware"
@@ -32,8 +31,6 @@ import (
func registerKMSHandlers(api *operations.ConsoleAPI) {
registerKMSStatusHandlers(api)
registerKMSKeyHandlers(api)
registerKMSPolicyHandlers(api)
registerKMSIdentityHandlers(api)
}
func registerKMSStatusHandlers(api *operations.ConsoleAPI) {
@@ -204,14 +201,6 @@ func registerKMSKeyHandlers(api *operations.ConsoleAPI) {
return kmsAPI.NewKMSCreateKeyCreated()
})
api.KmsKMSImportKeyHandler = kmsAPI.KMSImportKeyHandlerFunc(func(params kmsAPI.KMSImportKeyParams, session *models.Principal) middleware.Responder {
err := GetKMSImportKeyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSImportKeyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSImportKeyCreated()
})
api.KmsKMSListKeysHandler = kmsAPI.KMSListKeysHandlerFunc(func(params kmsAPI.KMSListKeysParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSListKeysResponse(session, params)
if err != nil {
@@ -227,14 +216,6 @@ func registerKMSKeyHandlers(api *operations.ConsoleAPI) {
}
return kmsAPI.NewKMSKeyStatusOK().WithPayload(resp)
})
api.KmsKMSDeleteKeyHandler = kmsAPI.KMSDeleteKeyHandlerFunc(func(params kmsAPI.KMSDeleteKeyParams, session *models.Principal) middleware.Responder {
err := GetKMSDeleteKeyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDeleteKeyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSDeleteKeyOK()
})
}
func GetKMSCreateKeyResponse(session *models.Principal, params kmsAPI.KMSCreateKeyParams) *CodedAPIError {
@@ -254,27 +235,6 @@ func createKey(ctx context.Context, key string, minioClient MinioAdmin) *CodedAP
return nil
}
func GetKMSImportKeyResponse(session *models.Principal, params kmsAPI.KMSImportKeyParams) *CodedAPIError {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return ErrorWithContext(ctx, err)
}
bytes, err := json.Marshal(params.Body)
if err != nil {
return ErrorWithContext(ctx, err)
}
return importKey(ctx, params.Name, bytes, AdminClient{Client: mAdmin})
}
func importKey(ctx context.Context, key string, bytes []byte, minioClient MinioAdmin) *CodedAPIError {
if err := minioClient.importKey(ctx, key, bytes); err != nil {
return ErrorWithContext(ctx, err)
}
return nil
}
func GetKMSListKeysResponse(session *models.Principal, params kmsAPI.KMSListKeysParams) (*models.KmsListKeysResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
@@ -329,341 +289,3 @@ func keyStatus(ctx context.Context, key string, minioClient MinioAdmin) (*models
DecryptionErr: ks.DecryptionErr,
}, nil
}
func GetKMSDeleteKeyResponse(session *models.Principal, params kmsAPI.KMSDeleteKeyParams) *CodedAPIError {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return ErrorWithContext(ctx, err)
}
return deleteKey(ctx, params.Name, AdminClient{Client: mAdmin})
}
func deleteKey(ctx context.Context, key string, minioClient MinioAdmin) *CodedAPIError {
if err := minioClient.deleteKey(ctx, key); err != nil {
return ErrorWithContext(ctx, err)
}
return nil
}
func registerKMSPolicyHandlers(api *operations.ConsoleAPI) {
api.KmsKMSSetPolicyHandler = kmsAPI.KMSSetPolicyHandlerFunc(func(params kmsAPI.KMSSetPolicyParams, session *models.Principal) middleware.Responder {
err := GetKMSSetPolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSSetPolicyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSSetPolicyOK()
})
api.KmsKMSAssignPolicyHandler = kmsAPI.KMSAssignPolicyHandlerFunc(func(params kmsAPI.KMSAssignPolicyParams, session *models.Principal) middleware.Responder {
err := GetKMSAssignPolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSAssignPolicyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSAssignPolicyOK()
})
api.KmsKMSDescribePolicyHandler = kmsAPI.KMSDescribePolicyHandlerFunc(func(params kmsAPI.KMSDescribePolicyParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSDescribePolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDescribePolicyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSDescribePolicyOK().WithPayload(resp)
})
api.KmsKMSGetPolicyHandler = kmsAPI.KMSGetPolicyHandlerFunc(func(params kmsAPI.KMSGetPolicyParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSGetPolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSGetPolicyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSGetPolicyOK().WithPayload(resp)
})
api.KmsKMSListPoliciesHandler = kmsAPI.KMSListPoliciesHandlerFunc(func(params kmsAPI.KMSListPoliciesParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSListPoliciesResponse(session, params)
if err != nil {
return kmsAPI.NewKMSListPoliciesDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSListPoliciesOK().WithPayload(resp)
})
api.KmsKMSDeletePolicyHandler = kmsAPI.KMSDeletePolicyHandlerFunc(func(params kmsAPI.KMSDeletePolicyParams, session *models.Principal) middleware.Responder {
err := GetKMSDeletePolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDeletePolicyDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSDeletePolicyOK()
})
}
func GetKMSSetPolicyResponse(session *models.Principal, params kmsAPI.KMSSetPolicyParams) *CodedAPIError {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return ErrorWithContext(ctx, err)
}
bytes, err := json.Marshal(params.Body)
if err != nil {
return ErrorWithContext(ctx, err)
}
return setPolicy(ctx, *params.Body.Policy, bytes, AdminClient{Client: mAdmin})
}
func setPolicy(ctx context.Context, policy string, content []byte, minioClient MinioAdmin) *CodedAPIError {
if err := minioClient.setKMSPolicy(ctx, policy, content); err != nil {
return ErrorWithContext(ctx, err)
}
return nil
}
func GetKMSAssignPolicyResponse(session *models.Principal, params kmsAPI.KMSAssignPolicyParams) *CodedAPIError {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return ErrorWithContext(ctx, err)
}
bytes, err := json.Marshal(params.Body)
if err != nil {
return ErrorWithContext(ctx, err)
}
return assignPolicy(ctx, params.Name, bytes, AdminClient{Client: mAdmin})
}
func assignPolicy(ctx context.Context, policy string, content []byte, minioClient MinioAdmin) *CodedAPIError {
if err := minioClient.assignPolicy(ctx, policy, content); err != nil {
return ErrorWithContext(ctx, err)
}
return nil
}
func GetKMSDescribePolicyResponse(session *models.Principal, params kmsAPI.KMSDescribePolicyParams) (*models.KmsDescribePolicyResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return describePolicy(ctx, params.Name, AdminClient{Client: mAdmin})
}
func describePolicy(ctx context.Context, policy string, minioClient MinioAdmin) (*models.KmsDescribePolicyResponse, *CodedAPIError) {
dp, err := minioClient.describePolicy(ctx, policy)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return &models.KmsDescribePolicyResponse{
Name: dp.Name,
CreatedAt: dp.CreatedAt,
CreatedBy: dp.CreatedBy,
}, nil
}
func GetKMSGetPolicyResponse(session *models.Principal, params kmsAPI.KMSGetPolicyParams) (*models.KmsGetPolicyResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return getPolicy(ctx, params.Name, AdminClient{Client: mAdmin})
}
func getPolicy(ctx context.Context, policy string, minioClient MinioAdmin) (*models.KmsGetPolicyResponse, *CodedAPIError) {
p, err := minioClient.getKMSPolicy(ctx, policy)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return &models.KmsGetPolicyResponse{
Allow: p.Allow,
Deny: p.Deny,
}, nil
}
func GetKMSListPoliciesResponse(session *models.Principal, params kmsAPI.KMSListPoliciesParams) (*models.KmsListPoliciesResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
pattern := ""
if params.Pattern != nil {
pattern = *params.Pattern
}
return listKMSPolicies(ctx, pattern, AdminClient{Client: mAdmin})
}
func listKMSPolicies(ctx context.Context, pattern string, minioClient MinioAdmin) (*models.KmsListPoliciesResponse, *CodedAPIError) {
results, err := minioClient.listKMSPolicies(ctx, pattern)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return &models.KmsListPoliciesResponse{Results: parsePolicies(results)}, nil
}
func parsePolicies(results []madmin.KMSPolicyInfo) (data []*models.KmsPolicyInfo) {
for _, policy := range results {
data = append(data, &models.KmsPolicyInfo{
CreatedAt: policy.CreatedAt,
CreatedBy: policy.CreatedBy,
Name: policy.Name,
})
}
return data
}
func GetKMSDeletePolicyResponse(session *models.Principal, params kmsAPI.KMSDeletePolicyParams) *CodedAPIError {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return ErrorWithContext(ctx, err)
}
return deletePolicy(ctx, params.Name, AdminClient{Client: mAdmin})
}
func deletePolicy(ctx context.Context, policy string, minioClient MinioAdmin) *CodedAPIError {
if err := minioClient.deletePolicy(ctx, policy); err != nil {
return ErrorWithContext(ctx, err)
}
return nil
}
func registerKMSIdentityHandlers(api *operations.ConsoleAPI) {
api.KmsKMSDescribeIdentityHandler = kmsAPI.KMSDescribeIdentityHandlerFunc(func(params kmsAPI.KMSDescribeIdentityParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSDescribeIdentityResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDescribeIdentityDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSDescribeIdentityOK().WithPayload(resp)
})
api.KmsKMSDescribeSelfIdentityHandler = kmsAPI.KMSDescribeSelfIdentityHandlerFunc(func(params kmsAPI.KMSDescribeSelfIdentityParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSDescribeSelfIdentityResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDescribeSelfIdentityDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSDescribeSelfIdentityOK().WithPayload(resp)
})
api.KmsKMSListIdentitiesHandler = kmsAPI.KMSListIdentitiesHandlerFunc(func(params kmsAPI.KMSListIdentitiesParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSListIdentitiesResponse(session, params)
if err != nil {
return kmsAPI.NewKMSListIdentitiesDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSListIdentitiesOK().WithPayload(resp)
})
api.KmsKMSDeleteIdentityHandler = kmsAPI.KMSDeleteIdentityHandlerFunc(func(params kmsAPI.KMSDeleteIdentityParams, session *models.Principal) middleware.Responder {
err := GetKMSDeleteIdentityResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDeleteIdentityDefault(err.Code).WithPayload(err.APIError)
}
return kmsAPI.NewKMSDeleteIdentityOK()
})
}
func GetKMSDescribeIdentityResponse(session *models.Principal, params kmsAPI.KMSDescribeIdentityParams) (*models.KmsDescribeIdentityResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return describeIdentity(ctx, params.Name, AdminClient{Client: mAdmin})
}
func describeIdentity(ctx context.Context, identity string, minioClient MinioAdmin) (*models.KmsDescribeIdentityResponse, *CodedAPIError) {
i, err := minioClient.describeIdentity(ctx, identity)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return &models.KmsDescribeIdentityResponse{
Policy: i.Policy,
Admin: i.IsAdmin,
Identity: i.Identity,
CreatedAt: i.CreatedAt,
CreatedBy: i.CreatedBy,
}, nil
}
func GetKMSDescribeSelfIdentityResponse(session *models.Principal, params kmsAPI.KMSDescribeSelfIdentityParams) (*models.KmsDescribeSelfIdentityResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return describeSelfIdentity(ctx, AdminClient{Client: mAdmin})
}
func describeSelfIdentity(ctx context.Context, minioClient MinioAdmin) (*models.KmsDescribeSelfIdentityResponse, *CodedAPIError) {
i, err := minioClient.describeSelfIdentity(ctx)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return &models.KmsDescribeSelfIdentityResponse{
Policy: &models.KmsGetPolicyResponse{
Allow: i.Policy.Allow,
Deny: i.Policy.Deny,
},
Identity: i.Identity,
Admin: i.IsAdmin,
CreatedAt: i.CreatedAt,
CreatedBy: i.CreatedBy,
}, nil
}
func GetKMSListIdentitiesResponse(session *models.Principal, params kmsAPI.KMSListIdentitiesParams) (*models.KmsListIdentitiesResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
pattern := ""
if params.Pattern != nil {
pattern = *params.Pattern
}
return listIdentities(ctx, pattern, AdminClient{Client: mAdmin})
}
func listIdentities(ctx context.Context, pattern string, minioClient MinioAdmin) (*models.KmsListIdentitiesResponse, *CodedAPIError) {
results, err := minioClient.listIdentities(ctx, pattern)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return &models.KmsListIdentitiesResponse{Results: parseIdentities(results)}, nil
}
func parseIdentities(results []madmin.KMSIdentityInfo) (data []*models.KmsIdentityInfo) {
for _, policy := range results {
data = append(data, &models.KmsIdentityInfo{
CreatedAt: policy.CreatedAt,
CreatedBy: policy.CreatedBy,
Identity: policy.Identity,
Error: policy.Error,
Policy: policy.Policy,
})
}
return data
}
func GetKMSDeleteIdentityResponse(session *models.Principal, params kmsAPI.KMSDeleteIdentityParams) *CodedAPIError {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return ErrorWithContext(ctx, err)
}
return deleteIdentity(ctx, params.Name, AdminClient{Client: mAdmin})
}
func deleteIdentity(ctx context.Context, identity string, minioClient MinioAdmin) *CodedAPIError {
if err := minioClient.deleteIdentity(ctx, identity); err != nil {
return ErrorWithContext(ctx, err)
}
return nil
}

View File

@@ -78,20 +78,8 @@ func (suite *KMSTestSuite) assertHandlersAreNil(api *operations.ConsoleAPI) {
suite.assert.Nil(api.KmsKMSAPIsHandler)
suite.assert.Nil(api.KmsKMSVersionHandler)
suite.assert.Nil(api.KmsKMSCreateKeyHandler)
suite.assert.Nil(api.KmsKMSImportKeyHandler)
suite.assert.Nil(api.KmsKMSListKeysHandler)
suite.assert.Nil(api.KmsKMSKeyStatusHandler)
suite.assert.Nil(api.KmsKMSDeleteKeyHandler)
suite.assert.Nil(api.KmsKMSSetPolicyHandler)
suite.assert.Nil(api.KmsKMSAssignPolicyHandler)
suite.assert.Nil(api.KmsKMSDescribePolicyHandler)
suite.assert.Nil(api.KmsKMSGetPolicyHandler)
suite.assert.Nil(api.KmsKMSListPoliciesHandler)
suite.assert.Nil(api.KmsKMSDeletePolicyHandler)
suite.assert.Nil(api.KmsKMSDescribeIdentityHandler)
suite.assert.Nil(api.KmsKMSDescribeSelfIdentityHandler)
suite.assert.Nil(api.KmsKMSListIdentitiesHandler)
suite.assert.Nil(api.KmsKMSDeleteIdentityHandler)
}
func (suite *KMSTestSuite) assertHandlersAreNotNil(api *operations.ConsoleAPI) {
@@ -100,20 +88,8 @@ func (suite *KMSTestSuite) assertHandlersAreNotNil(api *operations.ConsoleAPI) {
suite.assert.NotNil(api.KmsKMSAPIsHandler)
suite.assert.NotNil(api.KmsKMSVersionHandler)
suite.assert.NotNil(api.KmsKMSCreateKeyHandler)
suite.assert.NotNil(api.KmsKMSImportKeyHandler)
suite.assert.NotNil(api.KmsKMSListKeysHandler)
suite.assert.NotNil(api.KmsKMSKeyStatusHandler)
suite.assert.NotNil(api.KmsKMSDeleteKeyHandler)
suite.assert.NotNil(api.KmsKMSSetPolicyHandler)
suite.assert.NotNil(api.KmsKMSAssignPolicyHandler)
suite.assert.NotNil(api.KmsKMSDescribePolicyHandler)
suite.assert.NotNil(api.KmsKMSGetPolicyHandler)
suite.assert.NotNil(api.KmsKMSListPoliciesHandler)
suite.assert.NotNil(api.KmsKMSDeletePolicyHandler)
suite.assert.NotNil(api.KmsKMSDescribeIdentityHandler)
suite.assert.NotNil(api.KmsKMSDescribeSelfIdentityHandler)
suite.assert.NotNil(api.KmsKMSListIdentitiesHandler)
suite.assert.NotNil(api.KmsKMSDeleteIdentityHandler)
}
func (suite *KMSTestSuite) TestKMSStatusHandlerWithError() {
@@ -217,25 +193,6 @@ func (suite *KMSTestSuite) TestKMSCreateKeyWithoutError() {
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSImportKeyHandlerWithError() {
params, api := suite.initKMSImportKeyRequest()
response := api.KmsKMSImportKeyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSImportKeyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSImportKeyRequest() (params kmsAPI.KMSImportKeyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSImportKeyWithoutError() {
ctx := context.Background()
err := importKey(ctx, "key", []byte(""), suite.adminClient)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSListKeysHandlerWithError() {
params, api := suite.initKMSListKeysRequest()
response := api.KmsKMSListKeysHandler.Handle(params, &models.Principal{})
@@ -276,223 +233,6 @@ func (suite *KMSTestSuite) TestKMSKeyStatusWithoutError() {
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSDeleteKeyHandlerWithError() {
params, api := suite.initKMSDeleteKeyRequest()
response := api.KmsKMSDeleteKeyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDeleteKeyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDeleteKeyRequest() (params kmsAPI.KMSDeleteKeyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDeleteKeyWithoutError() {
ctx := context.Background()
err := deleteKey(ctx, "key", suite.adminClient)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSSetPolicyHandlerWithError() {
params, api := suite.initKMSSetPolicyRequest()
response := api.KmsKMSSetPolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSSetPolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSSetPolicyRequest() (params kmsAPI.KMSSetPolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
policy := "policy"
params.Body = &models.KmsSetPolicyRequest{Policy: &policy}
return params, api
}
func (suite *KMSTestSuite) TestKMSSetPolicyWithoutError() {
ctx := context.Background()
err := setPolicy(ctx, "policy", []byte(""), suite.adminClient)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSAssignPolicyHandlerWithError() {
params, api := suite.initKMSAssignPolicyRequest()
response := api.KmsKMSAssignPolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSAssignPolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSAssignPolicyRequest() (params kmsAPI.KMSAssignPolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSAssignPolicyWithoutError() {
ctx := context.Background()
err := assignPolicy(ctx, "policy", []byte(""), suite.adminClient)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSDescribePolicyHandlerWithError() {
params, api := suite.initKMSDescribePolicyRequest()
response := api.KmsKMSDescribePolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDescribePolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDescribePolicyRequest() (params kmsAPI.KMSDescribePolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDescribePolicyWithoutError() {
ctx := context.Background()
res, err := describePolicy(ctx, "policy", suite.adminClient)
suite.assert.NotNil(res)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSGetPolicyHandlerWithError() {
params, api := suite.initKMSGetPolicyRequest()
response := api.KmsKMSGetPolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSGetPolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSGetPolicyRequest() (params kmsAPI.KMSGetPolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSGetPolicyWithoutError() {
ctx := context.Background()
res, err := getPolicy(ctx, "policy", suite.adminClient)
suite.assert.NotNil(res)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSListPoliciesHandlerWithError() {
params, api := suite.initKMSListPoliciesRequest()
response := api.KmsKMSListPoliciesHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSListPoliciesDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSListPoliciesRequest() (params kmsAPI.KMSListPoliciesParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSListPoliciesWithoutError() {
ctx := context.Background()
res, err := listKMSPolicies(ctx, "", suite.adminClient)
suite.assert.NotNil(res)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSDeletePolicyHandlerWithError() {
params, api := suite.initKMSDeletePolicyRequest()
response := api.KmsKMSDeletePolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDeletePolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDeletePolicyRequest() (params kmsAPI.KMSDeletePolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDeletePolicyWithoutError() {
ctx := context.Background()
err := deletePolicy(ctx, "policy", suite.adminClient)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSDescribeIdentityHandlerWithError() {
params, api := suite.initKMSDescribeIdentityRequest()
response := api.KmsKMSDescribeIdentityHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDescribeIdentityDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDescribeIdentityRequest() (params kmsAPI.KMSDescribeIdentityParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDescribeIdentityWithoutError() {
ctx := context.Background()
res, err := describeIdentity(ctx, "identity", suite.adminClient)
suite.assert.NotNil(res)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSDescribeSelfIdentityHandlerWithError() {
params, api := suite.initKMSDescribeSelfIdentityRequest()
response := api.KmsKMSDescribeSelfIdentityHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDescribeSelfIdentityDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDescribeSelfIdentityRequest() (params kmsAPI.KMSDescribeSelfIdentityParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDescribeSelfIdentityWithoutError() {
ctx := context.Background()
res, err := describeSelfIdentity(ctx, suite.adminClient)
suite.assert.NotNil(res)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSListIdentitiesHandlerWithError() {
params, api := suite.initKMSListIdentitiesRequest()
response := api.KmsKMSListIdentitiesHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSListIdentitiesDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSListIdentitiesRequest() (params kmsAPI.KMSListIdentitiesParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSListIdentitiesWithoutError() {
ctx := context.Background()
res, err := listIdentities(ctx, "", suite.adminClient)
suite.assert.NotNil(res)
suite.assert.Nil(err)
}
func (suite *KMSTestSuite) TestKMSDeleteIdentityHandlerWithError() {
params, api := suite.initKMSDeleteIdentityRequest()
response := api.KmsKMSDeleteIdentityHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDeleteIdentityDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDeleteIdentityRequest() (params kmsAPI.KMSDeleteIdentityParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDeleteIdentityWithoutError() {
ctx := context.Background()
err := deleteIdentity(ctx, "identity", suite.adminClient)
suite.assert.Nil(err)
}
func TestKMS(t *testing.T) {
suite.Run(t, new(KMSTestSuite))
}

View File

@@ -24,6 +24,7 @@ import (
"github.com/dustin/go-humanize"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/api/operations"
"github.com/minio/console/api/operations/tiering"
tieringApi "github.com/minio/console/api/operations/tiering"
"github.com/minio/console/models"
"github.com/minio/madmin-go/v3"
@@ -38,6 +39,13 @@ func registerAdminTiersHandlers(api *operations.ConsoleAPI) {
}
return tieringApi.NewTiersListOK().WithPayload(tierList)
})
api.TieringTiersListNamesHandler = tiering.TiersListNamesHandlerFunc(func(params tiering.TiersListNamesParams, session *models.Principal) middleware.Responder {
tierList, err := getTiersNameResponse(session, params)
if err != nil {
return tieringApi.NewTiersListDefault(err.Code).WithPayload(err.APIError)
}
return tieringApi.NewTiersListNamesOK().WithPayload(tierList)
})
// add a new tiers
api.TieringAddTierHandler = tieringApi.AddTierHandlerFunc(func(params tieringApi.AddTierParams, session *models.Principal) middleware.Responder {
err := getAddTierResponse(session, params)
@@ -72,33 +80,36 @@ func registerAdminTiersHandlers(api *operations.ConsoleAPI) {
})
}
// getNotificationEndpoints invokes admin info and returns a list of notification endpoints
// getTiers returns a list of tiers with their stats
func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse, error) {
tiers, err := client.listTiers(ctx)
if err != nil {
return nil, err
}
tiersInfo, err := client.tierStats(ctx)
tierStatsInfo, err := client.tierStats(ctx)
if err != nil {
return nil, err
}
tiersStatsMap := make(map[string]madmin.TierStats, len(tierStatsInfo))
for _, stat := range tierStatsInfo {
tiersStatsMap[stat.Name] = stat.Stats
}
var tiersList []*models.Tier
for _, tierData := range tiers {
// Default Tier Stats
stats := madmin.TierStats{
tierStats := madmin.TierStats{
NumObjects: 0,
NumVersions: 0,
TotalSize: 0,
}
// We look for the correct tier stats & set the values.
for _, stat := range tiersInfo {
if stat.Name == tierData.Name {
stats = stat.Stats
break
}
if stats, ok := tiersStatsMap[tierData.Name]; ok {
tierStats = stats
}
status := client.verifyTierStatus(ctx, tierData.Name) == nil
switch tierData.Type {
case madmin.S3:
tiersList = append(tiersList, &models.Tier{
@@ -112,11 +123,11 @@ func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse,
Region: tierData.S3.Region,
Secretkey: tierData.S3.SecretKey,
Storageclass: tierData.S3.StorageClass,
Usage: humanize.IBytes(stats.TotalSize),
Objects: strconv.Itoa(stats.NumObjects),
Versions: strconv.Itoa(stats.NumVersions),
Usage: humanize.IBytes(tierStats.TotalSize),
Objects: strconv.Itoa(tierStats.NumObjects),
Versions: strconv.Itoa(tierStats.NumVersions),
},
Status: client.verifyTierStatus(ctx, tierData.Name) == nil,
Status: status,
})
case madmin.MinIO:
tiersList = append(tiersList, &models.Tier{
@@ -129,11 +140,11 @@ func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse,
Prefix: tierData.MinIO.Prefix,
Region: tierData.MinIO.Region,
Secretkey: tierData.MinIO.SecretKey,
Usage: humanize.IBytes(stats.TotalSize),
Objects: strconv.Itoa(stats.NumObjects),
Versions: strconv.Itoa(stats.NumVersions),
Usage: humanize.IBytes(tierStats.TotalSize),
Objects: strconv.Itoa(tierStats.NumObjects),
Versions: strconv.Itoa(tierStats.NumVersions),
},
Status: client.verifyTierStatus(ctx, tierData.Name) == nil,
Status: status,
})
case madmin.GCS:
tiersList = append(tiersList, &models.Tier{
@@ -145,11 +156,11 @@ func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse,
Name: tierData.Name,
Prefix: tierData.GCS.Prefix,
Region: tierData.GCS.Region,
Usage: humanize.IBytes(stats.TotalSize),
Objects: strconv.Itoa(stats.NumObjects),
Versions: strconv.Itoa(stats.NumVersions),
Usage: humanize.IBytes(tierStats.TotalSize),
Objects: strconv.Itoa(tierStats.NumObjects),
Versions: strconv.Itoa(tierStats.NumVersions),
},
Status: client.verifyTierStatus(ctx, tierData.Name) == nil,
Status: status,
})
case madmin.Azure:
tiersList = append(tiersList, &models.Tier{
@@ -162,16 +173,16 @@ func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse,
Name: tierData.Name,
Prefix: tierData.Azure.Prefix,
Region: tierData.Azure.Region,
Usage: humanize.IBytes(stats.TotalSize),
Objects: strconv.Itoa(stats.NumObjects),
Versions: strconv.Itoa(stats.NumVersions),
Usage: humanize.IBytes(tierStats.TotalSize),
Objects: strconv.Itoa(tierStats.NumObjects),
Versions: strconv.Itoa(tierStats.NumVersions),
},
Status: client.verifyTierStatus(ctx, tierData.Name) == nil,
Status: status,
})
case madmin.Unsupported:
tiersList = append(tiersList, &models.Tier{
Type: models.TierTypeUnsupported,
Status: client.verifyTierStatus(ctx, tierData.Name) == nil,
Status: status,
})
}
}
@@ -200,6 +211,42 @@ func getTiersResponse(session *models.Principal, params tieringApi.TiersListPara
return tiersResp, nil
}
// getTiersNameResponse returns a response with a list of tiers' names
func getTiersNameResponse(session *models.Principal, params tieringApi.TiersListNamesParams) (*models.TiersNameListResponse, *CodedAPIError) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
// create a minioClient interface implementation
// defining the client to be used
adminClient := AdminClient{Client: mAdmin}
// serialize output
tiersResp, err := getTiersName(ctx, adminClient)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
return tiersResp, nil
}
// getTiersName fetches listTiers and returns a list of the tiers' names
func getTiersName(ctx context.Context, client MinioAdmin) (*models.TiersNameListResponse, error) {
tiers, err := client.listTiers(ctx)
if err != nil {
return nil, err
}
tiersNameList := make([]string, len(tiers))
for i, tierData := range tiers {
tiersNameList[i] = tierData.Name
}
return &models.TiersNameListResponse{
Items: tiersNameList,
}, nil
}
func addTier(ctx context.Context, client MinioAdmin, params *tieringApi.AddTierParams) error {
var cfg *madmin.TierConfig
var err error

View File

@@ -36,12 +36,12 @@ func TestGetTiers(t *testing.T) {
function := "getTiers()"
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
// Test-1 : getBucketLifecycle() get list of tiers
// Test-1 : getTiers() get list of tiers
// mock lifecycle response from MinIO
returnListMock := []*madmin.TierConfig{
{
Version: "V1",
Type: madmin.TierType(0),
Type: madmin.S3,
Name: "S3 Tier",
S3: &madmin.TierS3{
Endpoint: "https://s3tier.test.com/",
@@ -53,6 +53,19 @@ func TestGetTiers(t *testing.T) {
StorageClass: "TT1",
},
},
{
Version: "V1",
Type: madmin.MinIO,
Name: "MinIO Tier",
MinIO: &madmin.TierMinIO{
Endpoint: "https://minio-endpoint.test.com/",
AccessKey: "access",
SecretKey: "secret",
Bucket: "somebucket",
Prefix: "p1",
Region: "us-east-2",
},
},
}
returnStatsMock := []madmin.TierInfo{
@@ -61,6 +74,11 @@ func TestGetTiers(t *testing.T) {
Type: "internal",
Stats: madmin.TierStats{NumObjects: 2, NumVersions: 2, TotalSize: 228915},
},
{
Name: "MinIO Tier",
Type: "internal",
Stats: madmin.TierStats{NumObjects: 10, NumVersions: 3, TotalSize: 132788},
},
{
Name: "S3 Tier",
Type: "s3",
@@ -71,7 +89,7 @@ func TestGetTiers(t *testing.T) {
expectedOutput := &models.TierListResponse{
Items: []*models.Tier{
{
Type: "S3",
Type: models.TierTypeS3,
S3: &models.TierS3{
Accesskey: "Access Key",
Secretkey: "Secret Key",
@@ -85,6 +103,23 @@ func TestGetTiers(t *testing.T) {
Objects: "0",
Versions: "0",
},
Status: false,
},
{
Type: models.TierTypeMinio,
Minio: &models.TierMinio{
Accesskey: "access",
Secretkey: "secret",
Bucket: "somebucket",
Endpoint: "https://minio-endpoint.test.com/",
Name: "MinIO Tier",
Prefix: "p1",
Region: "us-east-2",
Usage: "130 KiB",
Objects: "10",
Versions: "3",
},
Status: false,
},
},
}
@@ -97,47 +132,20 @@ func TestGetTiers(t *testing.T) {
return returnStatsMock, nil
}
minioVerifyTierStatusMock = func(_ context.Context, _ string) error {
return fmt.Errorf("someerror")
}
tiersList, err := getTiers(ctx, adminClient)
if err != nil {
t.Errorf("Failed on %s:, error occurred: %s", function, err.Error())
}
// verify length of tiers list is correct
assert.Equal(len(tiersList.Items), len(returnListMock), fmt.Sprintf("Failed on %s: length of lists is not the same", function))
for i, conf := range returnListMock {
switch conf.Type {
case madmin.TierType(0):
// S3
assert.Equal(expectedOutput.Items[i].S3.Name, conf.Name)
assert.Equal(expectedOutput.Items[i].S3.Bucket, conf.S3.Bucket)
assert.Equal(expectedOutput.Items[i].S3.Prefix, conf.S3.Prefix)
assert.Equal(expectedOutput.Items[i].S3.Accesskey, conf.S3.AccessKey)
assert.Equal(expectedOutput.Items[i].S3.Secretkey, conf.S3.SecretKey)
assert.Equal(expectedOutput.Items[i].S3.Endpoint, conf.S3.Endpoint)
assert.Equal(expectedOutput.Items[i].S3.Region, conf.S3.Region)
assert.Equal(expectedOutput.Items[i].S3.Storageclass, conf.S3.StorageClass)
case madmin.TierType(1):
// Azure
assert.Equal(expectedOutput.Items[i].Azure.Name, conf.Name)
assert.Equal(expectedOutput.Items[i].Azure.Bucket, conf.Azure.Bucket)
assert.Equal(expectedOutput.Items[i].Azure.Prefix, conf.Azure.Prefix)
assert.Equal(expectedOutput.Items[i].Azure.Accountkey, conf.Azure.AccountKey)
assert.Equal(expectedOutput.Items[i].Azure.Accountname, conf.Azure.AccountName)
assert.Equal(expectedOutput.Items[i].Azure.Endpoint, conf.Azure.Endpoint)
assert.Equal(expectedOutput.Items[i].Azure.Region, conf.Azure.Region)
case madmin.TierType(2):
// GCS
assert.Equal(expectedOutput.Items[i].Gcs.Name, conf.Name)
assert.Equal(expectedOutput.Items[i].Gcs.Bucket, conf.GCS.Bucket)
assert.Equal(expectedOutput.Items[i].Gcs.Prefix, conf.GCS.Prefix)
assert.Equal(expectedOutput.Items[i].Gcs.Creds, conf.GCS.Creds)
assert.Equal(expectedOutput.Items[i].Gcs.Endpoint, conf.GCS.Endpoint)
assert.Equal(expectedOutput.Items[i].Gcs.Region, conf.GCS.Region)
}
}
assert.Equal(expectedOutput, tiersList)
// Test-2 : getBucketLifecycle() list is empty
// Test-2 : getTiers() list is empty
returnListMockT2 := []*madmin.TierConfig{}
minioListTiersMock = func(_ context.Context) ([]*madmin.TierConfig, error) {
return returnListMockT2, nil
}
@@ -152,6 +160,78 @@ func TestGetTiers(t *testing.T) {
}
}
func TestGetTiersName(t *testing.T) {
assert := assert.New(t)
// mock minIO client
adminClient := AdminClientMock{}
function := "getTiersName()"
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
// Test-1 : getTiersName() get list tiers' names
// mock lifecycle response from MinIO
returnListMock := []*madmin.TierConfig{
{
Version: "V1",
Type: madmin.S3,
Name: "S3 Tier",
S3: &madmin.TierS3{
Endpoint: "https://s3tier.test.com/",
AccessKey: "Access Key",
SecretKey: "Secret Key",
Bucket: "buckets3",
Prefix: "pref1",
Region: "us-west-1",
StorageClass: "TT1",
},
},
{
Version: "V1",
Type: madmin.MinIO,
Name: "MinIO Tier",
MinIO: &madmin.TierMinIO{
Endpoint: "https://minio-endpoint.test.com/",
AccessKey: "access",
SecretKey: "secret",
Bucket: "somebucket",
Prefix: "p1",
Region: "us-east-2",
},
},
}
expectedOutput := &models.TiersNameListResponse{
Items: []string{"S3 Tier", "MinIO Tier"},
}
minioListTiersMock = func(_ context.Context) ([]*madmin.TierConfig, error) {
return returnListMock, nil
}
tiersList, err := getTiersName(ctx, adminClient)
if err != nil {
t.Errorf("Failed on %s:, error occurred: %s", function, err.Error())
}
// verify length of tiers list is correct
assert.Equal(len(tiersList.Items), len(returnListMock), fmt.Sprintf("Failed on %s: length of lists is not the same", function))
assert.Equal(expectedOutput, tiersList)
// Test-2 : getTiersName() list is empty
returnListMockT2 := []*madmin.TierConfig{}
minioListTiersMock = func(_ context.Context) ([]*madmin.TierConfig, error) {
return returnListMockT2, nil
}
emptyTierList, err := getTiersName(ctx, adminClient)
if err != nil {
t.Errorf("Failed on %s:, error occurred: %s", function, err.Error())
}
if len(emptyTierList.Items) != 0 {
t.Errorf("Failed on %s:, returned list was not empty", function)
}
}
func TestAddTier(t *testing.T) {
assert := assert.New(t)
// mock minIO client

View File

@@ -115,20 +115,8 @@ type MinioAdmin interface {
kmsAPIs(ctx context.Context) ([]madmin.KMSAPI, error)
kmsVersion(ctx context.Context) (*madmin.KMSVersion, error)
createKey(ctx context.Context, key string) error
importKey(ctx context.Context, key string, content []byte) error
listKeys(ctx context.Context, pattern string) ([]madmin.KMSKeyInfo, error)
keyStatus(ctx context.Context, key string) (*madmin.KMSKeyStatus, error)
deleteKey(ctx context.Context, key string) error
setKMSPolicy(ctx context.Context, policy string, content []byte) error
assignPolicy(ctx context.Context, policy string, content []byte) error
describePolicy(ctx context.Context, policy string) (*madmin.KMSDescribePolicy, error)
getKMSPolicy(ctx context.Context, policy string) (*madmin.KMSPolicy, error)
listKMSPolicies(ctx context.Context, pattern string) ([]madmin.KMSPolicyInfo, error)
deletePolicy(ctx context.Context, policy string) error
describeIdentity(ctx context.Context, identity string) (*madmin.KMSDescribeIdentity, error)
describeSelfIdentity(ctx context.Context) (*madmin.KMSDescribeSelfIdentity, error)
deleteIdentity(ctx context.Context, identity string) error
listIdentities(ctx context.Context, pattern string) ([]madmin.KMSIdentityInfo, error)
// IDP
addOrUpdateIDPConfig(ctx context.Context, idpType, cfgName, cfgData string, update bool) (restart bool, err error)
@@ -675,10 +663,6 @@ func (ac AdminClient) createKey(ctx context.Context, key string) error {
return ac.Client.CreateKey(ctx, key)
}
func (ac AdminClient) importKey(ctx context.Context, key string, content []byte) error {
return ac.Client.ImportKey(ctx, key, content)
}
func (ac AdminClient) listKeys(ctx context.Context, pattern string) ([]madmin.KMSKeyInfo, error) {
return ac.Client.ListKeys(ctx, pattern)
}
@@ -687,50 +671,6 @@ func (ac AdminClient) keyStatus(ctx context.Context, key string) (*madmin.KMSKey
return ac.Client.GetKeyStatus(ctx, key)
}
func (ac AdminClient) deleteKey(ctx context.Context, key string) error {
return ac.Client.DeleteKey(ctx, key)
}
func (ac AdminClient) setKMSPolicy(ctx context.Context, policy string, content []byte) error {
return ac.Client.SetKMSPolicy(ctx, policy, content)
}
func (ac AdminClient) assignPolicy(ctx context.Context, policy string, content []byte) error {
return ac.Client.AssignPolicy(ctx, policy, content)
}
func (ac AdminClient) describePolicy(ctx context.Context, policy string) (*madmin.KMSDescribePolicy, error) {
return ac.Client.DescribePolicy(ctx, policy)
}
func (ac AdminClient) getKMSPolicy(ctx context.Context, policy string) (*madmin.KMSPolicy, error) {
return ac.Client.GetPolicy(ctx, policy)
}
func (ac AdminClient) listKMSPolicies(ctx context.Context, pattern string) ([]madmin.KMSPolicyInfo, error) {
return ac.Client.ListPolicies(ctx, pattern)
}
func (ac AdminClient) deletePolicy(ctx context.Context, policy string) error {
return ac.Client.DeletePolicy(ctx, policy)
}
func (ac AdminClient) describeIdentity(ctx context.Context, identity string) (*madmin.KMSDescribeIdentity, error) {
return ac.Client.DescribeIdentity(ctx, identity)
}
func (ac AdminClient) describeSelfIdentity(ctx context.Context) (*madmin.KMSDescribeSelfIdentity, error) {
return ac.Client.DescribeSelfIdentity(ctx)
}
func (ac AdminClient) deleteIdentity(ctx context.Context, identity string) error {
return ac.Client.DeleteIdentity(ctx, identity)
}
func (ac AdminClient) listIdentities(ctx context.Context, pattern string) ([]madmin.KMSIdentityInfo, error) {
return ac.Client.ListIdentities(ctx, pattern)
}
func (ac AdminClient) addOrUpdateIDPConfig(ctx context.Context, idpType, cfgName, cfgData string, update bool) (restart bool, err error) {
return ac.Client.AddOrUpdateIDPConfig(ctx, idpType, cfgName, cfgData, update)
}

File diff suppressed because it is too large Load Diff

View File

@@ -30,6 +30,8 @@ const (
PlanAGPL SubnetPlan = iota
PlanStandard
PlanEnterprise
PlanEnterpriseLite
PlanEnterprisePlus
)
func (sp SubnetPlan) String() string {
@@ -38,6 +40,10 @@ func (sp SubnetPlan) String() string {
return "standard"
case PlanEnterprise:
return "enterprise"
case PlanEnterpriseLite:
return "enterprise-lite"
case PlanEnterprisePlus:
return "enterprise-plus"
default:
return "agpl"
}
@@ -65,6 +71,10 @@ func fetchLicensePlan() {
InstanceLicensePlan = PlanStandard
case "ENTERPRISE":
InstanceLicensePlan = PlanEnterprise
case "ENTERPRISE-LITE":
InstanceLicensePlan = PlanEnterpriseLite
case "ENTERPRISE-PLUS":
InstanceLicensePlan = PlanEnterprisePlus
default:
InstanceLicensePlan = PlanAGPL
}

View File

@@ -296,54 +296,18 @@ func NewConsoleAPI(spec *loads.Document) *ConsoleAPI {
KmsKMSAPIsHandler: k_m_s.KMSAPIsHandlerFunc(func(params k_m_s.KMSAPIsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSAPIs has not yet been implemented")
}),
KmsKMSAssignPolicyHandler: k_m_s.KMSAssignPolicyHandlerFunc(func(params k_m_s.KMSAssignPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSAssignPolicy has not yet been implemented")
}),
KmsKMSCreateKeyHandler: k_m_s.KMSCreateKeyHandlerFunc(func(params k_m_s.KMSCreateKeyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSCreateKey has not yet been implemented")
}),
KmsKMSDeleteIdentityHandler: k_m_s.KMSDeleteIdentityHandlerFunc(func(params k_m_s.KMSDeleteIdentityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDeleteIdentity has not yet been implemented")
}),
KmsKMSDeleteKeyHandler: k_m_s.KMSDeleteKeyHandlerFunc(func(params k_m_s.KMSDeleteKeyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDeleteKey has not yet been implemented")
}),
KmsKMSDeletePolicyHandler: k_m_s.KMSDeletePolicyHandlerFunc(func(params k_m_s.KMSDeletePolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDeletePolicy has not yet been implemented")
}),
KmsKMSDescribeIdentityHandler: k_m_s.KMSDescribeIdentityHandlerFunc(func(params k_m_s.KMSDescribeIdentityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDescribeIdentity has not yet been implemented")
}),
KmsKMSDescribePolicyHandler: k_m_s.KMSDescribePolicyHandlerFunc(func(params k_m_s.KMSDescribePolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDescribePolicy has not yet been implemented")
}),
KmsKMSDescribeSelfIdentityHandler: k_m_s.KMSDescribeSelfIdentityHandlerFunc(func(params k_m_s.KMSDescribeSelfIdentityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDescribeSelfIdentity has not yet been implemented")
}),
KmsKMSGetPolicyHandler: k_m_s.KMSGetPolicyHandlerFunc(func(params k_m_s.KMSGetPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSGetPolicy has not yet been implemented")
}),
KmsKMSImportKeyHandler: k_m_s.KMSImportKeyHandlerFunc(func(params k_m_s.KMSImportKeyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSImportKey has not yet been implemented")
}),
KmsKMSKeyStatusHandler: k_m_s.KMSKeyStatusHandlerFunc(func(params k_m_s.KMSKeyStatusParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSKeyStatus has not yet been implemented")
}),
KmsKMSListIdentitiesHandler: k_m_s.KMSListIdentitiesHandlerFunc(func(params k_m_s.KMSListIdentitiesParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSListIdentities has not yet been implemented")
}),
KmsKMSListKeysHandler: k_m_s.KMSListKeysHandlerFunc(func(params k_m_s.KMSListKeysParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSListKeys has not yet been implemented")
}),
KmsKMSListPoliciesHandler: k_m_s.KMSListPoliciesHandlerFunc(func(params k_m_s.KMSListPoliciesParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSListPolicies has not yet been implemented")
}),
KmsKMSMetricsHandler: k_m_s.KMSMetricsHandlerFunc(func(params k_m_s.KMSMetricsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSMetrics has not yet been implemented")
}),
KmsKMSSetPolicyHandler: k_m_s.KMSSetPolicyHandlerFunc(func(params k_m_s.KMSSetPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSSetPolicy has not yet been implemented")
}),
KmsKMSStatusHandler: k_m_s.KMSStatusHandlerFunc(func(params k_m_s.KMSStatusParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSStatus has not yet been implemented")
}),
@@ -542,6 +506,9 @@ func NewConsoleAPI(spec *loads.Document) *ConsoleAPI {
TieringTiersListHandler: tiering.TiersListHandlerFunc(func(params tiering.TiersListParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation tiering.TiersList has not yet been implemented")
}),
TieringTiersListNamesHandler: tiering.TiersListNamesHandlerFunc(func(params tiering.TiersListNamesParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation tiering.TiersListNames has not yet been implemented")
}),
BucketUpdateBucketLifecycleHandler: bucket.UpdateBucketLifecycleHandlerFunc(func(params bucket.UpdateBucketLifecycleParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation bucket.UpdateBucketLifecycle has not yet been implemented")
}),
@@ -767,38 +734,14 @@ type ConsoleAPI struct {
InspectInspectHandler inspect.InspectHandler
// KmsKMSAPIsHandler sets the operation handler for the k m s a p is operation
KmsKMSAPIsHandler k_m_s.KMSAPIsHandler
// KmsKMSAssignPolicyHandler sets the operation handler for the k m s assign policy operation
KmsKMSAssignPolicyHandler k_m_s.KMSAssignPolicyHandler
// KmsKMSCreateKeyHandler sets the operation handler for the k m s create key operation
KmsKMSCreateKeyHandler k_m_s.KMSCreateKeyHandler
// KmsKMSDeleteIdentityHandler sets the operation handler for the k m s delete identity operation
KmsKMSDeleteIdentityHandler k_m_s.KMSDeleteIdentityHandler
// KmsKMSDeleteKeyHandler sets the operation handler for the k m s delete key operation
KmsKMSDeleteKeyHandler k_m_s.KMSDeleteKeyHandler
// KmsKMSDeletePolicyHandler sets the operation handler for the k m s delete policy operation
KmsKMSDeletePolicyHandler k_m_s.KMSDeletePolicyHandler
// KmsKMSDescribeIdentityHandler sets the operation handler for the k m s describe identity operation
KmsKMSDescribeIdentityHandler k_m_s.KMSDescribeIdentityHandler
// KmsKMSDescribePolicyHandler sets the operation handler for the k m s describe policy operation
KmsKMSDescribePolicyHandler k_m_s.KMSDescribePolicyHandler
// KmsKMSDescribeSelfIdentityHandler sets the operation handler for the k m s describe self identity operation
KmsKMSDescribeSelfIdentityHandler k_m_s.KMSDescribeSelfIdentityHandler
// KmsKMSGetPolicyHandler sets the operation handler for the k m s get policy operation
KmsKMSGetPolicyHandler k_m_s.KMSGetPolicyHandler
// KmsKMSImportKeyHandler sets the operation handler for the k m s import key operation
KmsKMSImportKeyHandler k_m_s.KMSImportKeyHandler
// KmsKMSKeyStatusHandler sets the operation handler for the k m s key status operation
KmsKMSKeyStatusHandler k_m_s.KMSKeyStatusHandler
// KmsKMSListIdentitiesHandler sets the operation handler for the k m s list identities operation
KmsKMSListIdentitiesHandler k_m_s.KMSListIdentitiesHandler
// KmsKMSListKeysHandler sets the operation handler for the k m s list keys operation
KmsKMSListKeysHandler k_m_s.KMSListKeysHandler
// KmsKMSListPoliciesHandler sets the operation handler for the k m s list policies operation
KmsKMSListPoliciesHandler k_m_s.KMSListPoliciesHandler
// KmsKMSMetricsHandler sets the operation handler for the k m s metrics operation
KmsKMSMetricsHandler k_m_s.KMSMetricsHandler
// KmsKMSSetPolicyHandler sets the operation handler for the k m s set policy operation
KmsKMSSetPolicyHandler k_m_s.KMSSetPolicyHandler
// KmsKMSStatusHandler sets the operation handler for the k m s status operation
KmsKMSStatusHandler k_m_s.KMSStatusHandler
// KmsKMSVersionHandler sets the operation handler for the k m s version operation
@@ -931,6 +874,8 @@ type ConsoleAPI struct {
SubnetSubnetRegisterHandler subnet.SubnetRegisterHandler
// TieringTiersListHandler sets the operation handler for the tiers list operation
TieringTiersListHandler tiering.TiersListHandler
// TieringTiersListNamesHandler sets the operation handler for the tiers list names operation
TieringTiersListNamesHandler tiering.TiersListNamesHandler
// BucketUpdateBucketLifecycleHandler sets the operation handler for the update bucket lifecycle operation
BucketUpdateBucketLifecycleHandler bucket.UpdateBucketLifecycleHandler
// IdpUpdateConfigurationHandler sets the operation handler for the update configuration operation
@@ -1245,54 +1190,18 @@ func (o *ConsoleAPI) Validate() error {
if o.KmsKMSAPIsHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSAPIsHandler")
}
if o.KmsKMSAssignPolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSAssignPolicyHandler")
}
if o.KmsKMSCreateKeyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSCreateKeyHandler")
}
if o.KmsKMSDeleteIdentityHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDeleteIdentityHandler")
}
if o.KmsKMSDeleteKeyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDeleteKeyHandler")
}
if o.KmsKMSDeletePolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDeletePolicyHandler")
}
if o.KmsKMSDescribeIdentityHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDescribeIdentityHandler")
}
if o.KmsKMSDescribePolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDescribePolicyHandler")
}
if o.KmsKMSDescribeSelfIdentityHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDescribeSelfIdentityHandler")
}
if o.KmsKMSGetPolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSGetPolicyHandler")
}
if o.KmsKMSImportKeyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSImportKeyHandler")
}
if o.KmsKMSKeyStatusHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSKeyStatusHandler")
}
if o.KmsKMSListIdentitiesHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSListIdentitiesHandler")
}
if o.KmsKMSListKeysHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSListKeysHandler")
}
if o.KmsKMSListPoliciesHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSListPoliciesHandler")
}
if o.KmsKMSMetricsHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSMetricsHandler")
}
if o.KmsKMSSetPolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSSetPolicyHandler")
}
if o.KmsKMSStatusHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSStatusHandler")
}
@@ -1491,6 +1400,9 @@ func (o *ConsoleAPI) Validate() error {
if o.TieringTiersListHandler == nil {
unregistered = append(unregistered, "tiering.TiersListHandler")
}
if o.TieringTiersListNamesHandler == nil {
unregistered = append(unregistered, "tiering.TiersListNamesHandler")
}
if o.BucketUpdateBucketLifecycleHandler == nil {
unregistered = append(unregistered, "bucket.UpdateBucketLifecycleHandler")
}
@@ -1901,43 +1813,7 @@ func (o *ConsoleAPI) initHandlerCache() {
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/policies/{name}/assign"] = k_m_s.NewKMSAssignPolicy(o.context, o.KmsKMSAssignPolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/keys"] = k_m_s.NewKMSCreateKey(o.context, o.KmsKMSCreateKeyHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/kms/identities/{name}"] = k_m_s.NewKMSDeleteIdentity(o.context, o.KmsKMSDeleteIdentityHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/kms/keys/{name}"] = k_m_s.NewKMSDeleteKey(o.context, o.KmsKMSDeleteKeyHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/kms/policies/{name}"] = k_m_s.NewKMSDeletePolicy(o.context, o.KmsKMSDeletePolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/identities/{name}/describe"] = k_m_s.NewKMSDescribeIdentity(o.context, o.KmsKMSDescribeIdentityHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/policies/{name}/describe"] = k_m_s.NewKMSDescribePolicy(o.context, o.KmsKMSDescribePolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/describe-self/identity"] = k_m_s.NewKMSDescribeSelfIdentity(o.context, o.KmsKMSDescribeSelfIdentityHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/policies/{name}"] = k_m_s.NewKMSGetPolicy(o.context, o.KmsKMSGetPolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/keys/{name}/import"] = k_m_s.NewKMSImportKey(o.context, o.KmsKMSImportKeyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
@@ -1945,23 +1821,11 @@ func (o *ConsoleAPI) initHandlerCache() {
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/identities"] = k_m_s.NewKMSListIdentities(o.context, o.KmsKMSListIdentitiesHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/keys"] = k_m_s.NewKMSListKeys(o.context, o.KmsKMSListKeysHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/policies"] = k_m_s.NewKMSListPolicies(o.context, o.KmsKMSListPoliciesHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/metrics"] = k_m_s.NewKMSMetrics(o.context, o.KmsKMSMetricsHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/policies"] = k_m_s.NewKMSSetPolicy(o.context, o.KmsKMSSetPolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
@@ -2226,6 +2090,10 @@ func (o *ConsoleAPI) initHandlerCache() {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/tiers"] = tiering.NewTiersList(o.context, o.TieringTiersListHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/tiers/names"] = tiering.NewTiersListNames(o.context, o.TieringTiersListNamesHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSAssignPolicyHandlerFunc turns a function with the right signature into a k m s assign policy handler
type KMSAssignPolicyHandlerFunc func(KMSAssignPolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSAssignPolicyHandlerFunc) Handle(params KMSAssignPolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSAssignPolicyHandler interface for that can handle valid k m s assign policy params
type KMSAssignPolicyHandler interface {
Handle(KMSAssignPolicyParams, *models.Principal) middleware.Responder
}
// NewKMSAssignPolicy creates a new http.Handler for the k m s assign policy operation
func NewKMSAssignPolicy(ctx *middleware.Context, handler KMSAssignPolicyHandler) *KMSAssignPolicy {
return &KMSAssignPolicy{Context: ctx, Handler: handler}
}
/*
KMSAssignPolicy swagger:route POST /kms/policies/{name}/assign KMS kMSAssignPolicy
KMS assign policy
*/
type KMSAssignPolicy struct {
Context *middleware.Context
Handler KMSAssignPolicyHandler
}
func (o *KMSAssignPolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSAssignPolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,126 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"io"
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/validate"
"github.com/minio/console/models"
)
// NewKMSAssignPolicyParams creates a new KMSAssignPolicyParams object
//
// There are no default values defined in the spec.
func NewKMSAssignPolicyParams() KMSAssignPolicyParams {
return KMSAssignPolicyParams{}
}
// KMSAssignPolicyParams contains all the bound params for the k m s assign policy operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSAssignPolicy
type KMSAssignPolicyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: body
*/
Body *models.KmsAssignPolicyRequest
/*KMS policy name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSAssignPolicyParams() beforehand.
func (o *KMSAssignPolicyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
if runtime.HasBody(r) {
defer r.Body.Close()
var body models.KmsAssignPolicyRequest
if err := route.Consumer.Consume(r.Body, &body); err != nil {
if err == io.EOF {
res = append(res, errors.Required("body", "body", ""))
} else {
res = append(res, errors.NewParseError("body", "body", "", err))
}
} else {
// validate body object
if err := body.Validate(route.Formats); err != nil {
res = append(res, err)
}
ctx := validate.WithOperationRequest(r.Context())
if err := body.ContextValidate(ctx, route.Formats); err != nil {
res = append(res, err)
}
if len(res) == 0 {
o.Body = &body
}
}
} else {
res = append(res, errors.Required("body", "body", ""))
}
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSAssignPolicyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,115 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSAssignPolicyOKCode is the HTTP code returned for type KMSAssignPolicyOK
const KMSAssignPolicyOKCode int = 200
/*
KMSAssignPolicyOK A successful response.
swagger:response kMSAssignPolicyOK
*/
type KMSAssignPolicyOK struct {
}
// NewKMSAssignPolicyOK creates KMSAssignPolicyOK with default headers values
func NewKMSAssignPolicyOK() *KMSAssignPolicyOK {
return &KMSAssignPolicyOK{}
}
// WriteResponse to the client
func (o *KMSAssignPolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSAssignPolicyDefault Generic error response.
swagger:response kMSAssignPolicyDefault
*/
type KMSAssignPolicyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSAssignPolicyDefault creates KMSAssignPolicyDefault with default headers values
func NewKMSAssignPolicyDefault(code int) *KMSAssignPolicyDefault {
if code <= 0 {
code = 500
}
return &KMSAssignPolicyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) WithStatusCode(code int) *KMSAssignPolicyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) WithPayload(payload *models.APIError) *KMSAssignPolicyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSAssignPolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSAssignPolicyURL generates an URL for the k m s assign policy operation
type KMSAssignPolicyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSAssignPolicyURL) WithBasePath(bp string) *KMSAssignPolicyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSAssignPolicyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSAssignPolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policies/{name}/assign"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSAssignPolicyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSAssignPolicyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSAssignPolicyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSAssignPolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSAssignPolicyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSAssignPolicyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSAssignPolicyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDeleteIdentityHandlerFunc turns a function with the right signature into a k m s delete identity handler
type KMSDeleteIdentityHandlerFunc func(KMSDeleteIdentityParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDeleteIdentityHandlerFunc) Handle(params KMSDeleteIdentityParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDeleteIdentityHandler interface for that can handle valid k m s delete identity params
type KMSDeleteIdentityHandler interface {
Handle(KMSDeleteIdentityParams, *models.Principal) middleware.Responder
}
// NewKMSDeleteIdentity creates a new http.Handler for the k m s delete identity operation
func NewKMSDeleteIdentity(ctx *middleware.Context, handler KMSDeleteIdentityHandler) *KMSDeleteIdentity {
return &KMSDeleteIdentity{Context: ctx, Handler: handler}
}
/*
KMSDeleteIdentity swagger:route DELETE /kms/identities/{name} KMS kMSDeleteIdentity
KMS delete identity
*/
type KMSDeleteIdentity struct {
Context *middleware.Context
Handler KMSDeleteIdentityHandler
}
func (o *KMSDeleteIdentity) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDeleteIdentityParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDeleteIdentityParams creates a new KMSDeleteIdentityParams object
//
// There are no default values defined in the spec.
func NewKMSDeleteIdentityParams() KMSDeleteIdentityParams {
return KMSDeleteIdentityParams{}
}
// KMSDeleteIdentityParams contains all the bound params for the k m s delete identity operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDeleteIdentity
type KMSDeleteIdentityParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS identity name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDeleteIdentityParams() beforehand.
func (o *KMSDeleteIdentityParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDeleteIdentityParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,115 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDeleteIdentityOKCode is the HTTP code returned for type KMSDeleteIdentityOK
const KMSDeleteIdentityOKCode int = 200
/*
KMSDeleteIdentityOK A successful response.
swagger:response kMSDeleteIdentityOK
*/
type KMSDeleteIdentityOK struct {
}
// NewKMSDeleteIdentityOK creates KMSDeleteIdentityOK with default headers values
func NewKMSDeleteIdentityOK() *KMSDeleteIdentityOK {
return &KMSDeleteIdentityOK{}
}
// WriteResponse to the client
func (o *KMSDeleteIdentityOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSDeleteIdentityDefault Generic error response.
swagger:response kMSDeleteIdentityDefault
*/
type KMSDeleteIdentityDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSDeleteIdentityDefault creates KMSDeleteIdentityDefault with default headers values
func NewKMSDeleteIdentityDefault(code int) *KMSDeleteIdentityDefault {
if code <= 0 {
code = 500
}
return &KMSDeleteIdentityDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) WithStatusCode(code int) *KMSDeleteIdentityDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) WithPayload(payload *models.APIError) *KMSDeleteIdentityDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDeleteIdentityDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDeleteIdentityURL generates an URL for the k m s delete identity operation
type KMSDeleteIdentityURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteIdentityURL) WithBasePath(bp string) *KMSDeleteIdentityURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteIdentityURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDeleteIdentityURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/identities/{name}"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDeleteIdentityURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDeleteIdentityURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDeleteIdentityURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDeleteIdentityURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDeleteIdentityURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDeleteIdentityURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDeleteIdentityURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDeleteKeyHandlerFunc turns a function with the right signature into a k m s delete key handler
type KMSDeleteKeyHandlerFunc func(KMSDeleteKeyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDeleteKeyHandlerFunc) Handle(params KMSDeleteKeyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDeleteKeyHandler interface for that can handle valid k m s delete key params
type KMSDeleteKeyHandler interface {
Handle(KMSDeleteKeyParams, *models.Principal) middleware.Responder
}
// NewKMSDeleteKey creates a new http.Handler for the k m s delete key operation
func NewKMSDeleteKey(ctx *middleware.Context, handler KMSDeleteKeyHandler) *KMSDeleteKey {
return &KMSDeleteKey{Context: ctx, Handler: handler}
}
/*
KMSDeleteKey swagger:route DELETE /kms/keys/{name} KMS kMSDeleteKey
KMS delete key
*/
type KMSDeleteKey struct {
Context *middleware.Context
Handler KMSDeleteKeyHandler
}
func (o *KMSDeleteKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDeleteKeyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDeleteKeyParams creates a new KMSDeleteKeyParams object
//
// There are no default values defined in the spec.
func NewKMSDeleteKeyParams() KMSDeleteKeyParams {
return KMSDeleteKeyParams{}
}
// KMSDeleteKeyParams contains all the bound params for the k m s delete key operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDeleteKey
type KMSDeleteKeyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS key name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDeleteKeyParams() beforehand.
func (o *KMSDeleteKeyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDeleteKeyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,115 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDeleteKeyOKCode is the HTTP code returned for type KMSDeleteKeyOK
const KMSDeleteKeyOKCode int = 200
/*
KMSDeleteKeyOK A successful response.
swagger:response kMSDeleteKeyOK
*/
type KMSDeleteKeyOK struct {
}
// NewKMSDeleteKeyOK creates KMSDeleteKeyOK with default headers values
func NewKMSDeleteKeyOK() *KMSDeleteKeyOK {
return &KMSDeleteKeyOK{}
}
// WriteResponse to the client
func (o *KMSDeleteKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSDeleteKeyDefault Generic error response.
swagger:response kMSDeleteKeyDefault
*/
type KMSDeleteKeyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSDeleteKeyDefault creates KMSDeleteKeyDefault with default headers values
func NewKMSDeleteKeyDefault(code int) *KMSDeleteKeyDefault {
if code <= 0 {
code = 500
}
return &KMSDeleteKeyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s delete key default response
func (o *KMSDeleteKeyDefault) WithStatusCode(code int) *KMSDeleteKeyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s delete key default response
func (o *KMSDeleteKeyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s delete key default response
func (o *KMSDeleteKeyDefault) WithPayload(payload *models.APIError) *KMSDeleteKeyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s delete key default response
func (o *KMSDeleteKeyDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDeleteKeyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDeleteKeyURL generates an URL for the k m s delete key operation
type KMSDeleteKeyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteKeyURL) WithBasePath(bp string) *KMSDeleteKeyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteKeyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDeleteKeyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/keys/{name}"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDeleteKeyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDeleteKeyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDeleteKeyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDeleteKeyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDeleteKeyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDeleteKeyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDeleteKeyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDeletePolicyHandlerFunc turns a function with the right signature into a k m s delete policy handler
type KMSDeletePolicyHandlerFunc func(KMSDeletePolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDeletePolicyHandlerFunc) Handle(params KMSDeletePolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDeletePolicyHandler interface for that can handle valid k m s delete policy params
type KMSDeletePolicyHandler interface {
Handle(KMSDeletePolicyParams, *models.Principal) middleware.Responder
}
// NewKMSDeletePolicy creates a new http.Handler for the k m s delete policy operation
func NewKMSDeletePolicy(ctx *middleware.Context, handler KMSDeletePolicyHandler) *KMSDeletePolicy {
return &KMSDeletePolicy{Context: ctx, Handler: handler}
}
/*
KMSDeletePolicy swagger:route DELETE /kms/policies/{name} KMS kMSDeletePolicy
KMS delete policy
*/
type KMSDeletePolicy struct {
Context *middleware.Context
Handler KMSDeletePolicyHandler
}
func (o *KMSDeletePolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDeletePolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDeletePolicyParams creates a new KMSDeletePolicyParams object
//
// There are no default values defined in the spec.
func NewKMSDeletePolicyParams() KMSDeletePolicyParams {
return KMSDeletePolicyParams{}
}
// KMSDeletePolicyParams contains all the bound params for the k m s delete policy operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDeletePolicy
type KMSDeletePolicyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS policy name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDeletePolicyParams() beforehand.
func (o *KMSDeletePolicyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDeletePolicyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,115 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDeletePolicyOKCode is the HTTP code returned for type KMSDeletePolicyOK
const KMSDeletePolicyOKCode int = 200
/*
KMSDeletePolicyOK A successful response.
swagger:response kMSDeletePolicyOK
*/
type KMSDeletePolicyOK struct {
}
// NewKMSDeletePolicyOK creates KMSDeletePolicyOK with default headers values
func NewKMSDeletePolicyOK() *KMSDeletePolicyOK {
return &KMSDeletePolicyOK{}
}
// WriteResponse to the client
func (o *KMSDeletePolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSDeletePolicyDefault Generic error response.
swagger:response kMSDeletePolicyDefault
*/
type KMSDeletePolicyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSDeletePolicyDefault creates KMSDeletePolicyDefault with default headers values
func NewKMSDeletePolicyDefault(code int) *KMSDeletePolicyDefault {
if code <= 0 {
code = 500
}
return &KMSDeletePolicyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s delete policy default response
func (o *KMSDeletePolicyDefault) WithStatusCode(code int) *KMSDeletePolicyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s delete policy default response
func (o *KMSDeletePolicyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s delete policy default response
func (o *KMSDeletePolicyDefault) WithPayload(payload *models.APIError) *KMSDeletePolicyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s delete policy default response
func (o *KMSDeletePolicyDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDeletePolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDeletePolicyURL generates an URL for the k m s delete policy operation
type KMSDeletePolicyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeletePolicyURL) WithBasePath(bp string) *KMSDeletePolicyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeletePolicyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDeletePolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policies/{name}"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDeletePolicyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDeletePolicyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDeletePolicyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDeletePolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDeletePolicyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDeletePolicyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDeletePolicyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDescribeIdentityHandlerFunc turns a function with the right signature into a k m s describe identity handler
type KMSDescribeIdentityHandlerFunc func(KMSDescribeIdentityParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDescribeIdentityHandlerFunc) Handle(params KMSDescribeIdentityParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDescribeIdentityHandler interface for that can handle valid k m s describe identity params
type KMSDescribeIdentityHandler interface {
Handle(KMSDescribeIdentityParams, *models.Principal) middleware.Responder
}
// NewKMSDescribeIdentity creates a new http.Handler for the k m s describe identity operation
func NewKMSDescribeIdentity(ctx *middleware.Context, handler KMSDescribeIdentityHandler) *KMSDescribeIdentity {
return &KMSDescribeIdentity{Context: ctx, Handler: handler}
}
/*
KMSDescribeIdentity swagger:route GET /kms/identities/{name}/describe KMS kMSDescribeIdentity
KMS describe identity
*/
type KMSDescribeIdentity struct {
Context *middleware.Context
Handler KMSDescribeIdentityHandler
}
func (o *KMSDescribeIdentity) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDescribeIdentityParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDescribeIdentityParams creates a new KMSDescribeIdentityParams object
//
// There are no default values defined in the spec.
func NewKMSDescribeIdentityParams() KMSDescribeIdentityParams {
return KMSDescribeIdentityParams{}
}
// KMSDescribeIdentityParams contains all the bound params for the k m s describe identity operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDescribeIdentity
type KMSDescribeIdentityParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS identity name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDescribeIdentityParams() beforehand.
func (o *KMSDescribeIdentityParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDescribeIdentityParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,135 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDescribeIdentityOKCode is the HTTP code returned for type KMSDescribeIdentityOK
const KMSDescribeIdentityOKCode int = 200
/*
KMSDescribeIdentityOK A successful response.
swagger:response kMSDescribeIdentityOK
*/
type KMSDescribeIdentityOK struct {
/*
In: Body
*/
Payload *models.KmsDescribeIdentityResponse `json:"body,omitempty"`
}
// NewKMSDescribeIdentityOK creates KMSDescribeIdentityOK with default headers values
func NewKMSDescribeIdentityOK() *KMSDescribeIdentityOK {
return &KMSDescribeIdentityOK{}
}
// WithPayload adds the payload to the k m s describe identity o k response
func (o *KMSDescribeIdentityOK) WithPayload(payload *models.KmsDescribeIdentityResponse) *KMSDescribeIdentityOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s describe identity o k response
func (o *KMSDescribeIdentityOK) SetPayload(payload *models.KmsDescribeIdentityResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDescribeIdentityOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
/*
KMSDescribeIdentityDefault Generic error response.
swagger:response kMSDescribeIdentityDefault
*/
type KMSDescribeIdentityDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSDescribeIdentityDefault creates KMSDescribeIdentityDefault with default headers values
func NewKMSDescribeIdentityDefault(code int) *KMSDescribeIdentityDefault {
if code <= 0 {
code = 500
}
return &KMSDescribeIdentityDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s describe identity default response
func (o *KMSDescribeIdentityDefault) WithStatusCode(code int) *KMSDescribeIdentityDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s describe identity default response
func (o *KMSDescribeIdentityDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s describe identity default response
func (o *KMSDescribeIdentityDefault) WithPayload(payload *models.APIError) *KMSDescribeIdentityDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s describe identity default response
func (o *KMSDescribeIdentityDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDescribeIdentityDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDescribeIdentityURL generates an URL for the k m s describe identity operation
type KMSDescribeIdentityURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDescribeIdentityURL) WithBasePath(bp string) *KMSDescribeIdentityURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDescribeIdentityURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDescribeIdentityURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/identities/{name}/describe"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDescribeIdentityURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDescribeIdentityURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDescribeIdentityURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDescribeIdentityURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDescribeIdentityURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDescribeIdentityURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDescribeIdentityURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDescribePolicyHandlerFunc turns a function with the right signature into a k m s describe policy handler
type KMSDescribePolicyHandlerFunc func(KMSDescribePolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDescribePolicyHandlerFunc) Handle(params KMSDescribePolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDescribePolicyHandler interface for that can handle valid k m s describe policy params
type KMSDescribePolicyHandler interface {
Handle(KMSDescribePolicyParams, *models.Principal) middleware.Responder
}
// NewKMSDescribePolicy creates a new http.Handler for the k m s describe policy operation
func NewKMSDescribePolicy(ctx *middleware.Context, handler KMSDescribePolicyHandler) *KMSDescribePolicy {
return &KMSDescribePolicy{Context: ctx, Handler: handler}
}
/*
KMSDescribePolicy swagger:route GET /kms/policies/{name}/describe KMS kMSDescribePolicy
KMS describe policy
*/
type KMSDescribePolicy struct {
Context *middleware.Context
Handler KMSDescribePolicyHandler
}
func (o *KMSDescribePolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDescribePolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDescribePolicyParams creates a new KMSDescribePolicyParams object
//
// There are no default values defined in the spec.
func NewKMSDescribePolicyParams() KMSDescribePolicyParams {
return KMSDescribePolicyParams{}
}
// KMSDescribePolicyParams contains all the bound params for the k m s describe policy operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDescribePolicy
type KMSDescribePolicyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS policy name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDescribePolicyParams() beforehand.
func (o *KMSDescribePolicyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDescribePolicyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,135 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDescribePolicyOKCode is the HTTP code returned for type KMSDescribePolicyOK
const KMSDescribePolicyOKCode int = 200
/*
KMSDescribePolicyOK A successful response.
swagger:response kMSDescribePolicyOK
*/
type KMSDescribePolicyOK struct {
/*
In: Body
*/
Payload *models.KmsDescribePolicyResponse `json:"body,omitempty"`
}
// NewKMSDescribePolicyOK creates KMSDescribePolicyOK with default headers values
func NewKMSDescribePolicyOK() *KMSDescribePolicyOK {
return &KMSDescribePolicyOK{}
}
// WithPayload adds the payload to the k m s describe policy o k response
func (o *KMSDescribePolicyOK) WithPayload(payload *models.KmsDescribePolicyResponse) *KMSDescribePolicyOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s describe policy o k response
func (o *KMSDescribePolicyOK) SetPayload(payload *models.KmsDescribePolicyResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDescribePolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
/*
KMSDescribePolicyDefault Generic error response.
swagger:response kMSDescribePolicyDefault
*/
type KMSDescribePolicyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSDescribePolicyDefault creates KMSDescribePolicyDefault with default headers values
func NewKMSDescribePolicyDefault(code int) *KMSDescribePolicyDefault {
if code <= 0 {
code = 500
}
return &KMSDescribePolicyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s describe policy default response
func (o *KMSDescribePolicyDefault) WithStatusCode(code int) *KMSDescribePolicyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s describe policy default response
func (o *KMSDescribePolicyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s describe policy default response
func (o *KMSDescribePolicyDefault) WithPayload(payload *models.APIError) *KMSDescribePolicyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s describe policy default response
func (o *KMSDescribePolicyDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDescribePolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDescribePolicyURL generates an URL for the k m s describe policy operation
type KMSDescribePolicyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDescribePolicyURL) WithBasePath(bp string) *KMSDescribePolicyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDescribePolicyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDescribePolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policies/{name}/describe"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDescribePolicyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDescribePolicyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDescribePolicyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDescribePolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDescribePolicyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDescribePolicyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDescribePolicyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDescribeSelfIdentityHandlerFunc turns a function with the right signature into a k m s describe self identity handler
type KMSDescribeSelfIdentityHandlerFunc func(KMSDescribeSelfIdentityParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDescribeSelfIdentityHandlerFunc) Handle(params KMSDescribeSelfIdentityParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDescribeSelfIdentityHandler interface for that can handle valid k m s describe self identity params
type KMSDescribeSelfIdentityHandler interface {
Handle(KMSDescribeSelfIdentityParams, *models.Principal) middleware.Responder
}
// NewKMSDescribeSelfIdentity creates a new http.Handler for the k m s describe self identity operation
func NewKMSDescribeSelfIdentity(ctx *middleware.Context, handler KMSDescribeSelfIdentityHandler) *KMSDescribeSelfIdentity {
return &KMSDescribeSelfIdentity{Context: ctx, Handler: handler}
}
/*
KMSDescribeSelfIdentity swagger:route GET /kms/describe-self/identity KMS kMSDescribeSelfIdentity
KMS describe self identity
*/
type KMSDescribeSelfIdentity struct {
Context *middleware.Context
Handler KMSDescribeSelfIdentityHandler
}
func (o *KMSDescribeSelfIdentity) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDescribeSelfIdentityParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,135 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDescribeSelfIdentityOKCode is the HTTP code returned for type KMSDescribeSelfIdentityOK
const KMSDescribeSelfIdentityOKCode int = 200
/*
KMSDescribeSelfIdentityOK A successful response.
swagger:response kMSDescribeSelfIdentityOK
*/
type KMSDescribeSelfIdentityOK struct {
/*
In: Body
*/
Payload *models.KmsDescribeSelfIdentityResponse `json:"body,omitempty"`
}
// NewKMSDescribeSelfIdentityOK creates KMSDescribeSelfIdentityOK with default headers values
func NewKMSDescribeSelfIdentityOK() *KMSDescribeSelfIdentityOK {
return &KMSDescribeSelfIdentityOK{}
}
// WithPayload adds the payload to the k m s describe self identity o k response
func (o *KMSDescribeSelfIdentityOK) WithPayload(payload *models.KmsDescribeSelfIdentityResponse) *KMSDescribeSelfIdentityOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s describe self identity o k response
func (o *KMSDescribeSelfIdentityOK) SetPayload(payload *models.KmsDescribeSelfIdentityResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDescribeSelfIdentityOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
/*
KMSDescribeSelfIdentityDefault Generic error response.
swagger:response kMSDescribeSelfIdentityDefault
*/
type KMSDescribeSelfIdentityDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSDescribeSelfIdentityDefault creates KMSDescribeSelfIdentityDefault with default headers values
func NewKMSDescribeSelfIdentityDefault(code int) *KMSDescribeSelfIdentityDefault {
if code <= 0 {
code = 500
}
return &KMSDescribeSelfIdentityDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s describe self identity default response
func (o *KMSDescribeSelfIdentityDefault) WithStatusCode(code int) *KMSDescribeSelfIdentityDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s describe self identity default response
func (o *KMSDescribeSelfIdentityDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s describe self identity default response
func (o *KMSDescribeSelfIdentityDefault) WithPayload(payload *models.APIError) *KMSDescribeSelfIdentityDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s describe self identity default response
func (o *KMSDescribeSelfIdentityDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDescribeSelfIdentityDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,104 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
)
// KMSDescribeSelfIdentityURL generates an URL for the k m s describe self identity operation
type KMSDescribeSelfIdentityURL struct {
_basePath string
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDescribeSelfIdentityURL) WithBasePath(bp string) *KMSDescribeSelfIdentityURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDescribeSelfIdentityURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDescribeSelfIdentityURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/describe-self/identity"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDescribeSelfIdentityURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDescribeSelfIdentityURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDescribeSelfIdentityURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDescribeSelfIdentityURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDescribeSelfIdentityURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDescribeSelfIdentityURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSGetPolicyHandlerFunc turns a function with the right signature into a k m s get policy handler
type KMSGetPolicyHandlerFunc func(KMSGetPolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSGetPolicyHandlerFunc) Handle(params KMSGetPolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSGetPolicyHandler interface for that can handle valid k m s get policy params
type KMSGetPolicyHandler interface {
Handle(KMSGetPolicyParams, *models.Principal) middleware.Responder
}
// NewKMSGetPolicy creates a new http.Handler for the k m s get policy operation
func NewKMSGetPolicy(ctx *middleware.Context, handler KMSGetPolicyHandler) *KMSGetPolicy {
return &KMSGetPolicy{Context: ctx, Handler: handler}
}
/*
KMSGetPolicy swagger:route GET /kms/policies/{name} KMS kMSGetPolicy
KMS get policy
*/
type KMSGetPolicy struct {
Context *middleware.Context
Handler KMSGetPolicyHandler
}
func (o *KMSGetPolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSGetPolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSGetPolicyParams creates a new KMSGetPolicyParams object
//
// There are no default values defined in the spec.
func NewKMSGetPolicyParams() KMSGetPolicyParams {
return KMSGetPolicyParams{}
}
// KMSGetPolicyParams contains all the bound params for the k m s get policy operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSGetPolicy
type KMSGetPolicyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS policy name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSGetPolicyParams() beforehand.
func (o *KMSGetPolicyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSGetPolicyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSGetPolicyURL generates an URL for the k m s get policy operation
type KMSGetPolicyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSGetPolicyURL) WithBasePath(bp string) *KMSGetPolicyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSGetPolicyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSGetPolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policies/{name}"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSGetPolicyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSGetPolicyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSGetPolicyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSGetPolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSGetPolicyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSGetPolicyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSGetPolicyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,126 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"io"
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/validate"
"github.com/minio/console/models"
)
// NewKMSImportKeyParams creates a new KMSImportKeyParams object
//
// There are no default values defined in the spec.
func NewKMSImportKeyParams() KMSImportKeyParams {
return KMSImportKeyParams{}
}
// KMSImportKeyParams contains all the bound params for the k m s import key operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSImportKey
type KMSImportKeyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: body
*/
Body *models.KmsImportKeyRequest
/*KMS key name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSImportKeyParams() beforehand.
func (o *KMSImportKeyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
if runtime.HasBody(r) {
defer r.Body.Close()
var body models.KmsImportKeyRequest
if err := route.Consumer.Consume(r.Body, &body); err != nil {
if err == io.EOF {
res = append(res, errors.Required("body", "body", ""))
} else {
res = append(res, errors.NewParseError("body", "body", "", err))
}
} else {
// validate body object
if err := body.Validate(route.Formats); err != nil {
res = append(res, err)
}
ctx := validate.WithOperationRequest(r.Context())
if err := body.ContextValidate(ctx, route.Formats); err != nil {
res = append(res, err)
}
if len(res) == 0 {
o.Body = &body
}
}
} else {
res = append(res, errors.Required("body", "body", ""))
}
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSImportKeyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -1,115 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSImportKeyCreatedCode is the HTTP code returned for type KMSImportKeyCreated
const KMSImportKeyCreatedCode int = 201
/*
KMSImportKeyCreated A successful response.
swagger:response kMSImportKeyCreated
*/
type KMSImportKeyCreated struct {
}
// NewKMSImportKeyCreated creates KMSImportKeyCreated with default headers values
func NewKMSImportKeyCreated() *KMSImportKeyCreated {
return &KMSImportKeyCreated{}
}
// WriteResponse to the client
func (o *KMSImportKeyCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(201)
}
/*
KMSImportKeyDefault Generic error response.
swagger:response kMSImportKeyDefault
*/
type KMSImportKeyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSImportKeyDefault creates KMSImportKeyDefault with default headers values
func NewKMSImportKeyDefault(code int) *KMSImportKeyDefault {
if code <= 0 {
code = 500
}
return &KMSImportKeyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s import key default response
func (o *KMSImportKeyDefault) WithStatusCode(code int) *KMSImportKeyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s import key default response
func (o *KMSImportKeyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s import key default response
func (o *KMSImportKeyDefault) WithPayload(payload *models.APIError) *KMSImportKeyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s import key default response
func (o *KMSImportKeyDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSImportKeyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSImportKeyURL generates an URL for the k m s import key operation
type KMSImportKeyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSImportKeyURL) WithBasePath(bp string) *KMSImportKeyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSImportKeyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSImportKeyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/keys/{name}/import"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSImportKeyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSImportKeyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSImportKeyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSImportKeyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSImportKeyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSImportKeyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSImportKeyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSListIdentitiesHandlerFunc turns a function with the right signature into a k m s list identities handler
type KMSListIdentitiesHandlerFunc func(KMSListIdentitiesParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSListIdentitiesHandlerFunc) Handle(params KMSListIdentitiesParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSListIdentitiesHandler interface for that can handle valid k m s list identities params
type KMSListIdentitiesHandler interface {
Handle(KMSListIdentitiesParams, *models.Principal) middleware.Responder
}
// NewKMSListIdentities creates a new http.Handler for the k m s list identities operation
func NewKMSListIdentities(ctx *middleware.Context, handler KMSListIdentitiesHandler) *KMSListIdentities {
return &KMSListIdentities{Context: ctx, Handler: handler}
}
/*
KMSListIdentities swagger:route GET /kms/identities KMS kMSListIdentities
KMS list identities
*/
type KMSListIdentities struct {
Context *middleware.Context
Handler KMSListIdentitiesHandler
}
func (o *KMSListIdentities) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSListIdentitiesParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,94 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSListIdentitiesParams creates a new KMSListIdentitiesParams object
//
// There are no default values defined in the spec.
func NewKMSListIdentitiesParams() KMSListIdentitiesParams {
return KMSListIdentitiesParams{}
}
// KMSListIdentitiesParams contains all the bound params for the k m s list identities operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSListIdentities
type KMSListIdentitiesParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*pattern to retrieve identities
In: query
*/
Pattern *string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSListIdentitiesParams() beforehand.
func (o *KMSListIdentitiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
qs := runtime.Values(r.URL.Query())
qPattern, qhkPattern, _ := qs.GetOK("pattern")
if err := o.bindPattern(qPattern, qhkPattern, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindPattern binds and validates parameter Pattern from query.
func (o *KMSListIdentitiesParams) bindPattern(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: false
// AllowEmptyValue: false
if raw == "" { // empty values pass all other validations
return nil
}
o.Pattern = &raw
return nil
}

View File

@@ -1,135 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSListIdentitiesOKCode is the HTTP code returned for type KMSListIdentitiesOK
const KMSListIdentitiesOKCode int = 200
/*
KMSListIdentitiesOK A successful response.
swagger:response kMSListIdentitiesOK
*/
type KMSListIdentitiesOK struct {
/*
In: Body
*/
Payload *models.KmsListIdentitiesResponse `json:"body,omitempty"`
}
// NewKMSListIdentitiesOK creates KMSListIdentitiesOK with default headers values
func NewKMSListIdentitiesOK() *KMSListIdentitiesOK {
return &KMSListIdentitiesOK{}
}
// WithPayload adds the payload to the k m s list identities o k response
func (o *KMSListIdentitiesOK) WithPayload(payload *models.KmsListIdentitiesResponse) *KMSListIdentitiesOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s list identities o k response
func (o *KMSListIdentitiesOK) SetPayload(payload *models.KmsListIdentitiesResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSListIdentitiesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
/*
KMSListIdentitiesDefault Generic error response.
swagger:response kMSListIdentitiesDefault
*/
type KMSListIdentitiesDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSListIdentitiesDefault creates KMSListIdentitiesDefault with default headers values
func NewKMSListIdentitiesDefault(code int) *KMSListIdentitiesDefault {
if code <= 0 {
code = 500
}
return &KMSListIdentitiesDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s list identities default response
func (o *KMSListIdentitiesDefault) WithStatusCode(code int) *KMSListIdentitiesDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s list identities default response
func (o *KMSListIdentitiesDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s list identities default response
func (o *KMSListIdentitiesDefault) WithPayload(payload *models.APIError) *KMSListIdentitiesDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s list identities default response
func (o *KMSListIdentitiesDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSListIdentitiesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,120 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
)
// KMSListIdentitiesURL generates an URL for the k m s list identities operation
type KMSListIdentitiesURL struct {
Pattern *string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSListIdentitiesURL) WithBasePath(bp string) *KMSListIdentitiesURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSListIdentitiesURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSListIdentitiesURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/identities"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)
var patternQ string
if o.Pattern != nil {
patternQ = *o.Pattern
}
if patternQ != "" {
qs.Set("pattern", patternQ)
}
_result.RawQuery = qs.Encode()
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSListIdentitiesURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSListIdentitiesURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSListIdentitiesURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSListIdentitiesURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSListIdentitiesURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSListIdentitiesURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSListPoliciesHandlerFunc turns a function with the right signature into a k m s list policies handler
type KMSListPoliciesHandlerFunc func(KMSListPoliciesParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSListPoliciesHandlerFunc) Handle(params KMSListPoliciesParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSListPoliciesHandler interface for that can handle valid k m s list policies params
type KMSListPoliciesHandler interface {
Handle(KMSListPoliciesParams, *models.Principal) middleware.Responder
}
// NewKMSListPolicies creates a new http.Handler for the k m s list policies operation
func NewKMSListPolicies(ctx *middleware.Context, handler KMSListPoliciesHandler) *KMSListPolicies {
return &KMSListPolicies{Context: ctx, Handler: handler}
}
/*
KMSListPolicies swagger:route GET /kms/policies KMS kMSListPolicies
KMS list policies
*/
type KMSListPolicies struct {
Context *middleware.Context
Handler KMSListPoliciesHandler
}
func (o *KMSListPolicies) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSListPoliciesParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,94 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSListPoliciesParams creates a new KMSListPoliciesParams object
//
// There are no default values defined in the spec.
func NewKMSListPoliciesParams() KMSListPoliciesParams {
return KMSListPoliciesParams{}
}
// KMSListPoliciesParams contains all the bound params for the k m s list policies operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSListPolicies
type KMSListPoliciesParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*pattern to retrieve policies
In: query
*/
Pattern *string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSListPoliciesParams() beforehand.
func (o *KMSListPoliciesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
qs := runtime.Values(r.URL.Query())
qPattern, qhkPattern, _ := qs.GetOK("pattern")
if err := o.bindPattern(qPattern, qhkPattern, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindPattern binds and validates parameter Pattern from query.
func (o *KMSListPoliciesParams) bindPattern(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: false
// AllowEmptyValue: false
if raw == "" { // empty values pass all other validations
return nil
}
o.Pattern = &raw
return nil
}

View File

@@ -1,135 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSListPoliciesOKCode is the HTTP code returned for type KMSListPoliciesOK
const KMSListPoliciesOKCode int = 200
/*
KMSListPoliciesOK A successful response.
swagger:response kMSListPoliciesOK
*/
type KMSListPoliciesOK struct {
/*
In: Body
*/
Payload *models.KmsListPoliciesResponse `json:"body,omitempty"`
}
// NewKMSListPoliciesOK creates KMSListPoliciesOK with default headers values
func NewKMSListPoliciesOK() *KMSListPoliciesOK {
return &KMSListPoliciesOK{}
}
// WithPayload adds the payload to the k m s list policies o k response
func (o *KMSListPoliciesOK) WithPayload(payload *models.KmsListPoliciesResponse) *KMSListPoliciesOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s list policies o k response
func (o *KMSListPoliciesOK) SetPayload(payload *models.KmsListPoliciesResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSListPoliciesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
/*
KMSListPoliciesDefault Generic error response.
swagger:response kMSListPoliciesDefault
*/
type KMSListPoliciesDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSListPoliciesDefault creates KMSListPoliciesDefault with default headers values
func NewKMSListPoliciesDefault(code int) *KMSListPoliciesDefault {
if code <= 0 {
code = 500
}
return &KMSListPoliciesDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s list policies default response
func (o *KMSListPoliciesDefault) WithStatusCode(code int) *KMSListPoliciesDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s list policies default response
func (o *KMSListPoliciesDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s list policies default response
func (o *KMSListPoliciesDefault) WithPayload(payload *models.APIError) *KMSListPoliciesDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s list policies default response
func (o *KMSListPoliciesDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSListPoliciesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -1,120 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
)
// KMSListPoliciesURL generates an URL for the k m s list policies operation
type KMSListPoliciesURL struct {
Pattern *string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSListPoliciesURL) WithBasePath(bp string) *KMSListPoliciesURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSListPoliciesURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSListPoliciesURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policies"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)
var patternQ string
if o.Pattern != nil {
patternQ = *o.Pattern
}
if patternQ != "" {
qs.Set("pattern", patternQ)
}
_result.RawQuery = qs.Encode()
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSListPoliciesURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSListPoliciesURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSListPoliciesURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSListPoliciesURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSListPoliciesURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSListPoliciesURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSSetPolicyHandlerFunc turns a function with the right signature into a k m s set policy handler
type KMSSetPolicyHandlerFunc func(KMSSetPolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSSetPolicyHandlerFunc) Handle(params KMSSetPolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSSetPolicyHandler interface for that can handle valid k m s set policy params
type KMSSetPolicyHandler interface {
Handle(KMSSetPolicyParams, *models.Principal) middleware.Responder
}
// NewKMSSetPolicy creates a new http.Handler for the k m s set policy operation
func NewKMSSetPolicy(ctx *middleware.Context, handler KMSSetPolicyHandler) *KMSSetPolicy {
return &KMSSetPolicy{Context: ctx, Handler: handler}
}
/*
KMSSetPolicy swagger:route POST /kms/policies KMS kMSSetPolicy
KMS set policy
*/
type KMSSetPolicy struct {
Context *middleware.Context
Handler KMSSetPolicyHandler
}
func (o *KMSSetPolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSSetPolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -1,101 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"io"
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/validate"
"github.com/minio/console/models"
)
// NewKMSSetPolicyParams creates a new KMSSetPolicyParams object
//
// There are no default values defined in the spec.
func NewKMSSetPolicyParams() KMSSetPolicyParams {
return KMSSetPolicyParams{}
}
// KMSSetPolicyParams contains all the bound params for the k m s set policy operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSSetPolicy
type KMSSetPolicyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: body
*/
Body *models.KmsSetPolicyRequest
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSSetPolicyParams() beforehand.
func (o *KMSSetPolicyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
if runtime.HasBody(r) {
defer r.Body.Close()
var body models.KmsSetPolicyRequest
if err := route.Consumer.Consume(r.Body, &body); err != nil {
if err == io.EOF {
res = append(res, errors.Required("body", "body", ""))
} else {
res = append(res, errors.NewParseError("body", "body", "", err))
}
} else {
// validate body object
if err := body.Validate(route.Formats); err != nil {
res = append(res, err)
}
ctx := validate.WithOperationRequest(r.Context())
if err := body.ContextValidate(ctx, route.Formats); err != nil {
res = append(res, err)
}
if len(res) == 0 {
o.Body = &body
}
}
} else {
res = append(res, errors.Required("body", "body", ""))
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@@ -1,115 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSSetPolicyOKCode is the HTTP code returned for type KMSSetPolicyOK
const KMSSetPolicyOKCode int = 200
/*
KMSSetPolicyOK A successful response.
swagger:response kMSSetPolicyOK
*/
type KMSSetPolicyOK struct {
}
// NewKMSSetPolicyOK creates KMSSetPolicyOK with default headers values
func NewKMSSetPolicyOK() *KMSSetPolicyOK {
return &KMSSetPolicyOK{}
}
// WriteResponse to the client
func (o *KMSSetPolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSSetPolicyDefault Generic error response.
swagger:response kMSSetPolicyDefault
*/
type KMSSetPolicyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSSetPolicyDefault creates KMSSetPolicyDefault with default headers values
func NewKMSSetPolicyDefault(code int) *KMSSetPolicyDefault {
if code <= 0 {
code = 500
}
return &KMSSetPolicyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s set policy default response
func (o *KMSSetPolicyDefault) WithStatusCode(code int) *KMSSetPolicyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s set policy default response
func (o *KMSSetPolicyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s set policy default response
func (o *KMSSetPolicyDefault) WithPayload(payload *models.APIError) *KMSSetPolicyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s set policy default response
func (o *KMSSetPolicyDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSSetPolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -17,7 +17,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
package tiering
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
@@ -30,40 +30,40 @@ import (
"github.com/minio/console/models"
)
// KMSImportKeyHandlerFunc turns a function with the right signature into a k m s import key handler
type KMSImportKeyHandlerFunc func(KMSImportKeyParams, *models.Principal) middleware.Responder
// TiersListNamesHandlerFunc turns a function with the right signature into a tiers list names handler
type TiersListNamesHandlerFunc func(TiersListNamesParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSImportKeyHandlerFunc) Handle(params KMSImportKeyParams, principal *models.Principal) middleware.Responder {
func (fn TiersListNamesHandlerFunc) Handle(params TiersListNamesParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSImportKeyHandler interface for that can handle valid k m s import key params
type KMSImportKeyHandler interface {
Handle(KMSImportKeyParams, *models.Principal) middleware.Responder
// TiersListNamesHandler interface for that can handle valid tiers list names params
type TiersListNamesHandler interface {
Handle(TiersListNamesParams, *models.Principal) middleware.Responder
}
// NewKMSImportKey creates a new http.Handler for the k m s import key operation
func NewKMSImportKey(ctx *middleware.Context, handler KMSImportKeyHandler) *KMSImportKey {
return &KMSImportKey{Context: ctx, Handler: handler}
// NewTiersListNames creates a new http.Handler for the tiers list names operation
func NewTiersListNames(ctx *middleware.Context, handler TiersListNamesHandler) *TiersListNames {
return &TiersListNames{Context: ctx, Handler: handler}
}
/*
KMSImportKey swagger:route POST /kms/keys/{name}/import KMS kMSImportKey
TiersListNames swagger:route GET /admin/tiers/names Tiering tiersListNames
KMS import key
Returns a list of tiers' names for ilm
*/
type KMSImportKey struct {
type TiersListNames struct {
Context *middleware.Context
Handler KMSImportKeyHandler
Handler TiersListNamesHandler
}
func (o *KMSImportKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
func (o *TiersListNames) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSImportKeyParams()
var Params = NewTiersListNamesParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)

View File

@@ -17,7 +17,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
package tiering
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@@ -29,19 +29,19 @@ import (
"github.com/go-openapi/runtime/middleware"
)
// NewKMSDescribeSelfIdentityParams creates a new KMSDescribeSelfIdentityParams object
// NewTiersListNamesParams creates a new TiersListNamesParams object
//
// There are no default values defined in the spec.
func NewKMSDescribeSelfIdentityParams() KMSDescribeSelfIdentityParams {
func NewTiersListNamesParams() TiersListNamesParams {
return KMSDescribeSelfIdentityParams{}
return TiersListNamesParams{}
}
// KMSDescribeSelfIdentityParams contains all the bound params for the k m s describe self identity operation
// TiersListNamesParams contains all the bound params for the tiers list names operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDescribeSelfIdentity
type KMSDescribeSelfIdentityParams struct {
// swagger:parameters TiersListNames
type TiersListNamesParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
@@ -50,8 +50,8 @@ type KMSDescribeSelfIdentityParams struct {
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDescribeSelfIdentityParams() beforehand.
func (o *KMSDescribeSelfIdentityParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
// To ensure default values, the struct must have been initialized with NewTiersListNamesParams() beforehand.
func (o *TiersListNamesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r

View File

@@ -17,7 +17,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
package tiering
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@@ -30,41 +30,41 @@ import (
"github.com/minio/console/models"
)
// KMSGetPolicyOKCode is the HTTP code returned for type KMSGetPolicyOK
const KMSGetPolicyOKCode int = 200
// TiersListNamesOKCode is the HTTP code returned for type TiersListNamesOK
const TiersListNamesOKCode int = 200
/*
KMSGetPolicyOK A successful response.
TiersListNamesOK A successful response.
swagger:response kMSGetPolicyOK
swagger:response tiersListNamesOK
*/
type KMSGetPolicyOK struct {
type TiersListNamesOK struct {
/*
In: Body
*/
Payload *models.KmsGetPolicyResponse `json:"body,omitempty"`
Payload *models.TiersNameListResponse `json:"body,omitempty"`
}
// NewKMSGetPolicyOK creates KMSGetPolicyOK with default headers values
func NewKMSGetPolicyOK() *KMSGetPolicyOK {
// NewTiersListNamesOK creates TiersListNamesOK with default headers values
func NewTiersListNamesOK() *TiersListNamesOK {
return &KMSGetPolicyOK{}
return &TiersListNamesOK{}
}
// WithPayload adds the payload to the k m s get policy o k response
func (o *KMSGetPolicyOK) WithPayload(payload *models.KmsGetPolicyResponse) *KMSGetPolicyOK {
// WithPayload adds the payload to the tiers list names o k response
func (o *TiersListNamesOK) WithPayload(payload *models.TiersNameListResponse) *TiersListNamesOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s get policy o k response
func (o *KMSGetPolicyOK) SetPayload(payload *models.KmsGetPolicyResponse) {
// SetPayload sets the payload to the tiers list names o k response
func (o *TiersListNamesOK) SetPayload(payload *models.TiersNameListResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSGetPolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
func (o *TiersListNamesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
@@ -76,11 +76,11 @@ func (o *KMSGetPolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.
}
/*
KMSGetPolicyDefault Generic error response.
TiersListNamesDefault Generic error response.
swagger:response kMSGetPolicyDefault
swagger:response tiersListNamesDefault
*/
type KMSGetPolicyDefault struct {
type TiersListNamesDefault struct {
_statusCode int
/*
@@ -89,41 +89,41 @@ type KMSGetPolicyDefault struct {
Payload *models.APIError `json:"body,omitempty"`
}
// NewKMSGetPolicyDefault creates KMSGetPolicyDefault with default headers values
func NewKMSGetPolicyDefault(code int) *KMSGetPolicyDefault {
// NewTiersListNamesDefault creates TiersListNamesDefault with default headers values
func NewTiersListNamesDefault(code int) *TiersListNamesDefault {
if code <= 0 {
code = 500
}
return &KMSGetPolicyDefault{
return &TiersListNamesDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s get policy default response
func (o *KMSGetPolicyDefault) WithStatusCode(code int) *KMSGetPolicyDefault {
// WithStatusCode adds the status to the tiers list names default response
func (o *TiersListNamesDefault) WithStatusCode(code int) *TiersListNamesDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s get policy default response
func (o *KMSGetPolicyDefault) SetStatusCode(code int) {
// SetStatusCode sets the status to the tiers list names default response
func (o *TiersListNamesDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s get policy default response
func (o *KMSGetPolicyDefault) WithPayload(payload *models.APIError) *KMSGetPolicyDefault {
// WithPayload adds the payload to the tiers list names default response
func (o *TiersListNamesDefault) WithPayload(payload *models.APIError) *TiersListNamesDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s get policy default response
func (o *KMSGetPolicyDefault) SetPayload(payload *models.APIError) {
// SetPayload sets the payload to the tiers list names default response
func (o *TiersListNamesDefault) SetPayload(payload *models.APIError) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSGetPolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
func (o *TiersListNamesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {

View File

@@ -17,7 +17,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
package tiering
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
@@ -28,15 +28,15 @@ import (
golangswaggerpaths "path"
)
// KMSSetPolicyURL generates an URL for the k m s set policy operation
type KMSSetPolicyURL struct {
// TiersListNamesURL generates an URL for the tiers list names operation
type TiersListNamesURL struct {
_basePath string
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSSetPolicyURL) WithBasePath(bp string) *KMSSetPolicyURL {
func (o *TiersListNamesURL) WithBasePath(bp string) *TiersListNamesURL {
o.SetBasePath(bp)
return o
}
@@ -44,15 +44,15 @@ func (o *KMSSetPolicyURL) WithBasePath(bp string) *KMSSetPolicyURL {
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSSetPolicyURL) SetBasePath(bp string) {
func (o *TiersListNamesURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSSetPolicyURL) Build() (*url.URL, error) {
func (o *TiersListNamesURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policies"
var _path = "/admin/tiers/names"
_basePath := o._basePath
if _basePath == "" {
@@ -64,7 +64,7 @@ func (o *KMSSetPolicyURL) Build() (*url.URL, error) {
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSSetPolicyURL) Must(u *url.URL, err error) *url.URL {
func (o *TiersListNamesURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
@@ -75,17 +75,17 @@ func (o *KMSSetPolicyURL) Must(u *url.URL, err error) *url.URL {
}
// String returns the string representation of the path with query string
func (o *KMSSetPolicyURL) String() string {
func (o *TiersListNamesURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSSetPolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
func (o *TiersListNamesURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSSetPolicyURL")
return nil, errors.New("scheme is required for a full url on TiersListNamesURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSSetPolicyURL")
return nil, errors.New("host is required for a full url on TiersListNamesURL")
}
base, err := o.Build()
@@ -99,6 +99,6 @@ func (o *KMSSetPolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
}
// StringFull returns the string representation of a complete url
func (o *KMSSetPolicyURL) StringFull(scheme, host string) string {
func (o *TiersListNamesURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -17,6 +17,7 @@
package api
import (
"encoding/base64"
"fmt"
"io"
"net/http"
@@ -44,7 +45,7 @@ func registerPublicObjectsHandlers(api *operations.ConsoleAPI) {
func getDownloadPublicObjectResponse(params public.DownloadSharedObjectParams) (middleware.Responder, *CodedAPIError) {
ctx := params.HTTPRequest.Context()
inputURLDecoded, err := checkMinIOStringURL(params.URL)
inputURLDecoded, err := decodeMinIOStringURL(params.URL)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
@@ -90,10 +91,15 @@ func getDownloadPublicObjectResponse(params public.DownloadSharedObjectParams) (
}), nil
}
// checkMinIOStringURL decodes url and validates is a MinIO url endpoint
func checkMinIOStringURL(inputURL string) (*string, error) {
// decodeMinIOStringURL decodes url and validates is a MinIO url endpoint
func decodeMinIOStringURL(inputURL string) (*string, error) {
decodedURL, err := base64.RawURLEncoding.DecodeString(inputURL)
if err != nil {
return nil, err
}
// Validate input URL
parsedURL, err := xnet.ParseHTTPURL(inputURL)
parsedURL, err := xnet.ParseHTTPURL(string(decodedURL))
if err != nil {
return nil, err
}
@@ -102,7 +108,7 @@ func checkMinIOStringURL(inputURL string) (*string, error) {
if parsedURL.Host != minIOHost {
return nil, ErrForbidden
}
return swag.String(inputURL), nil
return swag.String(string(decodedURL)), nil
}
func url2BucketAndObject(u *url.URL) (bucketName, objectName string) {

View File

@@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/assert"
)
func Test_checkMinIOStringURL(t *testing.T) {
func Test_decodeMinIOStringURL(t *testing.T) {
tAssert := assert.New(t)
type args struct {
encodedURL string
@@ -37,7 +37,7 @@ func Test_checkMinIOStringURL(t *testing.T) {
{
test: "valid encoded minIO URL returns decoded URL string", // http://localhost:9000/...
args: args{
encodedURL: "http://localhost:9000/bucket123/Audio%20icon%281%29.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=UBO1L1C7U87P1BP251TS%2F20240405%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240405T210133Z&X-Amz-Expires=43200&X-Amz-Security-Token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJVQk8xTDFDN1U4N1AxQlAyNTFUUyIsImV4cCI6MTcxMjM5NDA4OSwicGFyZW50IjoibWluaW9hZG1pbiJ9.V-KDgrLMUBlnJHKX6VxHl9-A_-PFEWok2dpTq-46blLmLsueTxshVaY4DZwGfom4TT5k8phUfgjcQansnbrkeA&X-Amz-SignedHeaders=host&versionId=null&X-Amz-Signature=07cad3eb2a6722b5baed09c6f1fe4a701bf12f48e1628b9d45c011d595567845",
encodedURL: "aHR0cDovL2xvY2FsaG9zdDo5MDAwL2J1Y2tldDEyMy9BdWRpbyUyMGljb24lMjgxJTI5LnN2Zz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPVVCTzFMMUM3VTg3UDFCUDI1MVRTJTJGMjAyNDA0MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDA1VDIxMDEzM1omWC1BbXotRXhwaXJlcz00MzIwMCZYLUFtei1TZWN1cml0eS1Ub2tlbj1leUpoYkdjaU9pSklVelV4TWlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKaFkyTmxjM05MWlhraU9pSlZRazh4VERGRE4xVTROMUF4UWxBeU5URlVVeUlzSW1WNGNDSTZNVGN4TWpNNU5EQTRPU3dpY0dGeVpXNTBJam9pYldsdWFXOWhaRzFwYmlKOS5WLUtEZ3JMTVVCbG5KSEtYNlZ4SGw5LUFfLVBGRVdvazJkcFRxLTQ2YmxMbUxzdWVUeHNoVmFZNERad0dmb200VFQ1azhwaFVmZ2pjUWFuc25icmtlQSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmdmVyc2lvbklkPW51bGwmWC1BbXotU2lnbmF0dXJlPTA3Y2FkM2ViMmE2NzIyYjViYWVkMDljNmYxZmU0YTcwMWJmMTJmNDhlMTYyOGI5ZDQ1YzAxMWQ1OTU1Njc4NDU",
},
wantError: nil,
expected: swag.String("http://localhost:9000/bucket123/Audio%20icon%281%29.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=UBO1L1C7U87P1BP251TS%2F20240405%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240405T210133Z&X-Amz-Expires=43200&X-Amz-Security-Token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJVQk8xTDFDN1U4N1AxQlAyNTFUUyIsImV4cCI6MTcxMjM5NDA4OSwicGFyZW50IjoibWluaW9hZG1pbiJ9.V-KDgrLMUBlnJHKX6VxHl9-A_-PFEWok2dpTq-46blLmLsueTxshVaY4DZwGfom4TT5k8phUfgjcQansnbrkeA&X-Amz-SignedHeaders=host&versionId=null&X-Amz-Signature=07cad3eb2a6722b5baed09c6f1fe4a701bf12f48e1628b9d45c011d595567845"),
@@ -45,7 +45,7 @@ func Test_checkMinIOStringURL(t *testing.T) {
{
test: "valid encoded url but not coming from MinIO server returns forbidden error", // http://non-minio-host:9000/...
args: args{
encodedURL: "http://non-minio-host:9000/bucket123/Audio%20icon%281%29.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=UBO1L1C7U87P1BP251TS%2F20240405%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240405T210133Z&X-Amz-Expires=43200&X-Amz-Security-Token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJVQk8xTDFDN1U4N1AxQlAyNTFUUyIsImV4cCI6MTcxMjM5NDA4OSwicGFyZW50IjoibWluaW9hZG1pbiJ9.V-KDgrLMUBlnJHKX6VxHl9-A_-PFEWok2dpTq-46blLmLsueTxshVaY4DZwGfom4TT5k8phUfgjcQansnbrkeA&X-Amz-SignedHeaders=host&versionId=null&X-Amz-Signature=07cad3eb2a6722b5baed09c6f1fe4a701bf12f48e1628b9d45c011d595567845",
encodedURL: "aHR0cDovL25vbi1taW5pby1ob3N0OjkwMDAvYnVja2V0MTIzL0F1ZGlvJTIwaWNvbiUyODElMjkuc3ZnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9VUJPMUwxQzdVODdQMUJQMjUxVFMlMkYyMDI0MDQwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MDVUMjEwMTMzWiZYLUFtei1FeHBpcmVzPTQzMjAwJlgtQW16LVNlY3VyaXR5LVRva2VuPWV5SmhiR2NpT2lKSVV6VXhNaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpoWTJObGMzTkxaWGtpT2lKVlFrOHhUREZETjFVNE4xQXhRbEF5TlRGVVV5SXNJbVY0Y0NJNk1UY3hNak01TkRBNE9Td2ljR0Z5Wlc1MElqb2liV2x1YVc5aFpHMXBiaUo5LlYtS0RnckxNVUJsbkpIS1g2VnhIbDktQV8tUEZFV29rMmRwVHEtNDZibExtTHN1ZVR4c2hWYVk0RFp3R2ZvbTRUVDVrOHBoVWZnamNRYW5zbmJya2VBJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ2ZXJzaW9uSWQ9bnVsbCZYLUFtei1TaWduYXR1cmU9MDdjYWQzZWIyYTY3MjJiNWJhZWQwOWM2ZjFmZTRhNzAxYmYxMmY0OGUxNjI4YjlkNDVjMDExZDU5NTU2Nzg0NQ",
},
wantError: swag.String("403 Forbidden"),
expected: nil,
@@ -53,7 +53,7 @@ func Test_checkMinIOStringURL(t *testing.T) {
{
test: "valid encoded url but not coming from MinIO server port returns forbidden error", // other port http://localhost:8902/...
args: args{
encodedURL: "http://localhost:8902/bucket123/Audio%20icon%281%29.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=UBO1L1C7U87P1BP251TS%2F20240405%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240405T210133Z&X-Amz-Expires=43200&X-Amz-Security-Token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJVQk8xTDFDN1U4N1AxQlAyNTFUUyIsImV4cCI6MTcxMjM5NDA4OSwicGFyZW50IjoibWluaW9hZG1pbiJ9.V-KDgrLMUBlnJHKX6VxHl9-A_-PFEWok2dpTq-46blLmLsueTxshVaY4DZwGfom4TT5k8phUfgjcQansnbrkeA&X-Amz-SignedHeaders=host&versionId=null&X-Amz-Signature=07cad3eb2a6722b5baed09c6f1fe4a701bf12f48e1628b9d45c011d595567845",
encodedURL: "aHR0cDovL2xvY2FsaG9zdDo4OTAyL2J1Y2tldDEyMy9BdWRpbyUyMGljb24lMjgxJTI5LnN2Zz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPVVCTzFMMUM3VTg3UDFCUDI1MVRTJTJGMjAyNDA0MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDA1VDIxMDEzM1omWC1BbXotRXhwaXJlcz00MzIwMCZYLUFtei1TZWN1cml0eS1Ub2tlbj1leUpoYkdjaU9pSklVelV4TWlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKaFkyTmxjM05MWlhraU9pSlZRazh4VERGRE4xVTROMUF4UWxBeU5URlVVeUlzSW1WNGNDSTZNVGN4TWpNNU5EQTRPU3dpY0dGeVpXNTBJam9pYldsdWFXOWhaRzFwYmlKOS5WLUtEZ3JMTVVCbG5KSEtYNlZ4SGw5LUFfLVBGRVdvazJkcFRxLTQ2YmxMbUxzdWVUeHNoVmFZNERad0dmb200VFQ1azhwaFVmZ2pjUWFuc25icmtlQSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmdmVyc2lvbklkPW51bGwmWC1BbXotU2lnbmF0dXJlPTA3Y2FkM2ViMmE2NzIyYjViYWVkMDljNmYxZmU0YTcwMWJmMTJmNDhlMTYyOGI5ZDQ1YzAxMWQ1OTU1Njc4NDU",
},
wantError: swag.String("403 Forbidden"),
expected: nil,
@@ -61,7 +61,7 @@ func Test_checkMinIOStringURL(t *testing.T) {
{
test: "valid url but with invalid schema returns error",
args: args{
encodedURL: "postgres://postgres:123456@127.0.0.1:5432/dummy", // postgres://postgres:123456@127.0.0.1:5432/dummy
encodedURL: "cG9zdGdyZXM6Ly9wb3N0Z3JlczoxMjM0NTZAMTI3LjAuMC4xOjU0MzIvZHVtbXk", // postgres://postgres:123456@127.0.0.1:5432/dummy
},
wantError: swag.String("unexpected scheme found postgres"),
@@ -70,7 +70,7 @@ func Test_checkMinIOStringURL(t *testing.T) {
{
test: "invalid url returns error",
args: args{
encodedURL: "asdsadsda", // asdsadsda
encodedURL: "YXNkc2Fkc2Rh", // asdsadsda
},
wantError: swag.String("unexpected scheme found "),
@@ -79,7 +79,7 @@ func Test_checkMinIOStringURL(t *testing.T) {
{
test: "plain url",
args: args{
encodedURL: "https://localhost:9000/cestest/Audio%20icon.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256",
encodedURL: "aHR0cHM6Ly9sb2NhbGhvc3Q6OTAwMC9jZXN0ZXN0L0F1ZGlvJTIwaWNvbi5zdmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTY",
},
wantError: nil,
expected: swag.String("https://localhost:9000/cestest/Audio%20icon.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256"),
@@ -88,20 +88,20 @@ func Test_checkMinIOStringURL(t *testing.T) {
for _, tt := range tests {
t.Run(tt.test, func(_ *testing.T) {
url, err := checkMinIOStringURL(tt.args.encodedURL)
url, err := decodeMinIOStringURL(tt.args.encodedURL)
if tt.wantError != nil {
if err != nil {
if err.Error() != *tt.wantError {
t.Errorf("checkMinIOStringURL() error: `%v`, wantErr: `%s`, input: `%s`", err, *tt.wantError, tt.args.encodedURL)
t.Errorf("decodeMinIOStringURL() error: `%v`, wantErr: `%s`", err, *tt.wantError)
return
}
} else {
t.Errorf("checkMinIOStringURL() error: `%v`, wantErr: `%s`, input: `%s`", err, *tt.wantError, tt.args.encodedURL)
t.Errorf("decodeMinIOStringURL() error: `%v`, wantErr: `%s`", err, *tt.wantError)
return
}
} else {
if err != nil {
t.Errorf("checkMinIOStringURL() error: `%s`, wantErr: `%v`, input: `%s`", err, tt.wantError, tt.args.encodedURL)
t.Errorf("decodeMinIOStringURL() error: `%s`, wantErr: `%v`", err, tt.wantError)
return
}
tAssert.Equal(*tt.expected, *url)

View File

@@ -18,6 +18,7 @@ package api
import (
"context"
"encoding/base64"
"errors"
"fmt"
"io"
@@ -1022,7 +1023,9 @@ func getShareObjectURL(ctx context.Context, client MCClient, r *http.Request, ve
}
requestURL := getRequestURLWithScheme(r)
objURL := fmt.Sprintf("%s/api/v1/download-shared-object/%s", requestURL, url.PathEscape(minioURL))
encodedURL := base64.RawURLEncoding.EncodeToString([]byte(minioURL))
objURL := fmt.Sprintf("%s/api/v1/download-shared-object/%s", requestURL, url.PathEscape(encodedURL))
return &objURL, nil
}

View File

@@ -942,7 +942,7 @@ func Test_shareObject(t *testing.T) {
},
wantError: nil,
expected: "http://localhost:9090/api/v1/download-shared-object/http:%2F%2Fsomeurl",
expected: "http://localhost:9090/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw",
},
{
test: "return https scheme if url uses TLS",
@@ -959,7 +959,7 @@ func Test_shareObject(t *testing.T) {
},
wantError: nil,
expected: "https://localhost:9090/api/v1/download-shared-object/http:%2F%2Fsomeurl",
expected: "https://localhost:9090/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw",
},
{
test: "returns invalid expire duration if expiration is invalid",
@@ -990,7 +990,7 @@ func Test_shareObject(t *testing.T) {
},
},
wantError: nil,
expected: "http://localhost:9090/api/v1/download-shared-object/http:%2F%2Fsomeurl",
expected: "http://localhost:9090/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw",
},
{
test: "return error if sharefunc returns error",
@@ -1022,7 +1022,7 @@ func Test_shareObject(t *testing.T) {
},
},
wantError: nil,
expected: "http://localhost:9090/api/v1/download-shared-object/https:%2F%2F127.0.0.1:9000%2Fcestest%2FAudio%2520icon.svg%3FX-Amz-Algorithm=AWS4-HMAC-SHA256",
expected: "http://localhost:9090/api/v1/download-shared-object/aHR0cHM6Ly8xMjcuMC4wLjE6OTAwMC9jZXN0ZXN0L0F1ZGlvJTIwaWNvbi5zdmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTY",
},
{
test: "returns redirect url with share link if redirect url env variable set",
@@ -1041,7 +1041,7 @@ func Test_shareObject(t *testing.T) {
},
},
wantError: nil,
expected: "http://proxy-url.com:9012/console/subpath/api/v1/download-shared-object/http:%2F%2Fsomeurl",
expected: "http://proxy-url.com:9012/console/subpath/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw",
},
{
test: "returns redirect url with share link if redirect url env variable set with trailing slash",
@@ -1060,7 +1060,7 @@ func Test_shareObject(t *testing.T) {
},
},
wantError: nil,
expected: "http://proxy-url.com:9012/console/subpath/api/v1/download-shared-object/http:%2F%2Fsomeurl",
expected: "http://proxy-url.com:9012/console/subpath/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw",
},
}

View File

@@ -55,12 +55,7 @@ func registerSessionHandlers(api *operations.ConsoleAPI) {
}
func getClaimsFromToken(sessionToken string) (map[string]interface{}, error) {
jp := new(jwtgo.Parser)
// nolint:staticcheck // ignore SA1019
jp.ValidMethods = []string{
"RS256", "RS384", "RS512", "ES256", "ES384", "ES512",
"RS3256", "RS3384", "RS3512", "ES3256", "ES3384", "ES3512",
}
jp := jwtgo.NewParser()
var claims jwtgo.MapClaims
_, _, err := jp.ParseUnverified(sessionToken, &claims)
if err != nil {
@@ -115,7 +110,7 @@ func getSessionResponse(ctx context.Context, session *models.Principal) (*models
// All calls from console are signature v4.
condition.S3SignatureVersion.Name(): {"AWS4-HMAC-SHA256"},
// All calls from console are signature v4.
// All calls from console use header-based authentication
condition.S3AuthType.Name(): {"REST-HEADER"},
// This is usually empty, may be set some times (rare).
condition.S3LocationConstraint.Name(): {GetMinIORegion()},
@@ -237,15 +232,6 @@ func getSessionResponse(ctx context.Context, session *models.Principal) (*models
resourcePermissions[key] = resourceActions
}
serializedPolicy, err := json.Marshal(policy)
if err != nil {
return nil, ErrorWithContext(ctx, err, ErrInvalidSession)
}
var sessionPolicy *models.IamPolicy
err = json.Unmarshal(serializedPolicy, &sessionPolicy)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}
// environment constants
var envConstants models.EnvironmentConstants

View File

@@ -177,9 +177,19 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
return
}
clientIP := getSourceIPFromHeaders(req)
if clientIP == "" {
if ip, _, err := net.SplitHostPort(conn.RemoteAddr().String()); err == nil {
clientIP = ip
} else {
// In case there's an error, return an empty string
LogError("Invalid ws.RemoteAddr() = %v\n", err)
}
}
switch {
case strings.HasPrefix(wsPath, `/trace`):
wsAdminClient, err := newWebSocketAdminClient(conn, session)
wsAdminClient, err := newWebSocketAdminClient(conn, session, clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -216,7 +226,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
go wsAdminClient.trace(ctx, traceRequestItem)
case strings.HasPrefix(wsPath, `/console`):
wsAdminClient, err := newWebSocketAdminClient(conn, session)
wsAdminClient, err := newWebSocketAdminClient(conn, session, clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -237,7 +247,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
closeWsConn(conn)
return
}
wsAdminClient, err := newWebSocketAdminClient(conn, session)
wsAdminClient, err := newWebSocketAdminClient(conn, session, clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -251,7 +261,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
closeWsConn(conn)
return
}
wsS3Client, err := newWebSocketS3Client(conn, session, wOptions.BucketName, "")
wsS3Client, err := newWebSocketS3Client(conn, session, wOptions.BucketName, "", clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -265,7 +275,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
closeWsConn(conn)
return
}
wsAdminClient, err := newWebSocketAdminClient(conn, session)
wsAdminClient, err := newWebSocketAdminClient(conn, session, clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -279,7 +289,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
closeWsConn(conn)
return
}
wsAdminClient, err := newWebSocketAdminClient(conn, session)
wsAdminClient, err := newWebSocketAdminClient(conn, session, clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -288,7 +298,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
go wsAdminClient.profile(ctx, pOptions)
case strings.HasPrefix(wsPath, `/objectManager`):
wsMinioClient, err := newWebSocketMinioClient(conn, session)
wsMinioClient, err := newWebSocketMinioClient(conn, session, clientIP)
if err != nil {
ErrorWithContext(ctx, err)
closeWsConn(conn)
@@ -303,12 +313,11 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
}
// newWebSocketAdminClient returns a wsAdminClient authenticated as an admin user
func newWebSocketAdminClient(conn *websocket.Conn, autClaims *models.Principal) (*wsAdminClient, error) {
func newWebSocketAdminClient(conn *websocket.Conn, autClaims *models.Principal, clientIP string) (*wsAdminClient, error) {
// create a websocket connection interface implementation
// defining the connection to be used
wsConnection := wsConn{conn: conn}
clientIP := wsConnection.remoteAddress()
// Only start Websocket Interaction after user has been
// authenticated with MinIO
mAdmin, err := newAdminFromClaims(autClaims, clientIP)
@@ -326,15 +335,9 @@ func newWebSocketAdminClient(conn *websocket.Conn, autClaims *models.Principal)
}
// newWebSocketS3Client returns a wsAdminClient authenticated as Console admin
func newWebSocketS3Client(conn *websocket.Conn, claims *models.Principal, bucketName, prefix string) (*wsS3Client, error) {
func newWebSocketS3Client(conn *websocket.Conn, claims *models.Principal, bucketName, prefix, clientIP string) (*wsS3Client, error) {
// Only start Websocket Interaction after user has been
// authenticated with MinIO
clientIP, _, err := net.SplitHostPort(conn.RemoteAddr().String())
if err != nil {
// In case there's an error, return an empty string
log.Printf("Invalid ws.clientIP = %s\n", err)
}
s3Client, err := newS3BucketClient(claims, bucketName, prefix, clientIP)
if err != nil {
LogError("error creating S3Client:", err)
@@ -351,14 +354,7 @@ func newWebSocketS3Client(conn *websocket.Conn, claims *models.Principal, bucket
return wsS3Client, nil
}
func newWebSocketMinioClient(conn *websocket.Conn, claims *models.Principal) (*wsMinioClient, error) {
// Only start Websocket Interaction after user has been
// authenticated with MinIO
clientIP, _, err := net.SplitHostPort(conn.RemoteAddr().String())
if err != nil {
// In case there's an error, return an empty string
log.Printf("Invalid ws.clientIP = %s\n", err)
}
func newWebSocketMinioClient(conn *websocket.Conn, claims *models.Principal, clientIP string) (*wsMinioClient, error) {
mClient, err := newMinioClient(claims, clientIP)
if err != nil {
LogError("error creating MinioClient:", err)

View File

@@ -35,9 +35,11 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
defer func() {
// We close socket at the end of requests
wsc.conn.close()
cancelContexts.Range(func(_, value interface{}) bool {
cancelContexts.Range(func(key, value interface{}) bool {
cancelFunc := value.(context.CancelFunc)
cancelFunc()
cancelContexts.Delete(key)
return true
})
}()
@@ -55,6 +57,7 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
// Read goroutine
go func() {
defer close(writeChannel)
for {
select {
case <-done:
@@ -64,7 +67,7 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
mType, message, err := wsc.conn.readMessage()
if err != nil {
LogInfo("Error while reading objectManager message", err)
LogInfo("Error while reading objectManager message: %s", err)
return
}
@@ -72,10 +75,9 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
// We get request data & review information
var messageRequest ObjectsRequest
err := json.Unmarshal(message, &messageRequest)
if err != nil {
LogInfo("Error on message request unmarshal")
return
if err := json.Unmarshal(message, &messageRequest); err != nil {
LogInfo("Error on message request unmarshal: %s", err)
continue
}
// new message, new context
@@ -84,6 +86,21 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
// We store the cancel func associated with this request
cancelContexts.Store(messageRequest.RequestID, cancel)
switch messageRequest.Mode {
case "objects", "rewind":
// cancel all previous open objects requests for listing
cancelContexts.Range(func(key, value interface{}) bool {
rid := key.(int64)
if rid < messageRequest.RequestID {
cancelFunc := value.(context.CancelFunc)
cancelFunc()
cancelContexts.Delete(key)
}
return true
})
}
const itemsPerBatch = 1000
switch messageRequest.Mode {
case "close":
@@ -95,47 +112,40 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
cancelContexts.Delete(messageRequest.RequestID)
}
case "objects":
// cancel all previous open objects requests for listing
cancelContexts.Range(func(key, value interface{}) bool {
rid := key.(int64)
if rid < messageRequest.RequestID {
cancelFunc := value.(context.CancelFunc)
cancelFunc()
}
return true
})
// start listing and writing to web socket
go func() {
objectRqConfigs, err := getObjectsOptionsFromReq(messageRequest)
if err != nil {
LogInfo(fmt.Sprintf("Error during Objects OptionsParse %s", err.Error()))
objectRqConfigs, err := getObjectsOptionsFromReq(messageRequest)
if err != nil {
LogInfo(fmt.Sprintf("Error during Objects OptionsParse %s", err.Error()))
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, err),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
return
}
var buffer []ObjectResponse
for lsObj := range startObjectsListing(ctx, wsc.client, objectRqConfigs) {
if lsObj.Err != nil {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, err),
Error: ErrorWithContext(ctx, lsObj.Err),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
return
continue
}
var buffer []ObjectResponse
for lsObj := range startObjectsListing(ctx, wsc.client, objectRqConfigs) {
if _, ok := cancelContexts.Load(messageRequest.RequestID); !ok {
return
}
if lsObj.Err != nil {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, lsObj.Err),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
continue
}
// if the key is same as requested prefix it would be nested directory object, so skip
// and show only objects under the prefix
// E.g:
// bucket/prefix1/prefix2/ -- this should be skipped from list item.
// bucket/prefix1/prefix2/an-object
// bucket/prefix1/prefix2/another-object
if messageRequest.Prefix != lsObj.Key {
objItem := ObjectResponse{
Name: lsObj.Key,
Size: lsObj.Size,
@@ -145,123 +155,116 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
DeleteMarker: lsObj.IsDeleteMarker,
}
buffer = append(buffer, objItem)
if len(buffer) >= itemsPerBatch {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Data: buffer,
})
buffer = nil
}
}
if len(buffer) > 0 {
if len(buffer) >= itemsPerBatch {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Data: buffer,
})
buffer = nil
}
}
if len(buffer) > 0 {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
RequestEnd: true,
RequestID: messageRequest.RequestID,
Data: buffer,
})
}
// remove the cancellation context
cancelContexts.Delete(messageRequest.RequestID)
}()
case "rewind":
// cancel all previous open objects requests for listing
cancelContexts.Range(func(key, value interface{}) bool {
rid := key.(int64)
if rid < messageRequest.RequestID {
cancelFunc := value.(context.CancelFunc)
cancelFunc()
}
return true
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
RequestEnd: true,
})
// if we have that request id, cancel it
if cancelFunc, ok := cancelContexts.Load(messageRequest.RequestID); ok {
cancelFunc.(context.CancelFunc)()
cancelContexts.Delete(messageRequest.RequestID)
}
case "rewind":
// start listing and writing to web socket
go func() {
objectRqConfigs, err := getObjectsOptionsFromReq(messageRequest)
if err != nil {
LogInfo(fmt.Sprintf("Error during Objects OptionsParse %s", err.Error()))
objectRqConfigs, err := getObjectsOptionsFromReq(messageRequest)
if err != nil {
LogInfo(fmt.Sprintf("Error during Objects OptionsParse %s", err.Error()))
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, err),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
return
}
clientIP := wsc.conn.remoteAddress()
s3Client, err := newS3BucketClient(session, objectRqConfigs.BucketName, objectRqConfigs.Prefix, clientIP)
if err != nil {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, err),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
return
}
mcS3C := mcClient{client: s3Client}
var buffer []ObjectResponse
for lsObj := range startRewindListing(ctx, mcS3C, objectRqConfigs) {
if lsObj.Err != nil {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, err),
Error: ErrorWithContext(ctx, lsObj.Err.ToGoError()),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
return
continue
}
clientIP := wsc.conn.remoteAddress()
name := strings.Replace(lsObj.URL.Path, fmt.Sprintf("/%s/", objectRqConfigs.BucketName), "", 1)
s3Client, err := newS3BucketClient(session, objectRqConfigs.BucketName, objectRqConfigs.Prefix, clientIP)
if err != nil {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, err),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
cancel()
return
objItem := ObjectResponse{
Name: name,
Size: lsObj.Size,
LastModified: lsObj.Time.Format(time.RFC3339),
VersionID: lsObj.VersionID,
IsLatest: lsObj.IsLatest,
DeleteMarker: lsObj.IsDeleteMarker,
}
buffer = append(buffer, objItem)
mcS3C := mcClient{client: s3Client}
var buffer []ObjectResponse
for lsObj := range startRewindListing(ctx, mcS3C, objectRqConfigs) {
if lsObj.Err != nil {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Error: ErrorWithContext(ctx, lsObj.Err.ToGoError()),
Prefix: messageRequest.Prefix,
BucketName: messageRequest.BucketName,
})
continue
}
name := strings.Replace(lsObj.URL.Path, fmt.Sprintf("/%s/", objectRqConfigs.BucketName), "", 1)
objItem := ObjectResponse{
Name: name,
Size: lsObj.Size,
LastModified: lsObj.Time.Format(time.RFC3339),
VersionID: lsObj.VersionID,
IsLatest: lsObj.IsLatest,
DeleteMarker: lsObj.IsDeleteMarker,
}
buffer = append(buffer, objItem)
if len(buffer) >= itemsPerBatch {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Data: buffer,
})
buffer = nil
}
}
if len(buffer) > 0 {
if len(buffer) >= itemsPerBatch {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
Data: buffer,
})
buffer = nil
}
}
if len(buffer) > 0 {
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
RequestEnd: true,
RequestID: messageRequest.RequestID,
Data: buffer,
})
}
// remove the cancellation context
sendWSResponse(WSResponse{
RequestID: messageRequest.RequestID,
RequestEnd: true,
})
// if we have that request id, cancel it
if cancelFunc, ok := cancelContexts.Load(messageRequest.RequestID); ok {
cancelFunc.(context.CancelFunc)()
cancelContexts.Delete(messageRequest.RequestID)
}()
}
}
}
}
@@ -272,13 +275,13 @@ func (wsc *wsMinioClient) objectManager(session *models.Principal) {
for writeM := range writeChannel {
jsonData, err := json.Marshal(writeM)
if err != nil {
LogInfo("Error while marshaling the response", err)
LogInfo("Error while marshaling the response: %s", err)
return
}
err = wsc.conn.writeMessage(websocket.TextMessage, jsonData)
if err != nil {
LogInfo("Error while writing the message", err)
LogInfo("Error while writing the message: %s", err)
return
}
}

4
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/minio/console
go 1.21
go 1.22
require (
github.com/blang/semver/v4 v4.0.0
@@ -146,7 +146,7 @@ require (
golang.org/x/term v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

4
go.sum
View File

@@ -400,8 +400,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA=
google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View File

@@ -74,7 +74,7 @@ type AddBucketLifecycle struct {
TransitionDays int32 `json:"transition_days,omitempty"`
// ILM Rule type (Expiry or transition)
// Enum: [expiry transition]
// Enum: ["expiry","transition"]
Type string `json:"type,omitempty"`
}

View File

@@ -73,7 +73,7 @@ type AddMultiBucketLifecycle struct {
// ILM Rule type (Expiry or transition)
// Required: true
// Enum: [expiry transition]
// Enum: ["expiry","transition"]
Type *string `json:"type"`
}

View File

@@ -39,7 +39,7 @@ import (
type AdminInfoResponse struct {
// advanced metrics status
// Enum: [not configured available unavailable]
// Enum: ["not configured","available","unavailable"]
AdvancedMetricsStatus string `json:"advancedMetricsStatus,omitempty"`
// backend

View File

@@ -382,7 +382,7 @@ type BucketDetailsQuota struct {
Quota int64 `json:"quota,omitempty"`
// type
// Enum: [hard]
// Enum: ["hard"]
Type string `json:"type,omitempty"`
}

View File

@@ -41,7 +41,7 @@ type BucketQuota struct {
Quota int64 `json:"quota,omitempty"`
// type
// Enum: [hard]
// Enum: ["hard"]
Type string `json:"type,omitempty"`
}

View File

@@ -68,14 +68,14 @@ type BucketReplicationRule struct {
Priority int32 `json:"priority,omitempty"`
// status
// Enum: [Enabled Disabled]
// Enum: ["Enabled","Disabled"]
Status string `json:"status,omitempty"`
// storage class
StorageClass string `json:"storageClass,omitempty"`
// sync mode
// Enum: [async sync]
// Enum: ["async","sync"]
SyncMode *string `json:"syncMode,omitempty"`
// tags

View File

@@ -61,7 +61,7 @@ type CreateRemoteBucket struct {
SourceBucket *string `json:"sourceBucket"`
// sync mode
// Enum: [async sync]
// Enum: ["async","sync"]
SyncMode *string `json:"syncMode,omitempty"`
// target bucket

View File

@@ -1,28 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmDeleteKeyRequest km delete key request
//
// swagger:model kmDeleteKeyRequest
type KmDeleteKeyRequest interface{}

View File

@@ -1,79 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
)
// KmsDescribeIdentityResponse kms describe identity response
//
// swagger:model kmsDescribeIdentityResponse
type KmsDescribeIdentityResponse struct {
// admin
Admin bool `json:"admin,omitempty"`
// created at
CreatedAt string `json:"createdAt,omitempty"`
// created by
CreatedBy string `json:"createdBy,omitempty"`
// identity
Identity string `json:"identity,omitempty"`
// policy
Policy string `json:"policy,omitempty"`
}
// Validate validates this kms describe identity response
func (m *KmsDescribeIdentityResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this kms describe identity response based on context it is used
func (m *KmsDescribeIdentityResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsDescribeIdentityResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsDescribeIdentityResponse) UnmarshalBinary(b []byte) error {
var res KmsDescribeIdentityResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,73 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
)
// KmsDescribePolicyResponse kms describe policy response
//
// swagger:model kmsDescribePolicyResponse
type KmsDescribePolicyResponse struct {
// created at
CreatedAt string `json:"createdAt,omitempty"`
// created by
CreatedBy string `json:"createdBy,omitempty"`
// name
Name string `json:"name,omitempty"`
}
// Validate validates this kms describe policy response
func (m *KmsDescribePolicyResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this kms describe policy response based on context it is used
func (m *KmsDescribePolicyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsDescribePolicyResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsDescribePolicyResponse) UnmarshalBinary(b []byte) error {
var res KmsDescribePolicyResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,141 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// KmsDescribeSelfIdentityResponse kms describe self identity response
//
// swagger:model kmsDescribeSelfIdentityResponse
type KmsDescribeSelfIdentityResponse struct {
// admin
Admin bool `json:"admin,omitempty"`
// created at
CreatedAt string `json:"createdAt,omitempty"`
// created by
CreatedBy string `json:"createdBy,omitempty"`
// identity
Identity string `json:"identity,omitempty"`
// policy
Policy *KmsGetPolicyResponse `json:"policy,omitempty"`
// policy name
PolicyName string `json:"policyName,omitempty"`
}
// Validate validates this kms describe self identity response
func (m *KmsDescribeSelfIdentityResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validatePolicy(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsDescribeSelfIdentityResponse) validatePolicy(formats strfmt.Registry) error {
if swag.IsZero(m.Policy) { // not required
return nil
}
if m.Policy != nil {
if err := m.Policy.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("policy")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("policy")
}
return err
}
}
return nil
}
// ContextValidate validate this kms describe self identity response based on the context it is used
func (m *KmsDescribeSelfIdentityResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidatePolicy(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsDescribeSelfIdentityResponse) contextValidatePolicy(ctx context.Context, formats strfmt.Registry) error {
if m.Policy != nil {
if swag.IsZero(m.Policy) { // not required
return nil
}
if err := m.Policy.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("policy")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("policy")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *KmsDescribeSelfIdentityResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsDescribeSelfIdentityResponse) UnmarshalBinary(b []byte) error {
var res KmsDescribeSelfIdentityResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,70 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
)
// KmsGetPolicyResponse kms get policy response
//
// swagger:model kmsGetPolicyResponse
type KmsGetPolicyResponse struct {
// allow
Allow []string `json:"allow"`
// deny
Deny []string `json:"deny"`
}
// Validate validates this kms get policy response
func (m *KmsGetPolicyResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this kms get policy response based on context it is used
func (m *KmsGetPolicyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsGetPolicyResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsGetPolicyResponse) UnmarshalBinary(b []byte) error {
var res KmsGetPolicyResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,79 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
)
// KmsIdentityInfo kms identity info
//
// swagger:model kmsIdentityInfo
type KmsIdentityInfo struct {
// created at
CreatedAt string `json:"createdAt,omitempty"`
// created by
CreatedBy string `json:"createdBy,omitempty"`
// error
Error string `json:"error,omitempty"`
// identity
Identity string `json:"identity,omitempty"`
// policy
Policy string `json:"policy,omitempty"`
}
// Validate validates this kms identity info
func (m *KmsIdentityInfo) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this kms identity info based on context it is used
func (m *KmsIdentityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsIdentityInfo) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsIdentityInfo) UnmarshalBinary(b []byte) error {
var res KmsIdentityInfo
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,88 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// KmsImportKeyRequest kms import key request
//
// swagger:model kmsImportKeyRequest
type KmsImportKeyRequest struct {
// bytes
// Required: true
Bytes *string `json:"bytes"`
}
// Validate validates this kms import key request
func (m *KmsImportKeyRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateBytes(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsImportKeyRequest) validateBytes(formats strfmt.Registry) error {
if err := validate.Required("bytes", "body", m.Bytes); err != nil {
return err
}
return nil
}
// ContextValidate validates this kms import key request based on context it is used
func (m *KmsImportKeyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsImportKeyRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsImportKeyRequest) UnmarshalBinary(b []byte) error {
var res KmsImportKeyRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,138 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// KmsListIdentitiesResponse kms list identities response
//
// swagger:model kmsListIdentitiesResponse
type KmsListIdentitiesResponse struct {
// results
Results []*KmsIdentityInfo `json:"results"`
}
// Validate validates this kms list identities response
func (m *KmsListIdentitiesResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateResults(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsListIdentitiesResponse) validateResults(formats strfmt.Registry) error {
if swag.IsZero(m.Results) { // not required
return nil
}
for i := 0; i < len(m.Results); i++ {
if swag.IsZero(m.Results[i]) { // not required
continue
}
if m.Results[i] != nil {
if err := m.Results[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("results" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("results" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this kms list identities response based on the context it is used
func (m *KmsListIdentitiesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateResults(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsListIdentitiesResponse) contextValidateResults(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Results); i++ {
if m.Results[i] != nil {
if swag.IsZero(m.Results[i]) { // not required
return nil
}
if err := m.Results[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("results" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("results" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *KmsListIdentitiesResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsListIdentitiesResponse) UnmarshalBinary(b []byte) error {
var res KmsListIdentitiesResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,138 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// KmsListPoliciesResponse kms list policies response
//
// swagger:model kmsListPoliciesResponse
type KmsListPoliciesResponse struct {
// results
Results []*KmsPolicyInfo `json:"results"`
}
// Validate validates this kms list policies response
func (m *KmsListPoliciesResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateResults(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsListPoliciesResponse) validateResults(formats strfmt.Registry) error {
if swag.IsZero(m.Results) { // not required
return nil
}
for i := 0; i < len(m.Results); i++ {
if swag.IsZero(m.Results[i]) { // not required
continue
}
if m.Results[i] != nil {
if err := m.Results[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("results" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("results" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this kms list policies response based on the context it is used
func (m *KmsListPoliciesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateResults(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsListPoliciesResponse) contextValidateResults(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Results); i++ {
if m.Results[i] != nil {
if swag.IsZero(m.Results[i]) { // not required
return nil
}
if err := m.Results[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("results" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("results" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *KmsListPoliciesResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsListPoliciesResponse) UnmarshalBinary(b []byte) error {
var res KmsListPoliciesResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,73 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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"
)
// KmsPolicyInfo kms policy info
//
// swagger:model kmsPolicyInfo
type KmsPolicyInfo struct {
// created at
CreatedAt string `json:"createdAt,omitempty"`
// created by
CreatedBy string `json:"createdBy,omitempty"`
// name
Name string `json:"name,omitempty"`
}
// Validate validates this kms policy info
func (m *KmsPolicyInfo) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this kms policy info based on context it is used
func (m *KmsPolicyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsPolicyInfo) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsPolicyInfo) UnmarshalBinary(b []byte) error {
var res KmsPolicyInfo
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,94 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// KmsSetPolicyRequest kms set policy request
//
// swagger:model kmsSetPolicyRequest
type KmsSetPolicyRequest struct {
// allow
Allow []string `json:"allow"`
// deny
Deny []string `json:"deny"`
// policy
// Required: true
Policy *string `json:"policy"`
}
// Validate validates this kms set policy request
func (m *KmsSetPolicyRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validatePolicy(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *KmsSetPolicyRequest) validatePolicy(formats strfmt.Registry) error {
if err := validate.Required("policy", "body", m.Policy); err != nil {
return err
}
return nil
}
// ContextValidate validates this kms set policy request based on context it is used
func (m *KmsSetPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsSetPolicyRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *KmsSetPolicyRequest) UnmarshalBinary(b []byte) error {
var res KmsSetPolicyRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -45,7 +45,7 @@ type LoginDetails struct {
IsK8S bool `json:"isK8S,omitempty"`
// login strategy
// Enum: [form redirect service-account redirect-service-account]
// Enum: ["form","redirect","service-account","redirect-service-account"]
LoginStrategy string `json:"loginStrategy,omitempty"`
// redirect rules

View File

@@ -83,7 +83,7 @@ type MultiBucketReplication struct {
StorageClass string `json:"storageClass,omitempty"`
// sync mode
// Enum: [async sync]
// Enum: ["async","sync"]
SyncMode *string `json:"syncMode,omitempty"`
// tags

View File

@@ -57,7 +57,7 @@ type RemoteBucket struct {
SecretKey string `json:"secretKey,omitempty"`
// service
// Enum: [replication]
// Enum: ["replication"]
Service string `json:"service,omitempty"`
// source bucket

View File

@@ -63,7 +63,7 @@ type SessionResponse struct {
ServerEndPoint string `json:"serverEndPoint,omitempty"`
// status
// Enum: [ok]
// Enum: ["ok"]
Status string `json:"status,omitempty"`
}

View File

@@ -45,7 +45,7 @@ type SetBucketQuota struct {
Enabled *bool `json:"enabled"`
// quota type
// Enum: [hard]
// Enum: ["hard"]
QuotaType string `json:"quota_type,omitempty"`
}

View File

@@ -53,7 +53,7 @@ type Tier struct {
Status bool `json:"status,omitempty"`
// type
// Enum: [s3 gcs azure minio unsupported]
// Enum: ["s3","gcs","azure","minio","unsupported"]
Type string `json:"type,omitempty"`
}

View File

@@ -29,27 +29,27 @@ import (
"github.com/go-openapi/swag"
)
// KmsAssignPolicyRequest kms assign policy request
// TiersNameListResponse tiers name list response
//
// swagger:model kmsAssignPolicyRequest
type KmsAssignPolicyRequest struct {
// swagger:model tiersNameListResponse
type TiersNameListResponse struct {
// identity
Identity string `json:"identity,omitempty"`
// items
Items []string `json:"items"`
}
// Validate validates this kms assign policy request
func (m *KmsAssignPolicyRequest) Validate(formats strfmt.Registry) error {
// Validate validates this tiers name list response
func (m *TiersNameListResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this kms assign policy request based on context it is used
func (m *KmsAssignPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
// ContextValidate validates this tiers name list response based on context it is used
func (m *TiersNameListResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *KmsAssignPolicyRequest) MarshalBinary() ([]byte, error) {
func (m *TiersNameListResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -57,8 +57,8 @@ func (m *KmsAssignPolicyRequest) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
func (m *KmsAssignPolicyRequest) UnmarshalBinary(b []byte) error {
var res KmsAssignPolicyRequest
func (m *TiersNameListResponse) UnmarshalBinary(b []byte) error {
var res TiersNameListResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}

View File

@@ -72,7 +72,7 @@ type UpdateBucketLifecycle struct {
// ILM Rule type (Expiry or transition)
// Required: true
// Enum: [expiry transition]
// Enum: ["expiry","transition"]
Type *string `json:"type"`
}

View File

@@ -2705,6 +2705,22 @@ paths:
tags:
- Tiering
/admin/tiers/names:
get:
summary: Returns a list of tiers' names for ilm
operationId: TiersListNames
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/tiersNameListResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Tiering
/admin/tiers/{type}/{name}:
get:
summary: Get Tier
@@ -2769,7 +2785,7 @@ paths:
- Tiering
/admin/tiers/{name}/remove:
delete:
summary: Remove Tier
summary: Remove Tier
operationId: RemoveTier
parameters:
- name: name
@@ -2784,7 +2800,7 @@ paths:
schema:
$ref: "#/definitions/ApiError"
tags:
- Tiering
- Tiering
/nodes:
get:
@@ -3044,245 +3060,6 @@ paths:
$ref: "#/definitions/ApiError"
tags:
- KMS
delete:
summary: KMS delete key
operationId: KMSDeleteKey
parameters:
- name: name
description: KMS key name
in: path
required: true
type: string
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/keys/{name}/import:
post:
summary: KMS import key
operationId: KMSImportKey
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/kmsImportKeyRequest"
- name: name
description: KMS key name
in: path
required: true
type: string
responses:
201:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/policies:
post:
summary: KMS set policy
operationId: KMSSetPolicy
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/kmsSetPolicyRequest"
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
get:
summary: KMS list policies
operationId: KMSListPolicies
parameters:
- name: pattern
description: pattern to retrieve policies
in: query
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/kmsListPoliciesResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/policies/{name}:
get:
summary: KMS get policy
operationId: KMSGetPolicy
parameters:
- name: name
description: KMS policy name
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/kmsGetPolicyResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
delete:
summary: KMS delete policy
operationId: KMSDeletePolicy
parameters:
- name: name
description: KMS policy name
in: path
required: true
type: string
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/policies/{name}/assign:
post:
summary: KMS assign policy
operationId: KMSAssignPolicy
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/kmsAssignPolicyRequest"
- name: name
description: KMS policy name
in: path
required: true
type: string
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/policies/{name}/describe:
get:
summary: KMS describe policy
operationId: KMSDescribePolicy
parameters:
- name: name
description: KMS policy name
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/kmsDescribePolicyResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/identities/{name}:
delete:
summary: KMS delete identity
operationId: KMSDeleteIdentity
parameters:
- name: name
description: KMS identity name
in: path
required: true
type: string
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/identities/{name}/describe:
get:
summary: KMS describe identity
operationId: KMSDescribeIdentity
parameters:
- name: name
description: KMS identity name
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/kmsDescribeIdentityResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/describe-self/identity:
get:
summary: KMS describe self identity
operationId: KMSDescribeSelfIdentity
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/kmsDescribeSelfIdentityResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/kms/identities:
get:
summary: KMS list identities
operationId: KMSListIdentities
parameters:
- name: pattern
description: pattern to retrieve identities
in: query
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/kmsListIdentitiesResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- KMS
/admin/inspect:
get:
@@ -5598,6 +5375,14 @@ definitions:
items:
$ref: "#/definitions/tier"
tiersNameListResponse:
type: object
properties:
items:
type: array
items:
type: string
tierCredentialsRequest:
type: object
properties:
@@ -5795,15 +5580,6 @@ definitions:
properties:
key:
type: string
kmsImportKeyRequest:
type: object
required:
- bytes
properties:
bytes:
type: string
kmDeleteKeyRequest:
type: object
kmsListKeysResponse:
type: object
properties:
@@ -5821,111 +5597,6 @@ definitions:
createdBy:
type: string
kmsGetPolicyResponse:
type: object
properties:
allow:
type: array
items:
type: string
deny:
type: array
items:
type: string
kmsSetPolicyRequest:
type: object
required:
- policy
properties:
policy:
type: string
allow:
type: array
items:
type: string
deny:
type: array
items:
type: string
kmsDescribePolicyResponse:
type: object
properties:
createdAt:
type: string
createdBy:
type: string
name:
type: string
kmsAssignPolicyRequest:
type: object
properties:
identity:
type: string
kmsListPoliciesResponse:
type: object
properties:
results:
type: array
items:
$ref: "#/definitions/kmsPolicyInfo"
kmsPolicyInfo:
type: object
properties:
name:
type: string
createdAt:
type: string
createdBy:
type: string
kmsDescribeIdentityResponse:
type: object
properties:
policy:
type: string
identity:
type: string
admin:
type: boolean
createdAt:
type: string
createdBy:
type: string
kmsDescribeSelfIdentityResponse:
type: object
properties:
identity:
type: string
policyName:
type: string
admin:
type: boolean
createdAt:
type: string
createdBy:
type: string
policy:
$ref: "#/definitions/kmsGetPolicyResponse"
kmsListIdentitiesResponse:
type: object
properties:
results:
type: array
items:
$ref: "#/definitions/kmsIdentityInfo"
kmsIdentityInfo:
type: object
properties:
identity:
type: string
policy:
type: string
error:
type: string
createdAt:
type: string
createdBy:
type: string
kmsMetricsResponse:
type: object
required:

View File

@@ -1,2 +1,3 @@
nodeLinker: node-modules
checksumBehavior: reset
nodeLinker: node-modules

View File

@@ -1,101 +1,99 @@
{
"files": {
"main.css": "./static/css/main.e60e4760.css",
"main.js": "./static/js/main.dd292f6d.js",
"static/js/5301.2c626a41.chunk.js": "./static/js/5301.2c626a41.chunk.js",
"static/js/9361.3fc638a6.chunk.js": "./static/js/9361.3fc638a6.chunk.js",
"static/js/843.454ac75f.chunk.js": "./static/js/843.454ac75f.chunk.js",
"static/js/3035.d50f543e.chunk.js": "./static/js/3035.d50f543e.chunk.js",
"static/js/9537.69d1689c.chunk.js": "./static/js/9537.69d1689c.chunk.js",
"static/js/5711.9df9b4a2.chunk.js": "./static/js/5711.9df9b4a2.chunk.js",
"static/js/8769.996efd0a.chunk.js": "./static/js/8769.996efd0a.chunk.js",
"static/js/2033.bea44dd7.chunk.js": "./static/js/2033.bea44dd7.chunk.js",
"static/js/8311.d87242df.chunk.js": "./static/js/8311.d87242df.chunk.js",
"static/js/9987.79508d87.chunk.js": "./static/js/9987.79508d87.chunk.js",
"static/js/689.8272f409.chunk.js": "./static/js/689.8272f409.chunk.js",
"static/js/6164.c2cd952a.chunk.js": "./static/js/6164.c2cd952a.chunk.js",
"static/js/2372.97c7de62.chunk.js": "./static/js/2372.97c7de62.chunk.js",
"static/js/1324.cc645cb1.chunk.js": "./static/js/1324.cc645cb1.chunk.js",
"static/js/5693.eb317771.chunk.js": "./static/js/5693.eb317771.chunk.js",
"main.js": "./static/js/main.41754270.js",
"static/js/5301.79001158.chunk.js": "./static/js/5301.79001158.chunk.js",
"static/js/9361.ce3b326c.chunk.js": "./static/js/9361.ce3b326c.chunk.js",
"static/js/843.791dd143.chunk.js": "./static/js/843.791dd143.chunk.js",
"static/js/3035.ac7d86b8.chunk.js": "./static/js/3035.ac7d86b8.chunk.js",
"static/js/9537.895fc3ff.chunk.js": "./static/js/9537.895fc3ff.chunk.js",
"static/js/5711.9a92ab65.chunk.js": "./static/js/5711.9a92ab65.chunk.js",
"static/js/8769.58bd5ad6.chunk.js": "./static/js/8769.58bd5ad6.chunk.js",
"static/js/2033.a7412d01.chunk.js": "./static/js/2033.a7412d01.chunk.js",
"static/js/8311.0b90f115.chunk.js": "./static/js/8311.0b90f115.chunk.js",
"static/js/9987.62e7e151.chunk.js": "./static/js/9987.62e7e151.chunk.js",
"static/js/689.3e04559d.chunk.js": "./static/js/689.3e04559d.chunk.js",
"static/js/6164.8759ced6.chunk.js": "./static/js/6164.8759ced6.chunk.js",
"static/js/2372.d67d02b5.chunk.js": "./static/js/2372.d67d02b5.chunk.js",
"static/js/1324.acba4c47.chunk.js": "./static/js/1324.acba4c47.chunk.js",
"static/js/5693.741d3c68.chunk.js": "./static/js/5693.741d3c68.chunk.js",
"static/js/5872.62eb672b.chunk.js": "./static/js/5872.62eb672b.chunk.js",
"static/js/6758.cf46c98c.chunk.js": "./static/js/6758.cf46c98c.chunk.js",
"static/js/6758.c83201ee.chunk.js": "./static/js/6758.c83201ee.chunk.js",
"static/js/755.ac098541.chunk.js": "./static/js/755.ac098541.chunk.js",
"static/js/8715.1422d39d.chunk.js": "./static/js/8715.1422d39d.chunk.js",
"static/js/7880.813513ce.chunk.js": "./static/js/7880.813513ce.chunk.js",
"static/js/8715.e34fbcdb.chunk.js": "./static/js/8715.e34fbcdb.chunk.js",
"static/js/7880.35251951.chunk.js": "./static/js/7880.35251951.chunk.js",
"static/js/2209.3b0ca7fa.chunk.js": "./static/js/2209.3b0ca7fa.chunk.js",
"static/js/7435.2ed74878.chunk.js": "./static/js/7435.2ed74878.chunk.js",
"static/js/9340.acfd036d.chunk.js": "./static/js/9340.acfd036d.chunk.js",
"static/js/9269.dfec9438.chunk.js": "./static/js/9269.dfec9438.chunk.js",
"static/js/6925.b3e208b0.chunk.js": "./static/js/6925.b3e208b0.chunk.js",
"static/js/3527.b7757ae8.chunk.js": "./static/js/3527.b7757ae8.chunk.js",
"static/js/8789.c1e4949f.chunk.js": "./static/js/8789.c1e4949f.chunk.js",
"static/js/7485.64738b77.chunk.js": "./static/js/7485.64738b77.chunk.js",
"static/js/7041.219c4d11.chunk.js": "./static/js/7041.219c4d11.chunk.js",
"static/js/2138.7da0f275.chunk.js": "./static/js/2138.7da0f275.chunk.js",
"static/js/5699.016e97fa.chunk.js": "./static/js/5699.016e97fa.chunk.js",
"static/js/7381.0caa382c.chunk.js": "./static/js/7381.0caa382c.chunk.js",
"static/js/7052.1e7e2b40.chunk.js": "./static/js/7052.1e7e2b40.chunk.js",
"static/js/144.c7530a4b.chunk.js": "./static/js/144.c7530a4b.chunk.js",
"static/js/5978.7fb91072.chunk.js": "./static/js/5978.7fb91072.chunk.js",
"static/js/4103.926c44ef.chunk.js": "./static/js/4103.926c44ef.chunk.js",
"static/js/1702.851e407f.chunk.js": "./static/js/1702.851e407f.chunk.js",
"static/js/7601.4e033e78.chunk.js": "./static/js/7601.4e033e78.chunk.js",
"static/js/2959.f25a9ef1.chunk.js": "./static/js/2959.f25a9ef1.chunk.js",
"static/js/9619.a756233f.chunk.js": "./static/js/9619.a756233f.chunk.js",
"static/js/8017.d5b163f3.chunk.js": "./static/js/8017.d5b163f3.chunk.js",
"static/js/7435.14c02ae7.chunk.js": "./static/js/7435.14c02ae7.chunk.js",
"static/js/9340.9df4309b.chunk.js": "./static/js/9340.9df4309b.chunk.js",
"static/js/9269.853e70e9.chunk.js": "./static/js/9269.853e70e9.chunk.js",
"static/js/6925.034411f2.chunk.js": "./static/js/6925.034411f2.chunk.js",
"static/js/3527.96de4083.chunk.js": "./static/js/3527.96de4083.chunk.js",
"static/js/8789.c066ce6c.chunk.js": "./static/js/8789.c066ce6c.chunk.js",
"static/js/7485.3a46a0a3.chunk.js": "./static/js/7485.3a46a0a3.chunk.js",
"static/js/7041.cfb08b62.chunk.js": "./static/js/7041.cfb08b62.chunk.js",
"static/js/2138.7ef0755e.chunk.js": "./static/js/2138.7ef0755e.chunk.js",
"static/js/5699.6a74f983.chunk.js": "./static/js/5699.6a74f983.chunk.js",
"static/js/5153.24546201.chunk.js": "./static/js/5153.24546201.chunk.js",
"static/js/7052.50a0217e.chunk.js": "./static/js/7052.50a0217e.chunk.js",
"static/js/144.45106af8.chunk.js": "./static/js/144.45106af8.chunk.js",
"static/js/5978.e6638d0b.chunk.js": "./static/js/5978.e6638d0b.chunk.js",
"static/js/4103.f42a2340.chunk.js": "./static/js/4103.f42a2340.chunk.js",
"static/js/1702.7a20d1f8.chunk.js": "./static/js/1702.7a20d1f8.chunk.js",
"static/js/7601.b9b33cda.chunk.js": "./static/js/7601.b9b33cda.chunk.js",
"static/js/7945.5cbf1d20.chunk.js": "./static/js/7945.5cbf1d20.chunk.js",
"static/js/9619.c5f43814.chunk.js": "./static/js/9619.c5f43814.chunk.js",
"static/js/8017.04f38735.chunk.js": "./static/js/8017.04f38735.chunk.js",
"static/js/3323.f86a698b.chunk.js": "./static/js/3323.f86a698b.chunk.js",
"static/js/5128.96ab1387.chunk.js": "./static/js/5128.96ab1387.chunk.js",
"static/js/6140.37801ce8.chunk.js": "./static/js/6140.37801ce8.chunk.js",
"static/js/696.77a3fec7.chunk.js": "./static/js/696.77a3fec7.chunk.js",
"static/js/2166.a0f01e1a.chunk.js": "./static/js/2166.a0f01e1a.chunk.js",
"static/js/7063.d62078ab.chunk.js": "./static/js/7063.d62078ab.chunk.js",
"static/js/3061.2419f208.chunk.js": "./static/js/3061.2419f208.chunk.js",
"static/js/5064.ccf271db.chunk.js": "./static/js/5064.ccf271db.chunk.js",
"static/js/7643.41c0709d.chunk.js": "./static/js/7643.41c0709d.chunk.js",
"static/js/985.c802474d.chunk.js": "./static/js/985.c802474d.chunk.js",
"static/js/1370.a3d466ac.chunk.js": "./static/js/1370.a3d466ac.chunk.js",
"static/js/8823.5a005f09.chunk.js": "./static/js/8823.5a005f09.chunk.js",
"static/js/24.1245bd95.chunk.js": "./static/js/24.1245bd95.chunk.js",
"static/js/5851.9aeea951.chunk.js": "./static/js/5851.9aeea951.chunk.js",
"static/js/4705.1a1c4cd3.chunk.js": "./static/js/4705.1a1c4cd3.chunk.js",
"static/js/3654.877a48d3.chunk.js": "./static/js/3654.877a48d3.chunk.js",
"static/js/960.41c7b96c.chunk.js": "./static/js/960.41c7b96c.chunk.js",
"static/js/8642.ab45092c.chunk.js": "./static/js/8642.ab45092c.chunk.js",
"static/js/3329.89a09424.chunk.js": "./static/js/3329.89a09424.chunk.js",
"static/js/2332.7e0aee28.chunk.js": "./static/js/2332.7e0aee28.chunk.js",
"static/js/5941.c85331e3.chunk.js": "./static/js/5941.c85331e3.chunk.js",
"static/js/2704.fe33dd23.chunk.js": "./static/js/2704.fe33dd23.chunk.js",
"static/js/7774.32142847.chunk.js": "./static/js/7774.32142847.chunk.js",
"static/js/3851.c5eaa08e.chunk.js": "./static/js/3851.c5eaa08e.chunk.js",
"static/js/9965.e00429f9.chunk.js": "./static/js/9965.e00429f9.chunk.js",
"static/js/6065.e12fd403.chunk.js": "./static/js/6065.e12fd403.chunk.js",
"static/js/12.ab9b7ed0.chunk.js": "./static/js/12.ab9b7ed0.chunk.js",
"static/js/8010.8ce54818.chunk.js": "./static/js/8010.8ce54818.chunk.js",
"static/js/2689.5e76c1cd.chunk.js": "./static/js/2689.5e76c1cd.chunk.js",
"static/js/872.6f58df17.chunk.js": "./static/js/872.6f58df17.chunk.js",
"static/js/4676.8d6be1dd.chunk.js": "./static/js/4676.8d6be1dd.chunk.js",
"static/js/8825.e5adf924.chunk.js": "./static/js/8825.e5adf924.chunk.js",
"static/js/614.f6cdf349.chunk.js": "./static/js/614.f6cdf349.chunk.js",
"static/js/502.0106f2a9.chunk.js": "./static/js/502.0106f2a9.chunk.js",
"static/js/6799.61dee8ac.chunk.js": "./static/js/6799.61dee8ac.chunk.js",
"static/js/7659.124c07a5.chunk.js": "./static/js/7659.124c07a5.chunk.js",
"static/js/7515.346161ed.chunk.js": "./static/js/7515.346161ed.chunk.js",
"static/js/6654.d76daa88.chunk.js": "./static/js/6654.d76daa88.chunk.js",
"static/js/5311.bf44bf69.chunk.js": "./static/js/5311.bf44bf69.chunk.js",
"static/js/5809.064e83cc.chunk.js": "./static/js/5809.064e83cc.chunk.js",
"static/js/7264.f7c51a0e.chunk.js": "./static/js/7264.f7c51a0e.chunk.js",
"static/js/4172.0d489f24.chunk.js": "./static/js/4172.0d489f24.chunk.js",
"static/js/6108.7a769377.chunk.js": "./static/js/6108.7a769377.chunk.js",
"static/js/9714.48a29c42.chunk.js": "./static/js/9714.48a29c42.chunk.js",
"static/js/459.65dbecac.chunk.js": "./static/js/459.65dbecac.chunk.js",
"static/js/8152.6306ebd5.chunk.js": "./static/js/8152.6306ebd5.chunk.js",
"static/js/1303.12f6ca82.chunk.js": "./static/js/1303.12f6ca82.chunk.js",
"static/js/5079.a0847792.chunk.js": "./static/js/5079.a0847792.chunk.js",
"static/js/696.8dec9292.chunk.js": "./static/js/696.8dec9292.chunk.js",
"static/js/2166.880cc038.chunk.js": "./static/js/2166.880cc038.chunk.js",
"static/js/7063.bf210d7d.chunk.js": "./static/js/7063.bf210d7d.chunk.js",
"static/js/3061.2061eb2e.chunk.js": "./static/js/3061.2061eb2e.chunk.js",
"static/js/5064.0016782f.chunk.js": "./static/js/5064.0016782f.chunk.js",
"static/js/7643.f3b86455.chunk.js": "./static/js/7643.f3b86455.chunk.js",
"static/js/985.77a278ca.chunk.js": "./static/js/985.77a278ca.chunk.js",
"static/js/1370.efee6fa6.chunk.js": "./static/js/1370.efee6fa6.chunk.js",
"static/js/8823.bc273dec.chunk.js": "./static/js/8823.bc273dec.chunk.js",
"static/js/24.e576918a.chunk.js": "./static/js/24.e576918a.chunk.js",
"static/js/5851.f2e67509.chunk.js": "./static/js/5851.f2e67509.chunk.js",
"static/js/4705.b1d28560.chunk.js": "./static/js/4705.b1d28560.chunk.js",
"static/js/8963.d2703f60.chunk.js": "./static/js/8963.d2703f60.chunk.js",
"static/js/960.fdc14172.chunk.js": "./static/js/960.fdc14172.chunk.js",
"static/js/8642.d29d2259.chunk.js": "./static/js/8642.d29d2259.chunk.js",
"static/js/3329.c25b9821.chunk.js": "./static/js/3329.c25b9821.chunk.js",
"static/js/5941.179188d6.chunk.js": "./static/js/5941.179188d6.chunk.js",
"static/js/2704.71ac23f9.chunk.js": "./static/js/2704.71ac23f9.chunk.js",
"static/js/7774.a47fade2.chunk.js": "./static/js/7774.a47fade2.chunk.js",
"static/js/3851.b9c2f806.chunk.js": "./static/js/3851.b9c2f806.chunk.js",
"static/js/9965.bf313381.chunk.js": "./static/js/9965.bf313381.chunk.js",
"static/js/6065.f1e0bfe2.chunk.js": "./static/js/6065.f1e0bfe2.chunk.js",
"static/js/12.eed2916e.chunk.js": "./static/js/12.eed2916e.chunk.js",
"static/js/8010.f3d6885a.chunk.js": "./static/js/8010.f3d6885a.chunk.js",
"static/js/2689.ba69c148.chunk.js": "./static/js/2689.ba69c148.chunk.js",
"static/js/872.a02ea93f.chunk.js": "./static/js/872.a02ea93f.chunk.js",
"static/js/4676.563616b8.chunk.js": "./static/js/4676.563616b8.chunk.js",
"static/js/614.29e0d9dd.chunk.js": "./static/js/614.29e0d9dd.chunk.js",
"static/js/502.b83faa7c.chunk.js": "./static/js/502.b83faa7c.chunk.js",
"static/js/6799.3bc3931a.chunk.js": "./static/js/6799.3bc3931a.chunk.js",
"static/js/7659.9554f8f3.chunk.js": "./static/js/7659.9554f8f3.chunk.js",
"static/js/7515.3c5e861f.chunk.js": "./static/js/7515.3c5e861f.chunk.js",
"static/js/6654.bfc29bf7.chunk.js": "./static/js/6654.bfc29bf7.chunk.js",
"static/js/5311.7739b1f7.chunk.js": "./static/js/5311.7739b1f7.chunk.js",
"static/js/5809.4d2c5844.chunk.js": "./static/js/5809.4d2c5844.chunk.js",
"static/js/7264.dfbba757.chunk.js": "./static/js/7264.dfbba757.chunk.js",
"static/js/4172.139ac13b.chunk.js": "./static/js/4172.139ac13b.chunk.js",
"static/js/6108.84010ebc.chunk.js": "./static/js/6108.84010ebc.chunk.js",
"static/js/9714.c65a6c13.chunk.js": "./static/js/9714.c65a6c13.chunk.js",
"static/js/459.f3b23f09.chunk.js": "./static/js/459.f3b23f09.chunk.js",
"static/js/8152.789135af.chunk.js": "./static/js/8152.789135af.chunk.js",
"static/js/1303.6fa13ab4.chunk.js": "./static/js/1303.6fa13ab4.chunk.js",
"static/js/5079.118cae1f.chunk.js": "./static/js/5079.118cae1f.chunk.js",
"static/js/4581.41480fcf.chunk.js": "./static/js/4581.41480fcf.chunk.js",
"static/js/6016.2a05d7e1.chunk.js": "./static/js/6016.2a05d7e1.chunk.js",
"static/js/9652.3c40b533.chunk.js": "./static/js/9652.3c40b533.chunk.js",
"static/js/2346.b8159dba.chunk.js": "./static/js/2346.b8159dba.chunk.js",
"static/js/1195.955963a0.chunk.js": "./static/js/1195.955963a0.chunk.js",
"static/js/1011.59fa8004.chunk.js": "./static/js/1011.59fa8004.chunk.js",
"static/js/1011.925632a1.chunk.js": "./static/js/1011.925632a1.chunk.js",
"static/media/videoBG.mp4": "./static/media/videoBG.17363418b3c2246a0e27.mp4",
"static/media/loginAnimationPoster.png": "./static/media/loginAnimationPoster.9aa924bfe619e71d5d29.png",
"static/media/Inter-BoldItalic.woff": "./static/media/Inter-BoldItalic.b376885042f6c961a541.woff",
@@ -119,104 +117,102 @@
"static/media/placeholderimage.png": "./static/media/placeholderimage.077ea48bd1ef1f4a883f.png",
"index.html": "./index.html",
"main.e60e4760.css.map": "./static/css/main.e60e4760.css.map",
"main.dd292f6d.js.map": "./static/js/main.dd292f6d.js.map",
"5301.2c626a41.chunk.js.map": "./static/js/5301.2c626a41.chunk.js.map",
"9361.3fc638a6.chunk.js.map": "./static/js/9361.3fc638a6.chunk.js.map",
"843.454ac75f.chunk.js.map": "./static/js/843.454ac75f.chunk.js.map",
"3035.d50f543e.chunk.js.map": "./static/js/3035.d50f543e.chunk.js.map",
"9537.69d1689c.chunk.js.map": "./static/js/9537.69d1689c.chunk.js.map",
"5711.9df9b4a2.chunk.js.map": "./static/js/5711.9df9b4a2.chunk.js.map",
"8769.996efd0a.chunk.js.map": "./static/js/8769.996efd0a.chunk.js.map",
"2033.bea44dd7.chunk.js.map": "./static/js/2033.bea44dd7.chunk.js.map",
"8311.d87242df.chunk.js.map": "./static/js/8311.d87242df.chunk.js.map",
"9987.79508d87.chunk.js.map": "./static/js/9987.79508d87.chunk.js.map",
"689.8272f409.chunk.js.map": "./static/js/689.8272f409.chunk.js.map",
"6164.c2cd952a.chunk.js.map": "./static/js/6164.c2cd952a.chunk.js.map",
"2372.97c7de62.chunk.js.map": "./static/js/2372.97c7de62.chunk.js.map",
"1324.cc645cb1.chunk.js.map": "./static/js/1324.cc645cb1.chunk.js.map",
"5693.eb317771.chunk.js.map": "./static/js/5693.eb317771.chunk.js.map",
"main.41754270.js.map": "./static/js/main.41754270.js.map",
"5301.79001158.chunk.js.map": "./static/js/5301.79001158.chunk.js.map",
"9361.ce3b326c.chunk.js.map": "./static/js/9361.ce3b326c.chunk.js.map",
"843.791dd143.chunk.js.map": "./static/js/843.791dd143.chunk.js.map",
"3035.ac7d86b8.chunk.js.map": "./static/js/3035.ac7d86b8.chunk.js.map",
"9537.895fc3ff.chunk.js.map": "./static/js/9537.895fc3ff.chunk.js.map",
"5711.9a92ab65.chunk.js.map": "./static/js/5711.9a92ab65.chunk.js.map",
"8769.58bd5ad6.chunk.js.map": "./static/js/8769.58bd5ad6.chunk.js.map",
"2033.a7412d01.chunk.js.map": "./static/js/2033.a7412d01.chunk.js.map",
"8311.0b90f115.chunk.js.map": "./static/js/8311.0b90f115.chunk.js.map",
"9987.62e7e151.chunk.js.map": "./static/js/9987.62e7e151.chunk.js.map",
"689.3e04559d.chunk.js.map": "./static/js/689.3e04559d.chunk.js.map",
"6164.8759ced6.chunk.js.map": "./static/js/6164.8759ced6.chunk.js.map",
"2372.d67d02b5.chunk.js.map": "./static/js/2372.d67d02b5.chunk.js.map",
"1324.acba4c47.chunk.js.map": "./static/js/1324.acba4c47.chunk.js.map",
"5693.741d3c68.chunk.js.map": "./static/js/5693.741d3c68.chunk.js.map",
"5872.62eb672b.chunk.js.map": "./static/js/5872.62eb672b.chunk.js.map",
"6758.cf46c98c.chunk.js.map": "./static/js/6758.cf46c98c.chunk.js.map",
"6758.c83201ee.chunk.js.map": "./static/js/6758.c83201ee.chunk.js.map",
"755.ac098541.chunk.js.map": "./static/js/755.ac098541.chunk.js.map",
"8715.1422d39d.chunk.js.map": "./static/js/8715.1422d39d.chunk.js.map",
"7880.813513ce.chunk.js.map": "./static/js/7880.813513ce.chunk.js.map",
"8715.e34fbcdb.chunk.js.map": "./static/js/8715.e34fbcdb.chunk.js.map",
"7880.35251951.chunk.js.map": "./static/js/7880.35251951.chunk.js.map",
"2209.3b0ca7fa.chunk.js.map": "./static/js/2209.3b0ca7fa.chunk.js.map",
"7435.2ed74878.chunk.js.map": "./static/js/7435.2ed74878.chunk.js.map",
"9340.acfd036d.chunk.js.map": "./static/js/9340.acfd036d.chunk.js.map",
"9269.dfec9438.chunk.js.map": "./static/js/9269.dfec9438.chunk.js.map",
"6925.b3e208b0.chunk.js.map": "./static/js/6925.b3e208b0.chunk.js.map",
"3527.b7757ae8.chunk.js.map": "./static/js/3527.b7757ae8.chunk.js.map",
"8789.c1e4949f.chunk.js.map": "./static/js/8789.c1e4949f.chunk.js.map",
"7485.64738b77.chunk.js.map": "./static/js/7485.64738b77.chunk.js.map",
"7041.219c4d11.chunk.js.map": "./static/js/7041.219c4d11.chunk.js.map",
"2138.7da0f275.chunk.js.map": "./static/js/2138.7da0f275.chunk.js.map",
"5699.016e97fa.chunk.js.map": "./static/js/5699.016e97fa.chunk.js.map",
"7381.0caa382c.chunk.js.map": "./static/js/7381.0caa382c.chunk.js.map",
"7052.1e7e2b40.chunk.js.map": "./static/js/7052.1e7e2b40.chunk.js.map",
"144.c7530a4b.chunk.js.map": "./static/js/144.c7530a4b.chunk.js.map",
"5978.7fb91072.chunk.js.map": "./static/js/5978.7fb91072.chunk.js.map",
"4103.926c44ef.chunk.js.map": "./static/js/4103.926c44ef.chunk.js.map",
"1702.851e407f.chunk.js.map": "./static/js/1702.851e407f.chunk.js.map",
"7601.4e033e78.chunk.js.map": "./static/js/7601.4e033e78.chunk.js.map",
"2959.f25a9ef1.chunk.js.map": "./static/js/2959.f25a9ef1.chunk.js.map",
"9619.a756233f.chunk.js.map": "./static/js/9619.a756233f.chunk.js.map",
"8017.d5b163f3.chunk.js.map": "./static/js/8017.d5b163f3.chunk.js.map",
"7435.14c02ae7.chunk.js.map": "./static/js/7435.14c02ae7.chunk.js.map",
"9340.9df4309b.chunk.js.map": "./static/js/9340.9df4309b.chunk.js.map",
"9269.853e70e9.chunk.js.map": "./static/js/9269.853e70e9.chunk.js.map",
"6925.034411f2.chunk.js.map": "./static/js/6925.034411f2.chunk.js.map",
"3527.96de4083.chunk.js.map": "./static/js/3527.96de4083.chunk.js.map",
"8789.c066ce6c.chunk.js.map": "./static/js/8789.c066ce6c.chunk.js.map",
"7485.3a46a0a3.chunk.js.map": "./static/js/7485.3a46a0a3.chunk.js.map",
"7041.cfb08b62.chunk.js.map": "./static/js/7041.cfb08b62.chunk.js.map",
"2138.7ef0755e.chunk.js.map": "./static/js/2138.7ef0755e.chunk.js.map",
"5699.6a74f983.chunk.js.map": "./static/js/5699.6a74f983.chunk.js.map",
"5153.24546201.chunk.js.map": "./static/js/5153.24546201.chunk.js.map",
"7052.50a0217e.chunk.js.map": "./static/js/7052.50a0217e.chunk.js.map",
"144.45106af8.chunk.js.map": "./static/js/144.45106af8.chunk.js.map",
"5978.e6638d0b.chunk.js.map": "./static/js/5978.e6638d0b.chunk.js.map",
"4103.f42a2340.chunk.js.map": "./static/js/4103.f42a2340.chunk.js.map",
"1702.7a20d1f8.chunk.js.map": "./static/js/1702.7a20d1f8.chunk.js.map",
"7601.b9b33cda.chunk.js.map": "./static/js/7601.b9b33cda.chunk.js.map",
"7945.5cbf1d20.chunk.js.map": "./static/js/7945.5cbf1d20.chunk.js.map",
"9619.c5f43814.chunk.js.map": "./static/js/9619.c5f43814.chunk.js.map",
"8017.04f38735.chunk.js.map": "./static/js/8017.04f38735.chunk.js.map",
"3323.f86a698b.chunk.js.map": "./static/js/3323.f86a698b.chunk.js.map",
"5128.96ab1387.chunk.js.map": "./static/js/5128.96ab1387.chunk.js.map",
"6140.37801ce8.chunk.js.map": "./static/js/6140.37801ce8.chunk.js.map",
"696.77a3fec7.chunk.js.map": "./static/js/696.77a3fec7.chunk.js.map",
"2166.a0f01e1a.chunk.js.map": "./static/js/2166.a0f01e1a.chunk.js.map",
"7063.d62078ab.chunk.js.map": "./static/js/7063.d62078ab.chunk.js.map",
"3061.2419f208.chunk.js.map": "./static/js/3061.2419f208.chunk.js.map",
"5064.ccf271db.chunk.js.map": "./static/js/5064.ccf271db.chunk.js.map",
"7643.41c0709d.chunk.js.map": "./static/js/7643.41c0709d.chunk.js.map",
"985.c802474d.chunk.js.map": "./static/js/985.c802474d.chunk.js.map",
"1370.a3d466ac.chunk.js.map": "./static/js/1370.a3d466ac.chunk.js.map",
"8823.5a005f09.chunk.js.map": "./static/js/8823.5a005f09.chunk.js.map",
"24.1245bd95.chunk.js.map": "./static/js/24.1245bd95.chunk.js.map",
"5851.9aeea951.chunk.js.map": "./static/js/5851.9aeea951.chunk.js.map",
"4705.1a1c4cd3.chunk.js.map": "./static/js/4705.1a1c4cd3.chunk.js.map",
"3654.877a48d3.chunk.js.map": "./static/js/3654.877a48d3.chunk.js.map",
"960.41c7b96c.chunk.js.map": "./static/js/960.41c7b96c.chunk.js.map",
"8642.ab45092c.chunk.js.map": "./static/js/8642.ab45092c.chunk.js.map",
"3329.89a09424.chunk.js.map": "./static/js/3329.89a09424.chunk.js.map",
"2332.7e0aee28.chunk.js.map": "./static/js/2332.7e0aee28.chunk.js.map",
"5941.c85331e3.chunk.js.map": "./static/js/5941.c85331e3.chunk.js.map",
"2704.fe33dd23.chunk.js.map": "./static/js/2704.fe33dd23.chunk.js.map",
"7774.32142847.chunk.js.map": "./static/js/7774.32142847.chunk.js.map",
"3851.c5eaa08e.chunk.js.map": "./static/js/3851.c5eaa08e.chunk.js.map",
"9965.e00429f9.chunk.js.map": "./static/js/9965.e00429f9.chunk.js.map",
"6065.e12fd403.chunk.js.map": "./static/js/6065.e12fd403.chunk.js.map",
"12.ab9b7ed0.chunk.js.map": "./static/js/12.ab9b7ed0.chunk.js.map",
"8010.8ce54818.chunk.js.map": "./static/js/8010.8ce54818.chunk.js.map",
"2689.5e76c1cd.chunk.js.map": "./static/js/2689.5e76c1cd.chunk.js.map",
"872.6f58df17.chunk.js.map": "./static/js/872.6f58df17.chunk.js.map",
"4676.8d6be1dd.chunk.js.map": "./static/js/4676.8d6be1dd.chunk.js.map",
"8825.e5adf924.chunk.js.map": "./static/js/8825.e5adf924.chunk.js.map",
"614.f6cdf349.chunk.js.map": "./static/js/614.f6cdf349.chunk.js.map",
"502.0106f2a9.chunk.js.map": "./static/js/502.0106f2a9.chunk.js.map",
"6799.61dee8ac.chunk.js.map": "./static/js/6799.61dee8ac.chunk.js.map",
"7659.124c07a5.chunk.js.map": "./static/js/7659.124c07a5.chunk.js.map",
"7515.346161ed.chunk.js.map": "./static/js/7515.346161ed.chunk.js.map",
"6654.d76daa88.chunk.js.map": "./static/js/6654.d76daa88.chunk.js.map",
"5311.bf44bf69.chunk.js.map": "./static/js/5311.bf44bf69.chunk.js.map",
"5809.064e83cc.chunk.js.map": "./static/js/5809.064e83cc.chunk.js.map",
"7264.f7c51a0e.chunk.js.map": "./static/js/7264.f7c51a0e.chunk.js.map",
"4172.0d489f24.chunk.js.map": "./static/js/4172.0d489f24.chunk.js.map",
"6108.7a769377.chunk.js.map": "./static/js/6108.7a769377.chunk.js.map",
"9714.48a29c42.chunk.js.map": "./static/js/9714.48a29c42.chunk.js.map",
"459.65dbecac.chunk.js.map": "./static/js/459.65dbecac.chunk.js.map",
"8152.6306ebd5.chunk.js.map": "./static/js/8152.6306ebd5.chunk.js.map",
"1303.12f6ca82.chunk.js.map": "./static/js/1303.12f6ca82.chunk.js.map",
"5079.a0847792.chunk.js.map": "./static/js/5079.a0847792.chunk.js.map",
"696.8dec9292.chunk.js.map": "./static/js/696.8dec9292.chunk.js.map",
"2166.880cc038.chunk.js.map": "./static/js/2166.880cc038.chunk.js.map",
"7063.bf210d7d.chunk.js.map": "./static/js/7063.bf210d7d.chunk.js.map",
"3061.2061eb2e.chunk.js.map": "./static/js/3061.2061eb2e.chunk.js.map",
"5064.0016782f.chunk.js.map": "./static/js/5064.0016782f.chunk.js.map",
"7643.f3b86455.chunk.js.map": "./static/js/7643.f3b86455.chunk.js.map",
"985.77a278ca.chunk.js.map": "./static/js/985.77a278ca.chunk.js.map",
"1370.efee6fa6.chunk.js.map": "./static/js/1370.efee6fa6.chunk.js.map",
"8823.bc273dec.chunk.js.map": "./static/js/8823.bc273dec.chunk.js.map",
"24.e576918a.chunk.js.map": "./static/js/24.e576918a.chunk.js.map",
"5851.f2e67509.chunk.js.map": "./static/js/5851.f2e67509.chunk.js.map",
"4705.b1d28560.chunk.js.map": "./static/js/4705.b1d28560.chunk.js.map",
"8963.d2703f60.chunk.js.map": "./static/js/8963.d2703f60.chunk.js.map",
"960.fdc14172.chunk.js.map": "./static/js/960.fdc14172.chunk.js.map",
"8642.d29d2259.chunk.js.map": "./static/js/8642.d29d2259.chunk.js.map",
"3329.c25b9821.chunk.js.map": "./static/js/3329.c25b9821.chunk.js.map",
"5941.179188d6.chunk.js.map": "./static/js/5941.179188d6.chunk.js.map",
"2704.71ac23f9.chunk.js.map": "./static/js/2704.71ac23f9.chunk.js.map",
"7774.a47fade2.chunk.js.map": "./static/js/7774.a47fade2.chunk.js.map",
"3851.b9c2f806.chunk.js.map": "./static/js/3851.b9c2f806.chunk.js.map",
"9965.bf313381.chunk.js.map": "./static/js/9965.bf313381.chunk.js.map",
"6065.f1e0bfe2.chunk.js.map": "./static/js/6065.f1e0bfe2.chunk.js.map",
"12.eed2916e.chunk.js.map": "./static/js/12.eed2916e.chunk.js.map",
"8010.f3d6885a.chunk.js.map": "./static/js/8010.f3d6885a.chunk.js.map",
"2689.ba69c148.chunk.js.map": "./static/js/2689.ba69c148.chunk.js.map",
"872.a02ea93f.chunk.js.map": "./static/js/872.a02ea93f.chunk.js.map",
"4676.563616b8.chunk.js.map": "./static/js/4676.563616b8.chunk.js.map",
"614.29e0d9dd.chunk.js.map": "./static/js/614.29e0d9dd.chunk.js.map",
"502.b83faa7c.chunk.js.map": "./static/js/502.b83faa7c.chunk.js.map",
"6799.3bc3931a.chunk.js.map": "./static/js/6799.3bc3931a.chunk.js.map",
"7659.9554f8f3.chunk.js.map": "./static/js/7659.9554f8f3.chunk.js.map",
"7515.3c5e861f.chunk.js.map": "./static/js/7515.3c5e861f.chunk.js.map",
"6654.bfc29bf7.chunk.js.map": "./static/js/6654.bfc29bf7.chunk.js.map",
"5311.7739b1f7.chunk.js.map": "./static/js/5311.7739b1f7.chunk.js.map",
"5809.4d2c5844.chunk.js.map": "./static/js/5809.4d2c5844.chunk.js.map",
"7264.dfbba757.chunk.js.map": "./static/js/7264.dfbba757.chunk.js.map",
"4172.139ac13b.chunk.js.map": "./static/js/4172.139ac13b.chunk.js.map",
"6108.84010ebc.chunk.js.map": "./static/js/6108.84010ebc.chunk.js.map",
"9714.c65a6c13.chunk.js.map": "./static/js/9714.c65a6c13.chunk.js.map",
"459.f3b23f09.chunk.js.map": "./static/js/459.f3b23f09.chunk.js.map",
"8152.789135af.chunk.js.map": "./static/js/8152.789135af.chunk.js.map",
"1303.6fa13ab4.chunk.js.map": "./static/js/1303.6fa13ab4.chunk.js.map",
"5079.118cae1f.chunk.js.map": "./static/js/5079.118cae1f.chunk.js.map",
"4581.41480fcf.chunk.js.map": "./static/js/4581.41480fcf.chunk.js.map",
"6016.2a05d7e1.chunk.js.map": "./static/js/6016.2a05d7e1.chunk.js.map",
"9652.3c40b533.chunk.js.map": "./static/js/9652.3c40b533.chunk.js.map",
"2346.b8159dba.chunk.js.map": "./static/js/2346.b8159dba.chunk.js.map",
"1195.955963a0.chunk.js.map": "./static/js/1195.955963a0.chunk.js.map",
"1011.59fa8004.chunk.js.map": "./static/js/1011.59fa8004.chunk.js.map"
"1011.925632a1.chunk.js.map": "./static/js/1011.925632a1.chunk.js.map"
},
"entrypoints": [
"static/css/main.e60e4760.css",
"static/js/main.dd292f6d.js"
"static/js/main.41754270.js"
]
}

View File

@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.dd292f6d.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.41754270.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>

Some files were not shown because too many files have changed in this diff Show More