Compare commits
144 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c96eb9e25 | ||
|
|
cd5f5cb635 | ||
|
|
e17a371744 | ||
|
|
4f72aa969b | ||
|
|
3a84cba801 | ||
|
|
9df7b815e9 | ||
|
|
3617ff2aef | ||
|
|
e7f16b4899 | ||
|
|
dbe456c1a9 | ||
|
|
6a96ec8177 | ||
|
|
85398eec53 | ||
|
|
e7f220b069 | ||
|
|
1bb7658294 | ||
|
|
39b7b3292a | ||
|
|
38cf606371 | ||
|
|
5e3f9acff9 | ||
|
|
2305c0563a | ||
|
|
b5a3398a69 | ||
|
|
c787110e17 | ||
|
|
1a83797a86 | ||
|
|
68e0f1d6a2 | ||
|
|
2d3a3c396c | ||
|
|
d6aceb5430 | ||
|
|
1c109769df | ||
|
|
f3bcfc327d | ||
|
|
fd779c2ffa | ||
|
|
58903e8337 | ||
|
|
5b98bb8fd6 | ||
|
|
c98d5c06d0 | ||
|
|
33c979783d | ||
|
|
eeb95b2bf6 | ||
|
|
e5c96a0787 | ||
|
|
e3c6e22b4e | ||
|
|
9789ec36db | ||
|
|
51ba86fa46 | ||
|
|
f5922bb68b | ||
|
|
40812fc086 | ||
|
|
8b34b81a61 | ||
|
|
04e1c4573f | ||
|
|
d7de170105 | ||
|
|
369ae9342e | ||
|
|
2b1d17e38f | ||
|
|
d5c01fcd7d | ||
|
|
d97d18ebab | ||
|
|
aa2714d118 | ||
|
|
06f259f190 | ||
|
|
77e74917ca | ||
|
|
d582cc96b7 | ||
|
|
0288215fbb | ||
|
|
d3e84e5824 | ||
|
|
dd91c793e2 | ||
|
|
b495148a69 | ||
|
|
e0f3e4513d | ||
|
|
6512a51119 | ||
|
|
90c54221d6 | ||
|
|
3f023f9771 | ||
|
|
a4ad341a18 | ||
|
|
2d6f949359 | ||
|
|
7577703d64 | ||
|
|
b24d62a695 | ||
|
|
e541446631 | ||
|
|
e2d86354fc | ||
|
|
1ce18043d5 | ||
|
|
4005c20f7e | ||
|
|
5bcf245ed9 | ||
|
|
402e07c844 | ||
|
|
8404baecd8 | ||
|
|
3c0e3a1208 | ||
|
|
cb35dcf971 | ||
|
|
41418bcf45 | ||
|
|
132b08b40e | ||
|
|
dbbaae78f7 | ||
|
|
585780d415 | ||
|
|
44b9979f02 | ||
|
|
0749c87ce7 | ||
|
|
e5f7059a5e | ||
|
|
d15472f417 | ||
|
|
726bfe623c | ||
|
|
e47a57af8c | ||
|
|
f673f17407 | ||
|
|
829833f242 | ||
|
|
94c3ade7fc | ||
|
|
4a27ef4b2c | ||
|
|
59b43884ff | ||
|
|
219fe55356 | ||
|
|
9136c2a167 | ||
|
|
114bc364e3 | ||
|
|
2caad9964f | ||
|
|
d573007747 | ||
|
|
f054b1c251 | ||
|
|
7a2358272a | ||
|
|
8a6a75b7a2 | ||
|
|
8cf678fb27 | ||
|
|
a20c6dc907 | ||
|
|
37ff8bb60d | ||
|
|
b6ac055857 | ||
|
|
12e53a1468 | ||
|
|
b21123e1cd | ||
|
|
f1db949abc | ||
|
|
761c6529a2 | ||
|
|
1f832fa294 | ||
|
|
be569aee4f | ||
|
|
419e94ccec | ||
|
|
12bc5265b8 | ||
|
|
32898f0c57 | ||
|
|
125c9abf56 | ||
|
|
bc27db4a69 | ||
|
|
dd8e2b13d3 | ||
|
|
005e3b941c | ||
|
|
efa614c773 | ||
|
|
63350e5492 | ||
|
|
255c128b67 | ||
|
|
06f333395e | ||
|
|
3cd024ea2c | ||
|
|
9c0a407db6 | ||
|
|
dc3c619f3f | ||
|
|
5000aafba6 | ||
|
|
b9f2a39d50 | ||
|
|
df321191f4 | ||
|
|
547eb41e96 | ||
|
|
afbb83e081 | ||
|
|
b599968570 | ||
|
|
24cc60f34e | ||
|
|
f967058409 | ||
|
|
078e09ba76 | ||
|
|
d6f97841d4 | ||
|
|
619ac124b3 | ||
|
|
a2180e123d | ||
|
|
0325bb7e2d | ||
|
|
fce361e5bd | ||
|
|
ed6d6e8b9d | ||
|
|
406709f66b | ||
|
|
3ac45a2211 | ||
|
|
716f886780 | ||
|
|
4ef498f0c3 | ||
|
|
5e764e61ba | ||
|
|
1466632fd6 | ||
|
|
0c43e5c3f4 | ||
|
|
7e9d581277 | ||
|
|
c928972137 | ||
|
|
78884e3806 | ||
|
|
f6ac7e047e | ||
|
|
e1fdf3fb28 | ||
|
|
e4510cbc18 |
@@ -4,3 +4,4 @@ target/
|
|||||||
console
|
console
|
||||||
!console/
|
!console/
|
||||||
portal-ui/node_modules/
|
portal-ui/node_modules/
|
||||||
|
.git/
|
||||||
|
|||||||
3
.github/workflows/go.yml
vendored
3
.github/workflows/go.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.14.x]
|
go-version: [1.15.x]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||||
@@ -33,4 +33,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make verifiers
|
make verifiers
|
||||||
make test
|
make test
|
||||||
|
make crosscompile
|
||||||
make console
|
make console
|
||||||
|
|||||||
15
.github/workflows/react.yml
vendored
Normal file
15
.github/workflows/react.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: "React Tests"
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install modules
|
||||||
|
working-directory: ./portal-ui
|
||||||
|
run: yarn
|
||||||
|
- name: Run tests
|
||||||
|
working-directory: ./portal-ui
|
||||||
|
run: yarn test
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -24,6 +24,11 @@ console
|
|||||||
|
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
|
# Ignore node_modules
|
||||||
|
|
||||||
|
portal-ui/node_modules/
|
||||||
|
portal-ui/build/
|
||||||
|
|
||||||
# Ignore tls cert and key
|
# Ignore tls cert and key
|
||||||
private.key
|
private.key
|
||||||
public.crt
|
public.crt
|
||||||
@@ -32,3 +37,4 @@ public.crt
|
|||||||
.vscode/
|
.vscode/
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
*~
|
*~
|
||||||
|
.eslintcache
|
||||||
|
|||||||
133
.goreleaser.yml
133
.goreleaser.yml
@@ -3,10 +3,12 @@
|
|||||||
project_name: console
|
project_name: console
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name_template: "Version {{.Version}}"
|
name_template: "Release version {{.Version}}"
|
||||||
github:
|
github:
|
||||||
owner: minio
|
owner: minio
|
||||||
name: console
|
name: console
|
||||||
|
extra_files:
|
||||||
|
- glob: "*.minisig"
|
||||||
|
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
@@ -16,94 +18,117 @@ before:
|
|||||||
builds:
|
builds:
|
||||||
-
|
-
|
||||||
goos:
|
goos:
|
||||||
- freebsd
|
|
||||||
- windows
|
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
|
- windows
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- s390x
|
||||||
- arm64
|
- arm64
|
||||||
|
|
||||||
ignore:
|
ignore:
|
||||||
- goos: darwin
|
- goos: darwin
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
- goos: darwin
|
- goos: darwin
|
||||||
goarch: arm
|
goarch: arm
|
||||||
- goos: darwin
|
|
||||||
goarch: ppc64le
|
|
||||||
- goos: darwin
|
|
||||||
goarch: s390x
|
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm
|
goarch: arm
|
||||||
- goos: windows
|
|
||||||
goarch: ppc64le
|
|
||||||
- goos: windows
|
|
||||||
goarch: s390x
|
|
||||||
- goos: freebsd
|
|
||||||
goarch: arm
|
|
||||||
- goos: freebsd
|
|
||||||
goarch: arm64
|
|
||||||
- goos: freebsd
|
|
||||||
goarch: ppc64le
|
|
||||||
- goos: freebsd
|
|
||||||
goarch: s390x
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
|
|
||||||
main: ./cmd/console/
|
main: ./cmd/console/
|
||||||
|
|
||||||
flags:
|
flags:
|
||||||
- -trimpath
|
- -trimpath
|
||||||
- --tags=kqueue
|
- --tags=kqueue
|
||||||
|
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X github.com/minio/console/pkg.ReleaseTag={{.Tag}} -X github.com/minio/console/pkg.CommitID={{.FullCommit}} -X github.com/minio/console/pkg.Version={{.Version}} -X github.com/minio/console/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/console/pkg.ReleaseTime={{.Date}}
|
- -s -w -X github.com/minio/console/pkg.ReleaseTag={{.Tag}} -X github.com/minio/console/pkg.CommitID={{.FullCommit}} -X github.com/minio/console/pkg.Version={{.Version}} -X github.com/minio/console/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/console/pkg.ReleaseTime={{.Date}}
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
-
|
-
|
||||||
|
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
|
||||||
|
format: binary
|
||||||
replacements:
|
replacements:
|
||||||
darwin: Darwin
|
arm: arm
|
||||||
linux: Linux
|
|
||||||
windows: Windows
|
signs:
|
||||||
freebsd: FreeBSD
|
-
|
||||||
amd64: x86_64
|
signature: "${artifact}.minisig"
|
||||||
format_overrides:
|
cmd: "sh"
|
||||||
- goos: windows
|
args:
|
||||||
format: zip
|
- '-c'
|
||||||
files:
|
- 'minisign -s /media/${USER}/minio/minisign.key -Sm ${artifact} < /media/${USER}/minio/minisign-passphrase'
|
||||||
- README.md
|
artifacts: all
|
||||||
- LICENSE
|
|
||||||
checksum:
|
|
||||||
name_template: 'checksums.txt'
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: 'snapshot-{{ time "2006-01-02" }}'
|
name_template: v0.0.0@{{.ShortCommit}}
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
sort: asc
|
sort: asc
|
||||||
filters:
|
|
||||||
exclude:
|
|
||||||
- '^docs:'
|
|
||||||
- '^test:'
|
|
||||||
nfpms:
|
nfpms:
|
||||||
-
|
-
|
||||||
vendor: MinIO Inc.
|
vendor: MinIO, Inc.
|
||||||
homepage: https://github.com/minio/console
|
homepage: https://github.com/minio/console
|
||||||
maintainer: MinIO <minio@minio.io>
|
maintainer: MinIO Development <dev@min.io>
|
||||||
description: MinIO Console Server
|
description: MinIO Console Server
|
||||||
license: GNU Affero General Public License v3.0
|
license: GNU Affero General Public License v3.0
|
||||||
formats:
|
formats:
|
||||||
- deb
|
- deb
|
||||||
- rpm
|
- rpm
|
||||||
replacements:
|
|
||||||
darwin: Darwin
|
|
||||||
linux: Linux
|
|
||||||
freebsd: FreeBSD
|
|
||||||
amd64: x86_64
|
|
||||||
dockers:
|
dockers:
|
||||||
-
|
- image_templates:
|
||||||
# GOOS of the built binary that should be used.
|
- "minio/console:{{ .Tag }}-amd64"
|
||||||
goos: linux
|
use_buildx: true
|
||||||
# GOARCH of the built binary that should be used.
|
dockerfile: Dockerfile.release
|
||||||
goarch: amd64
|
extra_files:
|
||||||
dockerfile: Dockerfile.release
|
- LICENSE
|
||||||
image_templates:
|
- CREDITS
|
||||||
- "minio/console:{{ .Tag }}"
|
build_flag_templates:
|
||||||
- "minio/console:latest"
|
- "--platform=linux/amd64"
|
||||||
|
- image_templates:
|
||||||
|
- "minio/console:{{ .Tag }}-ppc64le"
|
||||||
|
use_buildx: true
|
||||||
|
dockerfile: Dockerfile.release
|
||||||
|
extra_files:
|
||||||
|
- LICENSE
|
||||||
|
- CREDITS
|
||||||
|
build_flag_templates:
|
||||||
|
- "--platform=linux/ppc64le"
|
||||||
|
- image_templates:
|
||||||
|
- "minio/console:{{ .Tag }}-s390x"
|
||||||
|
use_buildx: true
|
||||||
|
dockerfile: Dockerfile.release
|
||||||
|
extra_files:
|
||||||
|
- LICENSE
|
||||||
|
- CREDITS
|
||||||
|
build_flag_templates:
|
||||||
|
- "--platform=linux/s390x"
|
||||||
|
- image_templates:
|
||||||
|
- "minio/console:{{ .Tag }}-arm64"
|
||||||
|
use_buildx: true
|
||||||
|
goarch: arm64
|
||||||
|
dockerfile: Dockerfile.release
|
||||||
|
extra_files:
|
||||||
|
- LICENSE
|
||||||
|
- CREDITS
|
||||||
|
build_flag_templates:
|
||||||
|
- "--platform=linux/arm64"
|
||||||
|
docker_manifests:
|
||||||
|
- name_template: minio/console:{{ .Tag }}
|
||||||
|
image_templates:
|
||||||
|
- minio/console:{{ .Tag }}-amd64
|
||||||
|
- minio/console:{{ .Tag }}-arm64
|
||||||
|
- minio/console:{{ .Tag }}-ppc64le
|
||||||
|
- minio/console:{{ .Tag }}-s390x
|
||||||
|
- name_template: minio/console:latest
|
||||||
|
image_templates:
|
||||||
|
- minio/console:{{ .Tag }}-amd64
|
||||||
|
- minio/console:{{ .Tag }}-arm64
|
||||||
|
- minio/console:{{ .Tag }}-ppc64le
|
||||||
|
- minio/console:{{ .Tag }}-s390x
|
||||||
|
|||||||
@@ -11,40 +11,7 @@ $ docker run --rm -p 389:389 -p 636:636 --name my-openldap-container --detach os
|
|||||||
Run the `billy.ldif` file using `ldapadd` command to create a new user and assign it to a group.
|
Run the `billy.ldif` file using `ldapadd` command to create a new user and assign it to a group.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cat > billy.ldif << EOF
|
$ docker cp console/docs/ldap/billy.ldif my-openldap-container:/container/service/slapd/assets/test/billy.ldif
|
||||||
# LDIF fragment to create group branch under root
|
|
||||||
dn: uid=billy,dc=example,dc=org
|
|
||||||
uid: billy
|
|
||||||
cn: billy
|
|
||||||
sn: 3
|
|
||||||
objectClass: top
|
|
||||||
objectClass: posixAccount
|
|
||||||
objectClass: inetOrgPerson
|
|
||||||
loginShell: /bin/bash
|
|
||||||
homeDirectory: /home/billy
|
|
||||||
uidNumber: 14583102
|
|
||||||
gidNumber: 14564100
|
|
||||||
userPassword: {SSHA}j3lBh1Seqe4rqF1+NuWmjhvtAni1JC5A
|
|
||||||
mail: billy@example.org
|
|
||||||
gecos: Billy User
|
|
||||||
# Create base group
|
|
||||||
dn: ou=groups,dc=example,dc=org
|
|
||||||
objectclass:organizationalunit
|
|
||||||
ou: groups
|
|
||||||
description: generic groups branch
|
|
||||||
# create consoleAdmin group (this already exists on minio and have a policy of s3::*)
|
|
||||||
dn: cn=consoleAdmin,ou=groups,dc=example,dc=org
|
|
||||||
objectClass: top
|
|
||||||
objectClass: posixGroup
|
|
||||||
gidNumber: 678
|
|
||||||
# Assing group to new user
|
|
||||||
dn: cn=consoleAdmin,ou=groups,dc=example,dc=org
|
|
||||||
changetype: modify
|
|
||||||
add: memberuid
|
|
||||||
memberuid: billy
|
|
||||||
EOF
|
|
||||||
|
|
||||||
$ docker cp billy.ldif my-openldap-container:/container/service/slapd/assets/test/billy.ldif
|
|
||||||
$ docker exec my-openldap-container ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -f /container/service/slapd/assets/test/billy.ldif -H ldap://localhost -ZZ
|
$ docker exec my-openldap-container ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -f /container/service/slapd/assets/test/billy.ldif -H ldap://localhost -ZZ
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -119,9 +86,6 @@ export MINIO_IDENTITY_LDAP_SERVER_INSECURE=on
|
|||||||
## Run Console
|
## Run Console
|
||||||
|
|
||||||
```
|
```
|
||||||
export CONSOLE_ACCESS_KEY=minio
|
|
||||||
export CONSOLE_SECRET_KEY=minio123
|
|
||||||
...
|
|
||||||
export CONSOLE_LDAP_ENABLED=on
|
export CONSOLE_LDAP_ENABLED=on
|
||||||
./console server
|
./console server
|
||||||
```
|
```
|
||||||
|
|||||||
29
Dockerfile
29
Dockerfile
@@ -1,4 +1,25 @@
|
|||||||
FROM golang:1.13
|
FROM golang:1.15 as binlayer
|
||||||
|
|
||||||
|
RUN go get github.com/go-bindata/go-bindata/... && go get github.com/elazarl/go-bindata-assetfs/...
|
||||||
|
|
||||||
|
FROM node:10 as uilayer
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=binlayer /go/bin/go-bindata-assetfs /bin/
|
||||||
|
COPY --from=binlayer /go/bin/go-bindata /bin/
|
||||||
|
|
||||||
|
COPY ./portal-ui/package.json ./
|
||||||
|
COPY ./portal-ui/yarn.lock ./
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
COPY ./portal-ui .
|
||||||
|
|
||||||
|
RUN yarn install && make build-static
|
||||||
|
|
||||||
|
USER node
|
||||||
|
|
||||||
|
FROM golang:1.15 as golayer
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get install -y ca-certificates
|
RUN apt-get update -y && apt-get install -y ca-certificates
|
||||||
|
|
||||||
@@ -12,6 +33,8 @@ RUN go mod download
|
|||||||
ADD . /go/src/github.com/minio/console/
|
ADD . /go/src/github.com/minio/console/
|
||||||
WORKDIR /go/src/github.com/minio/console/
|
WORKDIR /go/src/github.com/minio/console/
|
||||||
|
|
||||||
|
COPY --from=uilayer /app/bindata_assetfs.go /go/src/github.com/minio/console/portal-ui/bindata_assetfs.go
|
||||||
|
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
RUN go build -ldflags "-w -s" -a -o console ./cmd/console
|
RUN go build -ldflags "-w -s" -a -o console ./cmd/console
|
||||||
@@ -20,7 +43,7 @@ FROM scratch
|
|||||||
MAINTAINER MinIO Development "dev@min.io"
|
MAINTAINER MinIO Development "dev@min.io"
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|
||||||
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
COPY --from=golayer /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=0 /go/src/github.com/minio/console/console .
|
COPY --from=golayer /go/src/github.com/minio/console/console .
|
||||||
|
|
||||||
ENTRYPOINT ["/console"]
|
ENTRYPOINT ["/console"]
|
||||||
|
|||||||
20
Dockerfile.assets
Normal file
20
Dockerfile.assets
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM golang:1.15 as binlayer
|
||||||
|
|
||||||
|
RUN go get github.com/go-bindata/go-bindata/... && go get github.com/elazarl/go-bindata-assetfs/...
|
||||||
|
|
||||||
|
FROM node:10 as uilayer
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=binlayer /go/bin/go-bindata-assetfs /bin/
|
||||||
|
COPY --from=binlayer /go/bin/go-bindata /bin/
|
||||||
|
|
||||||
|
COPY ./portal-ui/package.json ./
|
||||||
|
COPY ./portal-ui/yarn.lock ./
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
COPY ./portal-ui .
|
||||||
|
|
||||||
|
RUN yarn install && make build-static
|
||||||
|
|
||||||
|
USER node
|
||||||
@@ -1,12 +1,21 @@
|
|||||||
FROM ubuntu:18.04 as certs
|
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get install -y ca-certificates
|
COPY CREDITS /licenses/CREDITS
|
||||||
|
COPY LICENSE /licenses/LICENSE
|
||||||
|
|
||||||
|
LABEL name="MinIO" \
|
||||||
|
vendor="MinIO Inc <dev@min.io>" \
|
||||||
|
maintainer="MinIO Inc <dev@min.io>" \
|
||||||
|
version="v0.5.2" \
|
||||||
|
release="v0.5.2" \
|
||||||
|
summary="A graphical user interface for MinIO" \
|
||||||
|
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
microdnf update --nodocs && \
|
||||||
|
microdnf install ca-certificates --nodocs
|
||||||
|
|
||||||
FROM scratch
|
|
||||||
MAINTAINER MinIO Development "dev@min.io"
|
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
COPY console /console
|
COPY console /console
|
||||||
|
|
||||||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/console"]
|
ENTRYPOINT ["/console"]
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -30,6 +30,9 @@ fmt:
|
|||||||
@GO111MODULE=on gofmt -d cmd/
|
@GO111MODULE=on gofmt -d cmd/
|
||||||
@GO111MODULE=on gofmt -d cluster/
|
@GO111MODULE=on gofmt -d cluster/
|
||||||
|
|
||||||
|
crosscompile:
|
||||||
|
@(env bash $(PWD)/cross-compile.sh)
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
@echo "Running $@ check"
|
@echo "Running $@ check"
|
||||||
@GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean
|
@GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean
|
||||||
@@ -47,7 +50,7 @@ swagger-gen:
|
|||||||
@swagger generate server -A console --main-package=console --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
|
@swagger generate server -A console --main-package=console --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
|
||||||
|
|
||||||
assets:
|
assets:
|
||||||
@(cd portal-ui; yarn install; make build-static; cd ..)
|
@(cd portal-ui; yarn install; make build-static; yarn prettier --write . --loglevel warn; cd ..)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@(GO111MODULE=on go test -race -v github.com/minio/console/restapi/...)
|
@(GO111MODULE=on go test -race -v github.com/minio/console/restapi/...)
|
||||||
|
|||||||
2
NOTICE
2
NOTICE
@@ -1,5 +1,5 @@
|
|||||||
This file is part of MinIO Console Server
|
This file is part of MinIO Console Server
|
||||||
Copyright (c) 2020 MinIO, Inc.
|
Copyright (c) 2021 MinIO, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
114
README.md
114
README.md
@@ -1,28 +1,47 @@
|
|||||||
# MinIO Console
|
# MinIO Console
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
A graphical user interface for [MinIO](https://github.com/minio/minio)
|
A graphical user interface for [MinIO](https://github.com/minio/minio)
|
||||||
|
|
||||||
|
| Dashboard | Creating a bucket |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
| Dashboard | Adding A User |
|
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
|
||||||
| ------------- | ------------- |
|
**Table of Contents**
|
||||||
|  |  |
|
|
||||||
|
|
||||||
## Setup
|
- [MinIO Console](#minio-console)
|
||||||
|
- [-](#-)
|
||||||
|
- [1. Create a user `console` using `mc`](#1-create-a-user-console-using-mc)
|
||||||
|
- [2. Create a policy for `console` with admin access to all resources (for testing)](#2-create-a-policy-for-console-with-admin-access-to-all-resources-for-testing)
|
||||||
|
- [3. Set the policy for the new `console` user](#3-set-the-policy-for-the-new-console-user)
|
||||||
|
- [Start Console service:](#start-console-service)
|
||||||
|
- [Salt to encrypt JWT payload](#salt-to-encrypt-jwt-payload)
|
||||||
|
- [Start Console service with TLS:](#start-console-service-with-tls)
|
||||||
|
- [Connect Console to a Minio using TLS and a self-signed certificate](#connect-console-to-a-minio-using-tls-and-a-self-signed-certificate)
|
||||||
|
- [Contribute to console Project](#contribute-to-console-project)
|
||||||
|
|
||||||
|
<!-- markdown-toc end -->
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
All `console` needs is a MinIO user with admin privileges and URL pointing to your MinIO deployment.
|
All `console` needs is a MinIO user with admin privileges and URL pointing to your MinIO deployment.
|
||||||
|
|
||||||
> Note: We don't recommend using MinIO's Operator Credentials
|
> Note: We don't recommend using MinIO's Operator Credentials
|
||||||
|
|
||||||
1. Create a user for `console` using `mc`.
|
#### 1. Create a user `console` using `mc`
|
||||||
```
|
|
||||||
$ set +o history
|
```bash
|
||||||
$ mc admin user add myminio console YOURCONSOLESECRET
|
mc admin user add myminio/
|
||||||
$ set -o history
|
Enter Access Key: console
|
||||||
|
Enter Secret Key: xxxxxxxx
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create a policy for `console` with access to everything (for testing and debugging)
|
#### 2. Create a policy for `console` with admin access to all resources (for testing)
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ cat > consoleAdmin.json << EOF
|
cat > admin.json << EOF
|
||||||
{
|
{
|
||||||
"Version": "2012-10-17",
|
"Version": "2012-10-17",
|
||||||
"Statement": [{
|
"Statement": [{
|
||||||
@@ -45,19 +64,21 @@ $ cat > consoleAdmin.json << EOF
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
$ mc admin policy add myminio consoleAdmin consoleAdmin.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Set the policy for the new `console` user
|
```sh
|
||||||
|
mc admin policy add myminio/ consoleAdmin admin.json
|
||||||
```
|
|
||||||
$ mc admin policy set myminio consoleAdmin user=console
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### 3. Set the policy for the new `console` user
|
||||||
|
|
||||||
### Note
|
```sh
|
||||||
Additionally, you can create policies to limit the privileges for `console` users, for example, if you want the user to only have access to dashboard, buckets, notifications and watch page, the policy should look like this:
|
mc admin policy set myminio consoleAdmin user=console
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> NOTE: Additionally, you can create policies to limit the privileges for other `console` users, for example, if you want the user to only have access to dashboard, buckets, notifications and watch page, the policy should look like this:
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"Version": "2012-10-17",
|
"Version": "2012-10-17",
|
||||||
"Statement": [{
|
"Statement": [{
|
||||||
@@ -97,29 +118,62 @@ Additionally, you can create policies to limit the privileges for `console` user
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run Console server
|
## Start Console service:
|
||||||
To run the server:
|
|
||||||
|
|
||||||
```
|
Before running console service, following environment settings must be supplied
|
||||||
export CONSOLE_HMAC_JWT_SECRET=YOURJWTSIGNINGSECRET
|
```sh
|
||||||
|
# Salt to encrypt JWT payload
|
||||||
#required to encrypt jwet payload
|
|
||||||
export CONSOLE_PBKDF_PASSPHRASE=SECRET
|
export CONSOLE_PBKDF_PASSPHRASE=SECRET
|
||||||
|
|
||||||
#required to encrypt jwet payload
|
# Required to encrypt JWT payload
|
||||||
export CONSOLE_PBKDF_SALT=SECRET
|
export CONSOLE_PBKDF_SALT=SECRET
|
||||||
|
|
||||||
export CONSOLE_ACCESS_KEY=console
|
# MinIO Endpoint
|
||||||
export CONSOLE_SECRET_KEY=YOURCONSOLESECRET
|
|
||||||
export CONSOLE_MINIO_SERVER=http://localhost:9000
|
export CONSOLE_MINIO_SERVER=http://localhost:9000
|
||||||
|
```
|
||||||
|
|
||||||
|
Now start the console service.
|
||||||
|
```
|
||||||
./console server
|
./console server
|
||||||
|
2021-01-19 02:36:08.893735 I | 2021/01/19 02:36:08 server.go:129: Serving console at http://localhost:9090
|
||||||
|
```
|
||||||
|
|
||||||
|
By default `console` runs on port `9090` this can be changed with `--port` of your choice.
|
||||||
|
|
||||||
|
## Start Console service with TLS:
|
||||||
|
|
||||||
|
Copy your `public.crt` and `private.key` to `~/.console/certs`, then:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./console server
|
||||||
|
2021-01-19 02:36:08.893735 I | 2021/01/19 02:36:08 server.go:129: Serving console at https://localhost:9090
|
||||||
|
```
|
||||||
|
|
||||||
|
For advanced users, `console` has support for multiple certificates to service clients through multiple domains.
|
||||||
|
|
||||||
|
Following tree structure is expected for supporting multiple domains:
|
||||||
|
```sh
|
||||||
|
certs/
|
||||||
|
│
|
||||||
|
├─ public.crt
|
||||||
|
├─ private.key
|
||||||
|
│
|
||||||
|
├─ example.com/
|
||||||
|
│ │
|
||||||
|
│ ├─ public.crt
|
||||||
|
│ └─ private.key
|
||||||
|
└─ foobar.org/
|
||||||
|
│
|
||||||
|
├─ public.crt
|
||||||
|
└─ private.key
|
||||||
|
...
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Connect Console to a Minio using TLS and a self-signed certificate
|
## Connect Console to a Minio using TLS and a self-signed certificate
|
||||||
|
|
||||||
|
Copy the MinIO `ca.crt` under `~/.console/certs/CAs`, then:
|
||||||
```
|
```
|
||||||
...
|
|
||||||
export CONSOLE_MINIO_SERVER_TLS_ROOT_CAS=<certificate_file_name>
|
|
||||||
export CONSOLE_MINIO_SERVER=https://localhost:9000
|
export CONSOLE_MINIO_SERVER=https://localhost:9000
|
||||||
./console server
|
./console server
|
||||||
```
|
```
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Kubernetes Cloud
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
// Copyright (c) 2019 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Kubernetes Cloud
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
// Copyright (c) 2019 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -31,7 +31,6 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
errCantDetermineMinIOImage = errors.New("can't determine MinIO Image")
|
errCantDetermineMinIOImage = errors.New("can't determine MinIO Image")
|
||||||
errCantDetermineMCImage = errors.New("can't determine MC Image")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetK8sAPIServer() string {
|
func GetK8sAPIServer() string {
|
||||||
@@ -64,13 +63,8 @@ func GetNsFromFile() string {
|
|||||||
return string(dat)
|
return string(dat)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This operation will run only once at console startup
|
// Namespace will run only once at console startup
|
||||||
var namespace = GetNsFromFile()
|
var Namespace = GetNsFromFile()
|
||||||
|
|
||||||
// Returns the namespace in which the controller is installed
|
|
||||||
func GetNs() string {
|
|
||||||
return env.Get(ConsoleNamespace, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
// getLatestMinIOImage returns the latest docker image for MinIO if found on the internet
|
// getLatestMinIOImage returns the latest docker image for MinIO if found on the internet
|
||||||
func getLatestMinIOImage(client HTTPClientI) (*string, error) {
|
func getLatestMinIOImage(client HTTPClientI) (*string, error) {
|
||||||
@@ -125,44 +119,3 @@ func GetLatestMinioImage(client HTTPClientI) (*string, error) {
|
|||||||
}
|
}
|
||||||
return latestMinIOImage, nil
|
return latestMinIOImage, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// getLatestMCImage returns the latest docker image for MC if found on the internet
|
|
||||||
func getLatestMCImage() (*string, error) {
|
|
||||||
// Create an http client with a 4 second timeout
|
|
||||||
client := http.Client{
|
|
||||||
Timeout: 4 * time.Second,
|
|
||||||
}
|
|
||||||
resp, err := client.Get("https://dl.min.io/client/mc/release/linux-amd64/")
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
var re = regexp.MustCompile(`(?m)\.\/mc\.(RELEASE.*?Z)"`)
|
|
||||||
// look for a single match
|
|
||||||
matches := re.FindAllStringSubmatch(string(body), 1)
|
|
||||||
for i := range matches {
|
|
||||||
release := matches[i][1]
|
|
||||||
dockerImage := fmt.Sprintf("minio/mc:%s", release)
|
|
||||||
return &dockerImage, nil
|
|
||||||
}
|
|
||||||
return nil, errCantDetermineMCImage
|
|
||||||
}
|
|
||||||
|
|
||||||
var latestMCImage, errLatestMCImage = getLatestMCImage()
|
|
||||||
|
|
||||||
func GetMCImage() (*string, error) {
|
|
||||||
image := strings.TrimSpace(env.Get(ConsoleMCImage, ""))
|
|
||||||
// if there is a preferred image configured by the user we'll always return that
|
|
||||||
if image != "" {
|
|
||||||
return &image, nil
|
|
||||||
}
|
|
||||||
if errLatestMCImage != nil {
|
|
||||||
return nil, errLatestMCImage
|
|
||||||
}
|
|
||||||
return latestMCImage, nil
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Kubernetes Cloud
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
// Copyright (c) 2019 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -21,5 +21,4 @@ const (
|
|||||||
ConsoleK8SAPIServerTLSRootCA = "CONSOLE_K8S_API_SERVER_TLS_ROOT_CA"
|
ConsoleK8SAPIServerTLSRootCA = "CONSOLE_K8S_API_SERVER_TLS_ROOT_CA"
|
||||||
ConsoleMinioImage = "CONSOLE_MINIO_IMAGE"
|
ConsoleMinioImage = "CONSOLE_MINIO_IMAGE"
|
||||||
ConsoleMCImage = "CONSOLE_MC_IMAGE"
|
ConsoleMCImage = "CONSOLE_MC_IMAGE"
|
||||||
ConsoleNamespace = "CONSOLE_NAMESPACE"
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Kubernetes Cloud
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
package cluster
|
package cluster
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -25,6 +26,8 @@ import (
|
|||||||
// that are used within this project.
|
// that are used within this project.
|
||||||
type HTTPClientI interface {
|
type HTTPClientI interface {
|
||||||
Get(url string) (resp *http.Response, err error)
|
Get(url string) (resp *http.Response, err error)
|
||||||
|
Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
|
||||||
|
Do(req *http.Request) (*http.Response, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTPClient Interface implementation
|
// HTTPClient Interface implementation
|
||||||
@@ -38,3 +41,13 @@ type HTTPClient struct {
|
|||||||
func (c *HTTPClient) Get(url string) (resp *http.Response, err error) {
|
func (c *HTTPClient) Get(url string) (resp *http.Response, err error) {
|
||||||
return c.Client.Get(url)
|
return c.Client.Get(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Post implements http.Client.Post()
|
||||||
|
func (c *HTTPClient) Post(url, contentType string, body io.Reader) (resp *http.Response, err error) {
|
||||||
|
return c.Client.Post(url, contentType, body)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do implements http.Client.Do()
|
||||||
|
func (c *HTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||||
|
return c.Client.Do(req)
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -106,7 +106,7 @@ func newApp(name string) *cli.App {
|
|||||||
app.Author = "MinIO, Inc."
|
app.Author = "MinIO, Inc."
|
||||||
app.Usage = "MinIO Console Server"
|
app.Usage = "MinIO Console Server"
|
||||||
app.Description = `MinIO Console Server`
|
app.Description = `MinIO Console Server`
|
||||||
app.Copyright = "(c) 2020 MinIO, Inc."
|
app.Copyright = "(c) 2021 MinIO, Inc."
|
||||||
app.Compiled, _ = time.Parse(time.RFC3339, pkg.ReleaseTime)
|
app.Compiled, _ = time.Parse(time.RFC3339, pkg.ReleaseTime)
|
||||||
app.Commands = commands
|
app.Commands = commands
|
||||||
app.HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.
|
app.HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -20,10 +20,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/go-openapi/loads"
|
"github.com/go-openapi/loads"
|
||||||
"github.com/jessevdk/go-flags"
|
"github.com/jessevdk/go-flags"
|
||||||
"github.com/minio/cli"
|
"github.com/minio/cli"
|
||||||
|
"github.com/minio/console/pkg/certs"
|
||||||
"github.com/minio/console/restapi"
|
"github.com/minio/console/restapi"
|
||||||
"github.com/minio/console/restapi/operations"
|
"github.com/minio/console/restapi/operations"
|
||||||
)
|
)
|
||||||
@@ -56,14 +58,9 @@ var serverCmd = cli.Command{
|
|||||||
Usage: "HTTPS server port",
|
Usage: "HTTPS server port",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tls-certificate",
|
Name: "certs-dir",
|
||||||
Value: "",
|
Value: certs.GlobalCertsCADir.Get(),
|
||||||
Usage: "filename of public cert",
|
Usage: "path to certs directory",
|
||||||
},
|
|
||||||
cli.StringFlag{
|
|
||||||
Name: "tls-key",
|
|
||||||
Value: "",
|
|
||||||
Usage: "filename of private key",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -82,7 +79,9 @@ func startServer(ctx *cli.Context) error {
|
|||||||
parser := flags.NewParser(server, flags.Default)
|
parser := flags.NewParser(server, flags.Default)
|
||||||
parser.ShortDescription = "MinIO Console Server"
|
parser.ShortDescription = "MinIO Console Server"
|
||||||
parser.LongDescription = swaggerSpec.Spec().Info.Description
|
parser.LongDescription = swaggerSpec.Spec().Info.Description
|
||||||
|
|
||||||
server.ConfigureFlags()
|
server.ConfigureFlags()
|
||||||
|
|
||||||
for _, optsGroup := range api.CommandLineOptionsGroups {
|
for _, optsGroup := range api.CommandLineOptionsGroups {
|
||||||
_, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options)
|
_, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -106,12 +105,18 @@ func startServer(ctx *cli.Context) error {
|
|||||||
restapi.Hostname = ctx.String("host")
|
restapi.Hostname = ctx.String("host")
|
||||||
restapi.Port = fmt.Sprintf("%v", ctx.Int("port"))
|
restapi.Port = fmt.Sprintf("%v", ctx.Int("port"))
|
||||||
|
|
||||||
tlsCertificatePath := ctx.String("tls-certificate")
|
// Set all certs and CAs directories path
|
||||||
tlsCertificateKeyPath := ctx.String("tls-key")
|
certs.GlobalCertsDir, _ = certs.NewConfigDirFromCtx(ctx, "certs-dir", certs.DefaultCertsDir.Get)
|
||||||
|
certs.GlobalCertsCADir = &certs.ConfigDir{Path: filepath.Join(certs.GlobalCertsDir.Get(), certs.CertsCADir)}
|
||||||
|
|
||||||
if tlsCertificatePath != "" && tlsCertificateKeyPath != "" {
|
// check if certs and CAs directories exists or can be created
|
||||||
server.TLSCertificate = flags.Filename(tlsCertificatePath)
|
if err := certs.MkdirAllIgnorePerm(certs.GlobalCertsCADir.Get()); err != nil {
|
||||||
server.TLSCertificateKey = flags.Filename(tlsCertificateKeyPath)
|
log.Println(fmt.Sprintf("Unable to create certs CA directory at %s", certs.GlobalCertsCADir.Get()))
|
||||||
|
}
|
||||||
|
// load the certificates and the CAs
|
||||||
|
restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager = certs.GetAllCertificatesAndCAs()
|
||||||
|
|
||||||
|
if len(restapi.GlobalPublicCerts) > 0 {
|
||||||
// If TLS certificates are provided enforce the HTTPS schema, meaning console will redirect
|
// If TLS certificates are provided enforce the HTTPS schema, meaning console will redirect
|
||||||
// plain HTTP connections to HTTPS server
|
// plain HTTP connections to HTTPS server
|
||||||
server.EnabledListeners = []string{"http", "https"}
|
server.EnabledListeners = []string{"http", "https"}
|
||||||
|
|||||||
34
cross-compile.sh
Executable file
34
cross-compile.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
# Enable tracing if set.
|
||||||
|
[ -n "$BASH_XTRACEFD" ] && set -x
|
||||||
|
|
||||||
|
_init() {
|
||||||
|
## All binaries are static make sure to disable CGO.
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
|
||||||
|
## List of architectures and OS to test coss compilation.
|
||||||
|
SUPPORTED_OSARCH="linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64"
|
||||||
|
}
|
||||||
|
|
||||||
|
_build() {
|
||||||
|
local osarch=$1
|
||||||
|
IFS=/ read -r -a arr <<<"$osarch"
|
||||||
|
os="${arr[0]}"
|
||||||
|
arch="${arr[1]}"
|
||||||
|
package=$(go list -f '{{.ImportPath}}' ./cmd/console)
|
||||||
|
printf -- "--> %15s:%s\n" "${osarch}" "${package}"
|
||||||
|
|
||||||
|
# go build -trimpath to build the binary.
|
||||||
|
GOOS=$os GOARCH=$arch GO111MODULE=on go build -trimpath --tags=kqueue --ldflags "-s -w" -o /dev/null ./cmd/console
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
echo "Testing builds for OS/Arch: ${SUPPORTED_OSARCH}"
|
||||||
|
for each_osarch in ${SUPPORTED_OSARCH}; do
|
||||||
|
_build "${each_osarch}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_init && main "$@"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
`Console` will authenticate against `Kubernetes`using bearer tokens via HTTP `Authorization` header. The user will provide this token once
|
`Console` will authenticate against `Kubernetes`using bearer tokens via HTTP `Authorization` header. The user will provide this token once
|
||||||
in the login form, Console will validate it against Kubernetes (list apis) and if valid will generate and return a new Console sessions
|
in the login form, Console will validate it against Kubernetes (list apis) and if valid will generate and return a new Console sessions
|
||||||
with encrypted claims (the user Service account token will be inside the JWT in the data field)
|
with encrypted claims (the user Service account token will be inside the session encrypted token
|
||||||
|
|
||||||
# Kubernetes
|
# Kubernetes
|
||||||
|
|
||||||
|
|||||||
35
docs/ldap/billy.ldif
Normal file
35
docs/ldap/billy.ldif
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# LDIF fragment to create group branch under root
|
||||||
|
dn: uid=billy,dc=example,dc=org
|
||||||
|
uid: billy
|
||||||
|
cn: billy
|
||||||
|
sn: 3
|
||||||
|
objectClass: top
|
||||||
|
objectClass: posixAccount
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
loginShell: /bin/bash
|
||||||
|
homeDirectory: /home/billy
|
||||||
|
uidNumber: 14583102
|
||||||
|
gidNumber: 14564100
|
||||||
|
userPassword: {SSHA}j3lBh1Seqe4rqF1+NuWmjhvtAni1JC5A
|
||||||
|
mail: billy@example.org
|
||||||
|
gecos: Billy User
|
||||||
|
|
||||||
|
# Create base group
|
||||||
|
dn: ou=groups,dc=example,dc=org
|
||||||
|
objectclass:organizationalunit
|
||||||
|
ou: groups
|
||||||
|
description: generic groups branch
|
||||||
|
|
||||||
|
# create consoleAdmin group (this already exists on minio and have a policy of s3::*)
|
||||||
|
dn: cn=consoleAdmin,ou=groups,dc=example,dc=org
|
||||||
|
objectClass: top
|
||||||
|
objectClass: posixGroup
|
||||||
|
gidNumber: 678
|
||||||
|
|
||||||
|
# Assing group to new user
|
||||||
|
dn: cn=consoleAdmin,ou=groups,dc=example,dc=org
|
||||||
|
changetype: modify
|
||||||
|
add: memberuid
|
||||||
|
memberuid: billy
|
||||||
|
|
||||||
|
|
||||||
20
go.mod
20
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module github.com/minio/console
|
module github.com/minio/console
|
||||||
|
|
||||||
go 1.13
|
go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/coreos/go-oidc v2.2.1+incompatible
|
github.com/coreos/go-oidc v2.2.1+incompatible
|
||||||
@@ -16,19 +16,23 @@ require (
|
|||||||
github.com/jessevdk/go-flags v1.4.0
|
github.com/jessevdk/go-flags v1.4.0
|
||||||
github.com/minio/cli v1.22.0
|
github.com/minio/cli v1.22.0
|
||||||
github.com/minio/kes v0.11.0
|
github.com/minio/kes v0.11.0
|
||||||
github.com/minio/mc v0.0.0-20201001165056-7f2df96e4821
|
github.com/minio/mc v0.0.0-20201220181029-41c804b179de
|
||||||
github.com/minio/minio v0.0.0-20200927172404-27d9bd04e544
|
github.com/minio/minio v0.0.0-20201221162327-6df6ac0f3410
|
||||||
github.com/minio/minio-go/v7 v7.0.6-0.20200923173112-bc846cb9b089
|
github.com/minio/minio-go/v7 v7.0.7-0.20201217170524-3baf9ea06f7c
|
||||||
github.com/minio/operator v0.0.0-20200930213302-ab2bbdfae96c
|
github.com/minio/operator v0.0.0-20201204220226-9901d1d0766c
|
||||||
|
github.com/minio/operator/logsearchapi v0.0.0-20201217190212-bf6546b09012
|
||||||
|
github.com/mitchellh/go-homedir v1.1.0
|
||||||
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
||||||
github.com/secure-io/sio-go v0.3.1
|
github.com/secure-io/sio-go v0.3.1
|
||||||
github.com/stretchr/testify v1.6.1
|
github.com/stretchr/testify v1.6.1
|
||||||
github.com/unrolled/secure v1.0.7
|
github.com/unrolled/secure v1.0.7
|
||||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
|
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
|
||||||
golang.org/x/net v0.0.0-20200904194848-62affa334b73
|
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
||||||
gopkg.in/yaml.v2 v2.3.0
|
gopkg.in/yaml.v2 v2.3.0
|
||||||
k8s.io/api v0.18.6
|
k8s.io/api v0.18.6
|
||||||
k8s.io/apimachinery v0.18.6
|
k8s.io/apimachinery v0.18.8
|
||||||
k8s.io/client-go v0.18.6
|
k8s.io/client-go v0.18.6
|
||||||
)
|
)
|
||||||
|
|
||||||
|
replace github.com/minio/operator v0.0.0-20201204220226-9901d1d0766c => github.com/dvaldivia/operator v0.0.0-20201230052356-04efc0ea5890
|
||||||
|
|||||||
BIN
images/pic1.png
BIN
images/pic1.png
Binary file not shown.
|
Before Width: | Height: | Size: 635 KiB After Width: | Height: | Size: 1.9 MiB |
BIN
images/pic2.png
BIN
images/pic2.png
Binary file not shown.
|
Before Width: | Height: | Size: 688 KiB After Width: | Height: | Size: 1.6 MiB |
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.4.1
|
image: minio/console:v0.5.2
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
args:
|
args:
|
||||||
- server
|
- server
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.4.1
|
image: minio/console:v0.5.2
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
env:
|
env:
|
||||||
- name: CONSOLE_OPERATOR_MODE
|
- name: CONSOLE_OPERATOR_MODE
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ resources:
|
|||||||
- console-configmap.yaml
|
- console-configmap.yaml
|
||||||
- console-service.yaml
|
- console-service.yaml
|
||||||
- console-deployment.yaml
|
- console-deployment.yaml
|
||||||
- https://github.com/minio/operator/?ref=v3.0.19
|
|
||||||
|
|||||||
9
k8s/operator-console/operator/kustomization.yaml
Normal file
9
k8s/operator-console/operator/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
# beginning of customizations
|
||||||
|
#namespace: min-ns
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- https://github.com/minio/operator/?ref=v3.0.29
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file is part of MinIO Kubernetes Cloud
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
// Copyright (c) 2019 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
98
models/account_change_password_request.go
Normal file
98
models/account_change_password_request.go
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AccountChangePasswordRequest account change password request
|
||||||
|
//
|
||||||
|
// swagger:model accountChangePasswordRequest
|
||||||
|
type AccountChangePasswordRequest struct {
|
||||||
|
|
||||||
|
// current secret key
|
||||||
|
// Required: true
|
||||||
|
CurrentSecretKey *string `json:"current_secret_key"`
|
||||||
|
|
||||||
|
// new secret key
|
||||||
|
// Required: true
|
||||||
|
NewSecretKey *string `json:"new_secret_key"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this account change password request
|
||||||
|
func (m *AccountChangePasswordRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateCurrentSecretKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateNewSecretKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AccountChangePasswordRequest) validateCurrentSecretKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("current_secret_key", "body", m.CurrentSecretKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AccountChangePasswordRequest) validateNewSecretKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("new_secret_key", "body", m.NewSecretKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *AccountChangePasswordRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *AccountChangePasswordRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res AccountChangePasswordRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -23,6 +23,9 @@ package models
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
"github.com/go-openapi/swag"
|
"github.com/go-openapi/swag"
|
||||||
)
|
)
|
||||||
@@ -40,10 +43,47 @@ type AdminInfoResponse struct {
|
|||||||
|
|
||||||
// usage
|
// usage
|
||||||
Usage int64 `json:"usage,omitempty"`
|
Usage int64 `json:"usage,omitempty"`
|
||||||
|
|
||||||
|
// widgets
|
||||||
|
Widgets []*Widget `json:"widgets"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this admin info response
|
// Validate validates this admin info response
|
||||||
func (m *AdminInfoResponse) Validate(formats strfmt.Registry) error {
|
func (m *AdminInfoResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateWidgets(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AdminInfoResponse) validateWidgets(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Widgets) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Widgets); i++ {
|
||||||
|
if swag.IsZero(m.Widgets[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Widgets[i] != nil {
|
||||||
|
if err := m.Widgets[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("widgets" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
63
models/bucket_encryption_info.go
Normal file
63
models/bucket_encryption_info.go
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BucketEncryptionInfo bucket encryption info
|
||||||
|
//
|
||||||
|
// swagger:model bucketEncryptionInfo
|
||||||
|
type BucketEncryptionInfo struct {
|
||||||
|
|
||||||
|
// algorithm
|
||||||
|
Algorithm string `json:"algorithm,omitempty"`
|
||||||
|
|
||||||
|
// kms master key ID
|
||||||
|
KmsMasterKeyID string `json:"kmsMasterKeyID,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this bucket encryption info
|
||||||
|
func (m *BucketEncryptionInfo) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *BucketEncryptionInfo) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *BucketEncryptionInfo) UnmarshalBinary(b []byte) error {
|
||||||
|
var res BucketEncryptionInfo
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
89
models/bucket_encryption_request.go
Normal file
89
models/bucket_encryption_request.go
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BucketEncryptionRequest bucket encryption request
|
||||||
|
//
|
||||||
|
// swagger:model bucketEncryptionRequest
|
||||||
|
type BucketEncryptionRequest struct {
|
||||||
|
|
||||||
|
// enc type
|
||||||
|
EncType BucketEncryptionType `json:"encType,omitempty"`
|
||||||
|
|
||||||
|
// kms key ID
|
||||||
|
KmsKeyID string `json:"kmsKeyID,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this bucket encryption request
|
||||||
|
func (m *BucketEncryptionRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateEncType(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BucketEncryptionRequest) validateEncType(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.EncType) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.EncType.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("encType")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *BucketEncryptionRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *BucketEncryptionRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res BucketEncryptionRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
80
models/bucket_encryption_type.go
Normal file
80
models/bucket_encryption_type.go
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BucketEncryptionType bucket encryption type
|
||||||
|
//
|
||||||
|
// swagger:model bucketEncryptionType
|
||||||
|
type BucketEncryptionType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// BucketEncryptionTypeSseS3 captures enum value "sse-s3"
|
||||||
|
BucketEncryptionTypeSseS3 BucketEncryptionType = "sse-s3"
|
||||||
|
|
||||||
|
// BucketEncryptionTypeSseKms captures enum value "sse-kms"
|
||||||
|
BucketEncryptionTypeSseKms BucketEncryptionType = "sse-kms"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var bucketEncryptionTypeEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []BucketEncryptionType
|
||||||
|
if err := json.Unmarshal([]byte(`["sse-s3","sse-kms"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
bucketEncryptionTypeEnum = append(bucketEncryptionTypeEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m BucketEncryptionType) validateBucketEncryptionTypeEnum(path, location string, value BucketEncryptionType) error {
|
||||||
|
if err := validate.EnumCase(path, location, value, bucketEncryptionTypeEnum, true); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this bucket encryption type
|
||||||
|
func (m BucketEncryptionType) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateBucketEncryptionTypeEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -65,6 +65,9 @@ type BucketObject struct {
|
|||||||
// size
|
// size
|
||||||
Size int64 `json:"size,omitempty"`
|
Size int64 `json:"size,omitempty"`
|
||||||
|
|
||||||
|
// tags
|
||||||
|
Tags map[string]string `json:"tags,omitempty"`
|
||||||
|
|
||||||
// user tags
|
// user tags
|
||||||
UserTags map[string]string `json:"user_tags,omitempty"`
|
UserTags map[string]string `json:"user_tags,omitempty"`
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -63,6 +63,12 @@ type CreateTenantRequest struct {
|
|||||||
// erasure coding parity
|
// erasure coding parity
|
||||||
ErasureCodingParity int64 `json:"erasureCodingParity,omitempty"`
|
ErasureCodingParity int64 `json:"erasureCodingParity,omitempty"`
|
||||||
|
|
||||||
|
// expose console
|
||||||
|
ExposeConsole bool `json:"expose_console,omitempty"`
|
||||||
|
|
||||||
|
// expose minio
|
||||||
|
ExposeMinio bool `json:"expose_minio,omitempty"`
|
||||||
|
|
||||||
// idp
|
// idp
|
||||||
Idp *IdpConfiguration `json:"idp,omitempty"`
|
Idp *IdpConfiguration `json:"idp,omitempty"`
|
||||||
|
|
||||||
@@ -90,18 +96,15 @@ type CreateTenantRequest struct {
|
|||||||
// Required: true
|
// Required: true
|
||||||
Namespace *string `json:"namespace"`
|
Namespace *string `json:"namespace"`
|
||||||
|
|
||||||
|
// pools
|
||||||
|
// Required: true
|
||||||
|
Pools []*Pool `json:"pools"`
|
||||||
|
|
||||||
// secret key
|
// secret key
|
||||||
SecretKey string `json:"secret_key,omitempty"`
|
SecretKey string `json:"secret_key,omitempty"`
|
||||||
|
|
||||||
// service name
|
|
||||||
ServiceName string `json:"service_name,omitempty"`
|
|
||||||
|
|
||||||
// tls
|
// tls
|
||||||
TLS *TLSConfiguration `json:"tls,omitempty"`
|
TLS *TLSConfiguration `json:"tls,omitempty"`
|
||||||
|
|
||||||
// zones
|
|
||||||
// Required: true
|
|
||||||
Zones []*Zone `json:"zones"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this create tenant request
|
// Validate validates this create tenant request
|
||||||
@@ -132,11 +135,11 @@ func (m *CreateTenantRequest) Validate(formats strfmt.Registry) error {
|
|||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := m.validateTLS(formats); err != nil {
|
if err := m.validatePools(formats); err != nil {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := m.validateZones(formats); err != nil {
|
if err := m.validateTLS(formats); err != nil {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,6 +243,31 @@ func (m *CreateTenantRequest) validateNamespace(formats strfmt.Registry) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *CreateTenantRequest) validatePools(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("pools", "body", m.Pools); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Pools); i++ {
|
||||||
|
if swag.IsZero(m.Pools[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Pools[i] != nil {
|
||||||
|
if err := m.Pools[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("pools" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (m *CreateTenantRequest) validateTLS(formats strfmt.Registry) error {
|
func (m *CreateTenantRequest) validateTLS(formats strfmt.Registry) error {
|
||||||
|
|
||||||
if swag.IsZero(m.TLS) { // not required
|
if swag.IsZero(m.TLS) { // not required
|
||||||
@@ -258,31 +286,6 @@ func (m *CreateTenantRequest) validateTLS(formats strfmt.Registry) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *CreateTenantRequest) validateZones(formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := validate.Required("zones", "body", m.Zones); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Zones); i++ {
|
|
||||||
if swag.IsZero(m.Zones[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Zones[i] != nil {
|
|
||||||
if err := m.Zones[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("zones" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
// MarshalBinary interface implementation
|
||||||
func (m *CreateTenantRequest) MarshalBinary() ([]byte, error) {
|
func (m *CreateTenantRequest) MarshalBinary() ([]byte, error) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -33,14 +33,8 @@ import (
|
|||||||
// swagger:model createTenantResponse
|
// swagger:model createTenantResponse
|
||||||
type CreateTenantResponse struct {
|
type CreateTenantResponse struct {
|
||||||
|
|
||||||
// access key
|
|
||||||
AccessKey string `json:"access_key,omitempty"`
|
|
||||||
|
|
||||||
// console
|
// console
|
||||||
Console *CreateTenantResponseConsole `json:"console,omitempty"`
|
Console *CreateTenantResponseConsole `json:"console,omitempty"`
|
||||||
|
|
||||||
// secret key
|
|
||||||
SecretKey string `json:"secret_key,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this create tenant response
|
// Validate validates this create tenant response
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
112
models/get_bucket_retention_config.go
Normal file
112
models/get_bucket_retention_config.go
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetBucketRetentionConfig get bucket retention config
|
||||||
|
//
|
||||||
|
// swagger:model getBucketRetentionConfig
|
||||||
|
type GetBucketRetentionConfig struct {
|
||||||
|
|
||||||
|
// mode
|
||||||
|
Mode ObjectRetentionMode `json:"mode,omitempty"`
|
||||||
|
|
||||||
|
// unit
|
||||||
|
Unit ObjectRetentionUnit `json:"unit,omitempty"`
|
||||||
|
|
||||||
|
// validity
|
||||||
|
Validity int32 `json:"validity,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this get bucket retention config
|
||||||
|
func (m *GetBucketRetentionConfig) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateMode(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateUnit(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetBucketRetentionConfig) validateMode(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Mode) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.Mode.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("mode")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetBucketRetentionConfig) validateUnit(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Unit) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.Unit.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("unit")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *GetBucketRetentionConfig) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *GetBucketRetentionConfig) UnmarshalBinary(b []byte) error {
|
||||||
|
var res GetBucketRetentionConfig
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
48
models/iam_entity.go
Normal file
48
models/iam_entity.go
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IamEntity iam entity
|
||||||
|
//
|
||||||
|
// swagger:model iamEntity
|
||||||
|
type IamEntity string
|
||||||
|
|
||||||
|
// Validate validates this iam entity
|
||||||
|
func (m IamEntity) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := validate.Pattern("", "body", string(m), `^[\w+=,.@-]{1,64}$`); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
75
models/license.go
Normal file
75
models/license.go
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// License license
|
||||||
|
//
|
||||||
|
// swagger:model license
|
||||||
|
type License struct {
|
||||||
|
|
||||||
|
// account id
|
||||||
|
AccountID int64 `json:"account_id,omitempty"`
|
||||||
|
|
||||||
|
// email
|
||||||
|
Email string `json:"email,omitempty"`
|
||||||
|
|
||||||
|
// expires at
|
||||||
|
ExpiresAt string `json:"expires_at,omitempty"`
|
||||||
|
|
||||||
|
// organization
|
||||||
|
Organization string `json:"organization,omitempty"`
|
||||||
|
|
||||||
|
// plan
|
||||||
|
Plan string `json:"plan,omitempty"`
|
||||||
|
|
||||||
|
// storage capacity
|
||||||
|
StorageCapacity int64 `json:"storage_capacity,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this license
|
||||||
|
func (m *License) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *License) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *License) UnmarshalBinary(b []byte) error {
|
||||||
|
var res License
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
60
models/log_search_response.go
Normal file
60
models/log_search_response.go
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LogSearchResponse log search response
|
||||||
|
//
|
||||||
|
// swagger:model logSearchResponse
|
||||||
|
type LogSearchResponse struct {
|
||||||
|
|
||||||
|
// list of log search responses
|
||||||
|
Results interface{} `json:"results,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this log search response
|
||||||
|
func (m *LogSearchResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *LogSearchResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *LogSearchResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res LogSearchResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -41,6 +41,9 @@ type MakeBucketRequest struct {
|
|||||||
// quota
|
// quota
|
||||||
Quota *SetBucketQuota `json:"quota,omitempty"`
|
Quota *SetBucketQuota `json:"quota,omitempty"`
|
||||||
|
|
||||||
|
// retention
|
||||||
|
Retention *PutBucketRetentionRequest `json:"retention,omitempty"`
|
||||||
|
|
||||||
// versioning
|
// versioning
|
||||||
Versioning bool `json:"versioning,omitempty"`
|
Versioning bool `json:"versioning,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -57,6 +60,10 @@ func (m *MakeBucketRequest) Validate(formats strfmt.Registry) error {
|
|||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := m.validateRetention(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
if len(res) > 0 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
@@ -90,6 +97,24 @@ func (m *MakeBucketRequest) validateQuota(formats strfmt.Registry) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *MakeBucketRequest) validateRetention(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Retention) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Retention != nil {
|
||||||
|
if err := m.Retention.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("retention")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
// MarshalBinary interface implementation
|
||||||
func (m *MakeBucketRequest) MarshalBinary() ([]byte, error) {
|
func (m *MakeBucketRequest) MarshalBinary() ([]byte, error) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
// This file is part of MinIO Console Server
|
||||||
// Copyright (c) 2020 MinIO, Inc.
|
// Copyright (c) 2021 MinIO, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|||||||
80
models/object_legal_hold_status.go
Normal file
80
models/object_legal_hold_status.go
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ObjectLegalHoldStatus object legal hold status
|
||||||
|
//
|
||||||
|
// swagger:model objectLegalHoldStatus
|
||||||
|
type ObjectLegalHoldStatus string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// ObjectLegalHoldStatusEnabled captures enum value "enabled"
|
||||||
|
ObjectLegalHoldStatusEnabled ObjectLegalHoldStatus = "enabled"
|
||||||
|
|
||||||
|
// ObjectLegalHoldStatusDisabled captures enum value "disabled"
|
||||||
|
ObjectLegalHoldStatusDisabled ObjectLegalHoldStatus = "disabled"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var objectLegalHoldStatusEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []ObjectLegalHoldStatus
|
||||||
|
if err := json.Unmarshal([]byte(`["enabled","disabled"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
objectLegalHoldStatusEnum = append(objectLegalHoldStatusEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ObjectLegalHoldStatus) validateObjectLegalHoldStatusEnum(path, location string, value ObjectLegalHoldStatus) error {
|
||||||
|
if err := validate.EnumCase(path, location, value, objectLegalHoldStatusEnum, true); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this object legal hold status
|
||||||
|
func (m ObjectLegalHoldStatus) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateObjectLegalHoldStatusEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
80
models/object_retention_mode.go
Normal file
80
models/object_retention_mode.go
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ObjectRetentionMode object retention mode
|
||||||
|
//
|
||||||
|
// swagger:model objectRetentionMode
|
||||||
|
type ObjectRetentionMode string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// ObjectRetentionModeGovernance captures enum value "governance"
|
||||||
|
ObjectRetentionModeGovernance ObjectRetentionMode = "governance"
|
||||||
|
|
||||||
|
// ObjectRetentionModeCompliance captures enum value "compliance"
|
||||||
|
ObjectRetentionModeCompliance ObjectRetentionMode = "compliance"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var objectRetentionModeEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []ObjectRetentionMode
|
||||||
|
if err := json.Unmarshal([]byte(`["governance","compliance"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
objectRetentionModeEnum = append(objectRetentionModeEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ObjectRetentionMode) validateObjectRetentionModeEnum(path, location string, value ObjectRetentionMode) error {
|
||||||
|
if err := validate.EnumCase(path, location, value, objectRetentionModeEnum, true); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this object retention mode
|
||||||
|
func (m ObjectRetentionMode) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateObjectRetentionModeEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
80
models/object_retention_unit.go
Normal file
80
models/object_retention_unit.go
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2021 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 (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ObjectRetentionUnit object retention unit
|
||||||
|
//
|
||||||
|
// swagger:model objectRetentionUnit
|
||||||
|
type ObjectRetentionUnit string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// ObjectRetentionUnitDays captures enum value "days"
|
||||||
|
ObjectRetentionUnitDays ObjectRetentionUnit = "days"
|
||||||
|
|
||||||
|
// ObjectRetentionUnitYears captures enum value "years"
|
||||||
|
ObjectRetentionUnitYears ObjectRetentionUnit = "years"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var objectRetentionUnitEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []ObjectRetentionUnit
|
||||||
|
if err := json.Unmarshal([]byte(`["days","years"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
objectRetentionUnitEnum = append(objectRetentionUnitEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m ObjectRetentionUnit) validateObjectRetentionUnitEnum(path, location string, value ObjectRetentionUnit) error {
|
||||||
|
if err := validate.EnumCase(path, location, value, objectRetentionUnitEnum, true); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this object retention unit
|
||||||
|
func (m ObjectRetentionUnit) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateObjectRetentionUnitEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user