Intial Commit Migrating from github.com/minio/m3
21
.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# Test binary, build with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
.idea/
|
||||||
|
vendor/
|
||||||
|
|
||||||
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
|
*.out
|
||||||
|
|
||||||
|
# Ignore executables
|
||||||
|
target/
|
||||||
|
mcs-server
|
||||||
14
Makefile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
default: mcs
|
||||||
|
|
||||||
|
.PHONY: mcs
|
||||||
|
mcs:
|
||||||
|
@echo "Building mcs binary to './mcs'"
|
||||||
|
@(cd cmd/mcs-server; CGO_ENABLED=0 go build --ldflags "-s -w" -o ../../mcs-server)
|
||||||
|
|
||||||
|
swagger-gen:
|
||||||
|
@echo "Generating swagger server code from yaml"
|
||||||
|
@swagger generate server -A mcs -f ./swagger.yml -r minio_copyright.txt
|
||||||
|
|
||||||
|
build:
|
||||||
|
@(cd portal-ui; yarn install; make build; cd ..)
|
||||||
|
@(cd cmd/mcs-server; CGO_ENABLED=0 go build --ldflags "-s -w" -o ../../mcs-server)
|
||||||
92
README.md
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# MCS Minio Console Service
|
||||||
|
|
||||||
|
This is a REST portal server created using [go-swagger](https://github.com/go-swagger/go-swagger)
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
All `mcs` 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
|
||||||
|
|
||||||
|
1. Create a user for `mcs` using `mc`.
|
||||||
|
```
|
||||||
|
$ set +o history
|
||||||
|
$ mc admin user add myminio mcs YOURMCSSECRET
|
||||||
|
$ set -o history
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Create a policy for `mcs`
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat > mcsAdmin.json << EOF
|
||||||
|
{
|
||||||
|
"Version": "2012-10-17",
|
||||||
|
"Statement": [
|
||||||
|
{
|
||||||
|
"Action": [
|
||||||
|
"admin:*"
|
||||||
|
],
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Sid": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Action": [
|
||||||
|
"s3:*"
|
||||||
|
],
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Resource": [
|
||||||
|
"arn:aws:s3:::*"
|
||||||
|
],
|
||||||
|
"Sid": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
$ mc admin policy add myminio mcsAdmin mcsAdmin.json
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Set the policy for the new `mcs` user
|
||||||
|
|
||||||
|
```
|
||||||
|
$ mc admin policy set myminio mcsAdmin user=mcs
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run MCS server
|
||||||
|
To run the server:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ MCS_ACCESS_KEY=mcs \
|
||||||
|
MCS_SECRET_KEY=YOURMCSSECRET \
|
||||||
|
MCS_MINIO_SERVER=http://localhost:9000 \
|
||||||
|
./mcs-server --port=52300
|
||||||
|
```
|
||||||
|
You can verify that the apis work by doing the request on `localhost:52300/api/v1/...`
|
||||||
|
|
||||||
|
# Development
|
||||||
|
|
||||||
|
The API handlers are created using a YAML definition located in `swagger.YAML`.
|
||||||
|
|
||||||
|
To add new api, the YAML file needs to be updated with all the desired apis using the [Swagger Basic Structure](https://swagger.io/docs/specification/2-0/basic-structure/), this includes paths, parameters, definitions, tags, etc.
|
||||||
|
|
||||||
|
## Generate server from YAML
|
||||||
|
Once the YAML file is ready we can autogenerate the code needed for the new api by just running:
|
||||||
|
|
||||||
|
Validate it:
|
||||||
|
```
|
||||||
|
swagger validate ./swagger.yml
|
||||||
|
```
|
||||||
|
Update server code:
|
||||||
|
```
|
||||||
|
make swagger-gen
|
||||||
|
```
|
||||||
|
|
||||||
|
This will update all the necessary code.
|
||||||
|
|
||||||
|
`./restapi/configure_mcs.go` is a file that contains the handlers to be used by the application, here is the only place where we need to update our code to support the new apis. This file is not affected when running the swagger generator and it is safe to edit.
|
||||||
|
|
||||||
|
## Unit Tests
|
||||||
|
`./restapi/handlers_test.go` needs to be updated with the proper tests for the new api.
|
||||||
|
|
||||||
|
To run tests:
|
||||||
|
```
|
||||||
|
go test ./restapi
|
||||||
|
```
|
||||||
959
bindata_assetfs.go
Normal file
21
go.mod
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
module github.com/minio/m3/mcs
|
||||||
|
|
||||||
|
go 1.14
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/elazarl/go-bindata-assetfs v1.0.0
|
||||||
|
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
|
||||||
|
github.com/go-openapi/errors v0.19.4
|
||||||
|
github.com/go-openapi/loads v0.19.5
|
||||||
|
github.com/go-openapi/runtime v0.19.12
|
||||||
|
github.com/go-openapi/spec v0.19.7
|
||||||
|
github.com/go-openapi/strfmt v0.19.5
|
||||||
|
github.com/go-openapi/swag v0.19.8
|
||||||
|
github.com/go-openapi/validate v0.19.7
|
||||||
|
github.com/jessevdk/go-flags v1.4.0
|
||||||
|
github.com/minio/mc v0.0.0-20200401220942-e05f02d9f459
|
||||||
|
github.com/minio/minio v0.0.0-20200327214830-6f992134a25f
|
||||||
|
github.com/minio/minio-go/v6 v6.0.51-0.20200319192131-097caa7760c7
|
||||||
|
github.com/stretchr/testify v1.5.1
|
||||||
|
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
|
||||||
|
)
|
||||||
761
go.sum
Normal file
@@ -0,0 +1,761 @@
|
|||||||
|
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
|
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
|
cloud.google.com/go v0.39.0 h1:UgQP9na6OTfp4dsAiz/eFpFA1C6tPdH5wiRdi19tuMw=
|
||||||
|
cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts=
|
||||||
|
contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0=
|
||||||
|
git.apache.org/thrift.git v0.13.0 h1:/3bz5WZ+sqYArk7MBBBbDufMxKKOA56/6JO6psDpUDY=
|
||||||
|
git.apache.org/thrift.git v0.13.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||||
|
github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo=
|
||||||
|
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
|
||||||
|
github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o=
|
||||||
|
github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0=
|
||||||
|
github.com/Azure/go-autorest v11.7.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||||
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
|
github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||||
|
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||||
|
github.com/Shopify/sarama v1.24.1 h1:svn9vfN3R1Hz21WR2Gj0VW9ehaDGkiOS+VqlIcZOkMI=
|
||||||
|
github.com/Shopify/sarama v1.24.1/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU=
|
||||||
|
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||||
|
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
|
||||||
|
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||||
|
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
|
||||||
|
github.com/alecthomas/participle v0.2.1 h1:4AVLj1viSGa4LG5HDXKXrm5xRx19SB/rS/skPQB1Grw=
|
||||||
|
github.com/alecthomas/participle v0.2.1/go.mod h1:SW6HZGeZgSIpcUWX3fXpfZhuaWHnmoD5KCVaqSaNTkk=
|
||||||
|
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
|
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||||
|
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5 h1:nWDRPCyCltiTsANwC/n3QZH7Vww33Npq9MKqlwRzI/c=
|
||||||
|
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||||
|
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||||
|
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||||
|
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg=
|
||||||
|
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||||
|
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||||
|
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||||
|
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0=
|
||||||
|
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
|
||||||
|
github.com/aws/aws-sdk-go v1.20.21/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||||
|
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
|
||||||
|
github.com/bcicen/jstream v0.0.0-20190220045926-16c1f8af81c2 h1:M+TYzBcNIRyzPRg66ndEqUMd7oWDmhvdQmaPC6EZNwM=
|
||||||
|
github.com/bcicen/jstream v0.0.0-20190220045926-16c1f8af81c2/go.mod h1:RDu/qcrnpEdJC/p8tx34+YBFqqX71lB7dOX9QE+ZC4M=
|
||||||
|
github.com/beevik/ntp v0.2.0 h1:sGsd+kAXzT0bfVfzJfce04g+dSRfrs+tbQW8lweuYgw=
|
||||||
|
github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=
|
||||||
|
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
|
||||||
|
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||||
|
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||||
|
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||||
|
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
|
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||||
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
|
github.com/cheggaaa/pb v1.0.28 h1:kWGpdAcSp3MxMU9CCHOwz/8V0kCHN4+9yQm2MzWuI98=
|
||||||
|
github.com/cheggaaa/pb v1.0.28/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
|
||||||
|
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
||||||
|
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
||||||
|
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||||
|
github.com/coredns/coredns v1.4.0 h1:RubBkYmkByUqZWWkjRHvNLnUHgkRVqAWgSMmRFvpE1A=
|
||||||
|
github.com/coredns/coredns v1.4.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0=
|
||||||
|
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY=
|
||||||
|
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||||
|
github.com/coreos/etcd v3.3.12+incompatible h1:pAWNwdf7QiT1zfaWyqCtNZQWCLByQyA3JrSQyuYAqnQ=
|
||||||
|
github.com/coreos/etcd v3.3.12+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||||
|
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||||
|
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||||
|
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
|
||||||
|
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
|
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
|
||||||
|
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||||
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||||
|
github.com/djherbis/atime v1.0.0 h1:ySLvBAM0EvOGaX7TI4dAM5lWj+RdJUCKtGSEHN8SGBg=
|
||||||
|
github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8=
|
||||||
|
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||||
|
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
|
||||||
|
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||||
|
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||||
|
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||||
|
github.com/dvaldivia/mc v0.0.0-20191211172445-23aab5b458b6 h1:Qjnh4b3TMfpsRaDIZZiEHLCGHb6n4O46Yqi6Hoqe1I0=
|
||||||
|
github.com/dvaldivia/mc v0.0.0-20200330203654-e8aaf0b56ebd h1:9mDGANfXGr33Jl9NPOYDCfmvDi6okVYpP/H5OcodcKU=
|
||||||
|
github.com/dvaldivia/mc v0.0.0-20200330203654-e8aaf0b56ebd/go.mod h1:abtC7hZKoJk5ZBPY05fGjCILr+wr557+7c/SJ1s4olc=
|
||||||
|
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||||
|
github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
|
||||||
|
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||||
|
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=
|
||||||
|
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||||
|
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
|
||||||
|
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||||
|
github.com/eclipse/paho.mqtt.golang v1.2.0 h1:1F8mhG9+aO5/xpdtFkW4SxOJB67ukuDC3t2y2qayIX0=
|
||||||
|
github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts=
|
||||||
|
github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk=
|
||||||
|
github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
|
||||||
|
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
||||||
|
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||||
|
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||||
|
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||||
|
github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||||
|
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||||
|
github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ=
|
||||||
|
github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
|
||||||
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
|
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew=
|
||||||
|
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=
|
||||||
|
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||||
|
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||||
|
github.com/go-bindata/go-bindata v1.0.0 h1:DZ34txDXWn1DyWa+vQf7V9ANc2ILTtrEjtlsdJRF26M=
|
||||||
|
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
|
||||||
|
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
|
||||||
|
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||||
|
github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc=
|
||||||
|
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||||
|
github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
|
||||||
|
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||||
|
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
|
||||||
|
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||||
|
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||||
|
github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk=
|
||||||
|
github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk=
|
||||||
|
github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU=
|
||||||
|
github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE=
|
||||||
|
github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ=
|
||||||
|
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||||
|
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||||
|
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||||
|
github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||||
|
github.com/go-openapi/errors v0.19.4 h1:fSGwO1tSYHFu70NKaWJt5Qh0qoBRtCm/mXS1yhf+0W0=
|
||||||
|
github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||||
|
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||||
|
github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||||
|
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||||
|
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||||
|
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
||||||
|
github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=
|
||||||
|
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||||
|
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||||
|
github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||||
|
github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||||
|
github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs=
|
||||||
|
github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI=
|
||||||
|
github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk=
|
||||||
|
github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls=
|
||||||
|
github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY=
|
||||||
|
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
|
||||||
|
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
|
||||||
|
github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4=
|
||||||
|
github.com/go-openapi/runtime v0.19.12 h1:5lQlCr1HL0ZVRPL+0PHKhRpMCSPMV2qF842rhQx8CYY=
|
||||||
|
github.com/go-openapi/runtime v0.19.12/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo=
|
||||||
|
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||||
|
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||||
|
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
|
||||||
|
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
|
||||||
|
github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
|
||||||
|
github.com/go-openapi/spec v0.19.7 h1:0xWSeMd35y5avQAThZR2PkEuqSosoS5t6gDH4L8n11M=
|
||||||
|
github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
|
||||||
|
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||||
|
github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||||
|
github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY=
|
||||||
|
github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
|
||||||
|
github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
|
||||||
|
github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
|
||||||
|
github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM=
|
||||||
|
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
|
||||||
|
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||||
|
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||||
|
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
|
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
|
github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
|
||||||
|
github.com/go-openapi/swag v0.19.8 h1:vfK6jLhs7OI4tAXkvkooviaE1JEPcw3mutyegLHHjmk=
|
||||||
|
github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
|
||||||
|
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||||
|
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
|
||||||
|
github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo=
|
||||||
|
github.com/go-openapi/validate v0.19.7 h1:fR4tP2xc+25pdo5Qvv4v6g+5QKFgNg8nrifTE7V8ibA=
|
||||||
|
github.com/go-openapi/validate v0.19.7/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
|
||||||
|
github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
|
||||||
|
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||||
|
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||||
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||||
|
github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||||
|
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
|
||||||
|
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
|
||||||
|
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
|
||||||
|
github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
|
||||||
|
github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
|
||||||
|
github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs=
|
||||||
|
github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
|
||||||
|
github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
|
||||||
|
github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk=
|
||||||
|
github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28=
|
||||||
|
github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo=
|
||||||
|
github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk=
|
||||||
|
github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw=
|
||||||
|
github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360=
|
||||||
|
github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg=
|
||||||
|
github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE=
|
||||||
|
github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8=
|
||||||
|
github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||||
|
github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||||
|
github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
|
||||||
|
github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
|
||||||
|
github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ=
|
||||||
|
github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
|
||||||
|
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
|
||||||
|
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
|
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
|
||||||
|
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||||
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||||
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
|
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
|
github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw=
|
||||||
|
github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
|
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
|
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
|
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
|
||||||
|
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
|
||||||
|
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
|
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
|
||||||
|
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||||
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
|
||||||
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
|
||||||
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
|
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||||
|
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||||
|
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||||
|
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc=
|
||||||
|
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||||
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
|
github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f h1:4Gslotqbs16iAg+1KR/XdabIfq8TlAWHdwS5QJFksLc=
|
||||||
|
github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
|
github.com/gorilla/handlers v1.4.0 h1:XulKRWSQK5uChr4pEgSE4Tc/OcmnU9GJuSwdog/tZsA=
|
||||||
|
github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
|
||||||
|
github.com/gorilla/mux v1.7.0 h1:tOSd0UKHQd6urX6ApfOn4XdBMY6Sh1MfxV3kmaazO+U=
|
||||||
|
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||||
|
github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk=
|
||||||
|
github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ=
|
||||||
|
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
||||||
|
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.9.4 h1:5xLhQjsk4zqPf9EHCrja2qFZMx+yBqkO3XgJ14bNnU0=
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||||
|
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||||
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||||
|
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
|
||||||
|
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||||
|
github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||||
|
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||||
|
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||||
|
github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||||
|
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
|
||||||
|
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||||
|
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||||
|
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||||
|
github.com/hashicorp/go-retryablehttp v0.5.4 h1:1BZvpawXoJCWX6pNtow9+rpEj+3itIlutiqnntI6jOE=
|
||||||
|
github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||||
|
github.com/hashicorp/go-rootcerts v1.0.1 h1:DMo4fmknnz0E0evoNYnV48RjWndOsmd6OW+09R3cEP8=
|
||||||
|
github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||||
|
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=
|
||||||
|
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
|
||||||
|
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||||
|
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
|
||||||
|
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||||
|
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||||
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
|
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
|
||||||
|
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
|
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||||
|
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||||
|
github.com/hashicorp/raft v1.1.1-0.20190703171940-f639636d18e0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8=
|
||||||
|
github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk=
|
||||||
|
github.com/hashicorp/vault/api v1.0.4 h1:j08Or/wryXT4AcHj1oCbMd7IijXcKzYUGw59LGu9onU=
|
||||||
|
github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q=
|
||||||
|
github.com/hashicorp/vault/sdk v0.1.13 h1:mOEPeOhT7jl0J4AMl1E705+BcmeRs1VmKNb9F0sMLy8=
|
||||||
|
github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M=
|
||||||
|
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||||
|
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||||
|
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8=
|
||||||
|
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg=
|
||||||
|
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||||
|
github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 h1:FUwcHNlEqkqLjLBdCp5PRlCFijNjvcYANOZXzCfXwCM=
|
||||||
|
github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
|
||||||
|
github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
|
||||||
|
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
|
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||||
|
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||||
|
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
|
||||||
|
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||||
|
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||||
|
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
|
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||||
|
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||||
|
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||||
|
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
|
||||||
|
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
|
||||||
|
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||||
|
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||||
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
|
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||||
|
github.com/klauspost/compress v1.9.4/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||||
|
github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||||
|
github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
|
github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8=
|
||||||
|
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
|
github.com/klauspost/cpuid v1.2.2 h1:1xAgYebNnsb9LKCdLOvFWtAxGU/33mjJtyOVbmUa0Us=
|
||||||
|
github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||||
|
github.com/klauspost/pgzip v1.2.1 h1:oIPZROsWuPHpOdMVWLuJZXwgjhrW8r1yEX8UqMyeNHM=
|
||||||
|
github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||||
|
github.com/klauspost/readahead v1.3.1 h1:QqXNYvm+VvqYcbrRT4LojUciM0XrznFRIDrbHiJtu/0=
|
||||||
|
github.com/klauspost/readahead v1.3.1/go.mod h1:AH9juHzNH7xqdqFHrMRSHeH2Ps+vFf+kblDqzPFiLJg=
|
||||||
|
github.com/klauspost/reedsolomon v1.9.3 h1:N/VzgeMfHmLc+KHMD1UL/tNkfXAt8FnUqlgXGIduwAY=
|
||||||
|
github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4=
|
||||||
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
|
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
|
||||||
|
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
|
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||||
|
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||||
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
|
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||||
|
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
|
github.com/kurin/blazer v0.5.4-0.20190613185654-cf2f27cc0be3 h1:1sl2HmNtqGnDuydLgCJwZIpDLGqZOdwOkcY8WtUl8Cw=
|
||||||
|
github.com/kurin/blazer v0.5.4-0.20190613185654-cf2f27cc0be3/go.mod h1:4FCXMUWo9DllR2Do4TtBd377ezyAJ51vB5uTBjt0pGU=
|
||||||
|
github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
|
||||||
|
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
|
||||||
|
github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8=
|
||||||
|
github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
|
||||||
|
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||||
|
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||||
|
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||||
|
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
|
||||||
|
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||||
|
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
|
||||||
|
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||||
|
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||||
|
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb h1:hXqqXzQtJbENrsb+rsIqkVqcg4FUJL0SQFGw08Dgivw=
|
||||||
|
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||||
|
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
|
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
|
github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
|
||||||
|
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
|
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
|
||||||
|
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
|
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||||
|
github.com/mattn/go-runewidth v0.0.5 h1:jrGtp51JOKTWgvLFzfG6OtZOJcK2sEnzc/U+zw7TtbA=
|
||||||
|
github.com/mattn/go-runewidth v0.0.5/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||||
|
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||||
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
|
github.com/miekg/dns v1.1.8 h1:1QYRAKU3lN5cRfLCkPU08hwvLJFhvjP6MqNMmQz6ZVI=
|
||||||
|
github.com/miekg/dns v1.1.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||||
|
github.com/minio/cli v1.22.0 h1:VTQm7lmXm3quxO917X3p+el1l0Ca5X3S4PM2ruUYO68=
|
||||||
|
github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY=
|
||||||
|
github.com/minio/gokrb5/v7 v7.2.5 h1:GPnlzrvEol/uJHouCEQ382Gd+w4in5s4wCTQ4umDki8=
|
||||||
|
github.com/minio/gokrb5/v7 v7.2.5/go.mod h1:z6fE6twrvMN004M+KRTHnmtfpxsBIztP0PVsak0/4f8=
|
||||||
|
github.com/minio/hdfs/v3 v3.0.1 h1:MMpqqS9CtuBTYrsMYZMWfDPmWemRf11zhcvj+mbKUYc=
|
||||||
|
github.com/minio/hdfs/v3 v3.0.1/go.mod h1:6ALh9HsAwG9xAXdpdrZJcSY0vR6z3K+9XIz6Y9pQG/c=
|
||||||
|
github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA=
|
||||||
|
github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc=
|
||||||
|
github.com/minio/lsync v1.0.1 h1:AVvILxA976xc27hstd1oR+X9PQG0sPSom1MNb1ImfUs=
|
||||||
|
github.com/minio/lsync v1.0.1/go.mod h1:tCFzfo0dlvdGl70IT4IAK/5Wtgb0/BrTmo/jE8pArKA=
|
||||||
|
github.com/minio/mc v0.0.0-20200311043454-128f81461c9e h1:vqDqrVDdH30whW0N1u+RY9MD9zvCAerZ9sitlo1+/hE=
|
||||||
|
github.com/minio/mc v0.0.0-20200311043454-128f81461c9e/go.mod h1:4Q0JEDUShlXFf77eZd3ZpeK0aIdBB8r15O8kaAuPn/k=
|
||||||
|
github.com/minio/mc v0.0.0-20200401220942-e05f02d9f459 h1:59+zfhCHdmvCQEs/qUTEqOIKKGc9t6kfYmZRHVqn77E=
|
||||||
|
github.com/minio/mc v0.0.0-20200401220942-e05f02d9f459/go.mod h1:GWohdY5tXSiMnBCofmDRK5yRCihQH2FKNM0eh+UsY5Y=
|
||||||
|
github.com/minio/minio v0.0.0-20200306033404-a1c7c9ea73d7/go.mod h1:SxU0r96Z6zUj3lQAuPtyokbC0JEbqZ4x5RVcvl86TN0=
|
||||||
|
github.com/minio/minio v0.0.0-20200321002836-bf545dc3203b/go.mod h1:cUjzu4ZZy1YdtUjCSBWsxoa+z2NqCRohj6EyFIQA3gE=
|
||||||
|
github.com/minio/minio v0.0.0-20200325062613-ef6304c5c2f0 h1:EkFL9uZC+/S2HeDeVylt9HmUpcsqxABYof65MjWQvPI=
|
||||||
|
github.com/minio/minio v0.0.0-20200325062613-ef6304c5c2f0/go.mod h1:cUjzu4ZZy1YdtUjCSBWsxoa+z2NqCRohj6EyFIQA3gE=
|
||||||
|
github.com/minio/minio v0.0.0-20200327214830-6f992134a25f h1:RoOBi0vhXkZqe2b6RTROOsVJUwMqLMoet9r7eL01euo=
|
||||||
|
github.com/minio/minio v0.0.0-20200327214830-6f992134a25f/go.mod h1:BzbIyKUJPp+4f03i2XF7+GsijXnxMakUe5x+lm2WNc8=
|
||||||
|
github.com/minio/minio-go/v6 v6.0.45/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg=
|
||||||
|
github.com/minio/minio-go/v6 v6.0.50-0.20200306231101-b882ba63d570 h1:GLTZoRC6rhCTucnkJAQ63LhMU2S4CM71MRc9gfX7ohE=
|
||||||
|
github.com/minio/minio-go/v6 v6.0.50-0.20200306231101-b882ba63d570/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg=
|
||||||
|
github.com/minio/minio-go/v6 v6.0.51-0.20200319192131-097caa7760c7 h1:WQmYVUDRGdcEWhJeb42/Fn1IO7SBLem173DTE4+jp/E=
|
||||||
|
github.com/minio/minio-go/v6 v6.0.51-0.20200319192131-097caa7760c7/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg=
|
||||||
|
github.com/minio/parquet-go v0.0.0-20200125064549-a1e49702e174 h1:WYFHZIJ5LTWd4C3CW26jguaBLLDdX7l1/Xa3QSKGkIc=
|
||||||
|
github.com/minio/parquet-go v0.0.0-20200125064549-a1e49702e174/go.mod h1:PXYM9yI2l0YPmxHUXe6mFTmkQcyaVasDshAPTbGpDoo=
|
||||||
|
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
||||||
|
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||||
|
github.com/minio/simdjson-go v0.1.5-0.20200303142138-b17fe061ea37 h1:pDeao6M5AEd8hwTtGmE0pVKomlL56JFRa5SiXDZAuJE=
|
||||||
|
github.com/minio/simdjson-go v0.1.5-0.20200303142138-b17fe061ea37/go.mod h1:oKURrZZEBtqObgJrSjN1Ln2n9MJj2icuBTkeJzZnvSI=
|
||||||
|
github.com/minio/sio v0.2.0 h1:NCRCFLx0r5pRbXf65LVNjxbCGZgNQvNFQkgX3XF4BoA=
|
||||||
|
github.com/minio/sio v0.2.0/go.mod h1:nKM5GIWSrqbOZp0uhyj6M1iA0X6xQzSGtYSaTKSCut0=
|
||||||
|
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||||
|
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
|
||||||
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
|
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||||
|
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||||
|
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
||||||
|
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||||
|
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
|
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||||
|
github.com/mmcloughlin/avo v0.0.0-20200303042253-6df701fe672f h1:4a8aNS/kCsM3TZnLO0jUzMAch5+XYh5Poe74nqatJcw=
|
||||||
|
github.com/mmcloughlin/avo v0.0.0-20200303042253-6df701fe672f/go.mod h1:L0u9qfRMLNBO97u6pPukRp6ncoQz0Q25W69fvtht3vA=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
|
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
|
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||||
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
|
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
|
||||||
|
github.com/montanaflynn/stats v0.5.0 h1:2EkzeTSqBB4V4bJwWrt5gIIrZmpJBcoIRGS2kWLgzmk=
|
||||||
|
github.com/montanaflynn/stats v0.5.0/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
|
||||||
|
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
|
github.com/nats-io/gnatsd v1.4.1/go.mod h1:nqco77VO78hLCJpIcVfygDP2rPGfsEHkGTUk94uh5DQ=
|
||||||
|
github.com/nats-io/go-nats v1.7.2/go.mod h1:+t7RHT5ApZebkrQdnn6AhQJmhJJiKAvJUio1PiiCtj0=
|
||||||
|
github.com/nats-io/go-nats-streaming v0.4.4/go.mod h1:gfq4R3c9sKAINOpelo0gn/b9QDMBZnmrttcsNF+lqyo=
|
||||||
|
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
||||||
|
github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI=
|
||||||
|
github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
|
||||||
|
github.com/nats-io/nats-server v1.4.1/go.mod h1:c8f/fHd2B6Hgms3LtCaI7y6pC4WD1f4SUxcCud5vhBc=
|
||||||
|
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
|
||||||
|
github.com/nats-io/nats-streaming-server v0.14.2/go.mod h1:RyqtDJZvMZO66YmyjIYdIvS69zu/wDAkyNWa8PIUa5c=
|
||||||
|
github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ=
|
||||||
|
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
||||||
|
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||||
|
github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k=
|
||||||
|
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||||
|
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||||
|
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||||
|
github.com/nats-io/stan.go v0.4.5 h1:lPZ9y1jVGiXcTaUc1SnEIWPYfh0avuEiHBePNJYgpPk=
|
||||||
|
github.com/nats-io/stan.go v0.4.5/go.mod h1:Ji7mK6gRZJSH1nc3ZJH6vi7zn/QnZhpR9Arm4iuzsUQ=
|
||||||
|
github.com/ncw/directio v1.0.5 h1:JSUBhdjEvVaJvOoyPAbcW0fnd0tvRXD76wEfZ1KcQz4=
|
||||||
|
github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t6ROk=
|
||||||
|
github.com/nsqio/go-nsq v1.0.7 h1:O0pIZJYTf+x7cZBA0UMY8WxFG79lYTURmWzAAh48ljY=
|
||||||
|
github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito=
|
||||||
|
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||||
|
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||||
|
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||||
|
github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
|
||||||
|
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||||
|
github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
|
||||||
|
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
|
||||||
|
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
|
||||||
|
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||||
|
github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||||
|
github.com/pierrec/lz4 v2.4.0+incompatible h1:06usnXXDNcPvCHDkmPpkidf4jTc52UKld7UPfqKatY4=
|
||||||
|
github.com/pierrec/lz4 v2.4.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||||
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
|
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||||
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
|
github.com/pkg/profile v1.3.0 h1:OQIvuDgm00gWVWGTf4m4mCt6W1/0YqU7Ntg0mySWgaI=
|
||||||
|
github.com/pkg/profile v1.3.0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
||||||
|
github.com/pkg/xattr v0.4.1 h1:dhclzL6EqOXNaPDWqoeb9tIxATfBSmjqL0b4DpSjwRw=
|
||||||
|
github.com/pkg/xattr v0.4.1/go.mod h1:W2cGD0TBEus7MkUgv0tNZ9JutLtVO3cXu+IBRuHqnFs=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||||
|
github.com/posener/complete v1.2.2-0.20190702141536-6ffe496ea953 h1:oBvgW8IvwF278gJ3R4hH0gD3ZeJxjwBXVIScRR0dRc8=
|
||||||
|
github.com/posener/complete v1.2.2-0.20190702141536-6ffe496ea953/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E=
|
||||||
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
|
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
|
||||||
|
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA=
|
||||||
|
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||||
|
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||||
|
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||||
|
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
|
||||||
|
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
|
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||||
|
github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU=
|
||||||
|
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||||
|
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
|
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
|
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1 h1:/K3IL0Z1quvmJ7X0A1AwNEK7CRkVK3YwfOU/QAL4WGg=
|
||||||
|
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20190704165056-9c2d0518ed81 h1:zQTtDd7fQiF9e80lbl+ShnD9/5NSq5r1EhcS8955ECg=
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20190704165056-9c2d0518ed81/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||||
|
github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8=
|
||||||
|
github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
|
||||||
|
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||||
|
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
|
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
|
github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI=
|
||||||
|
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||||
|
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||||
|
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
|
||||||
|
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||||
|
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||||
|
github.com/secure-io/sio-go v0.3.0 h1:QKGb6rGJeiExac9wSWxnWPYo8O8OFN7lxXQvHshX6vo=
|
||||||
|
github.com/secure-io/sio-go v0.3.0/go.mod h1:D3KmXgKETffyYxBdFRN+Hpd2WzhzqS0EQwT3XWsAcBU=
|
||||||
|
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||||
|
github.com/shirou/gopsutil v2.18.12+incompatible h1:1eaJvGomDnH74/5cF4CTmTbLHAriGFsTZppLXDX93OM=
|
||||||
|
github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
|
github.com/shirou/gopsutil v2.20.3-0.20200314133625-53cec6b37e6a+incompatible h1:YiKUe2ZOmfpDBH4OSyxwkx/mjNqHHnNhOtZ2mPyRme8=
|
||||||
|
github.com/shirou/gopsutil v2.20.3-0.20200314133625-53cec6b37e6a+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
|
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||||
|
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||||
|
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||||
|
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
|
||||||
|
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||||
|
github.com/skyrings/skyring-common v0.0.0-20160929130248-d1c0bb1cbd5e h1:jrZSSgPUDtBeJbGXqgGUeupQH8I+ZvGXfhpIahye2Bc=
|
||||||
|
github.com/skyrings/skyring-common v0.0.0-20160929130248-d1c0bb1cbd5e/go.mod h1:d8hQseuYt4rJoOo21lFzYJdhMjmDqLY++ayArbgYjWI=
|
||||||
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||||
|
github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3 h1:hBSHahWMEgzwRyS6dRpxY0XyjZsHyQ61s084wo5PJe0=
|
||||||
|
github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||||
|
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
|
||||||
|
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
|
||||||
|
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||||
|
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
|
||||||
|
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||||
|
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||||
|
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
|
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94 h1:0ngsPmuP6XIjiFRNFYlvKwSr5zff2v+uPHaffZ6/M4k=
|
||||||
|
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||||
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||||
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
|
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
||||||
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
|
github.com/tidwall/gjson v1.3.5 h1:2oW9FBNu8qt9jy5URgrzsVx/T/KSn3qn/smJQ0crlDQ=
|
||||||
|
github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
|
||||||
|
github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
|
||||||
|
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
|
||||||
|
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
|
||||||
|
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
||||||
|
github.com/tidwall/sjson v1.0.4 h1:UcdIRXff12Lpnu3OLtZvnc03g4vH2suXDXhBwBqmzYg=
|
||||||
|
github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y=
|
||||||
|
github.com/tinylib/msgp v1.1.1 h1:TnCZ3FIuKeaIy+F45+Cnp+caqdXGy4z74HvwXN+570Y=
|
||||||
|
github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||||
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
|
||||||
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||||
|
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||||
|
github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0=
|
||||||
|
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
||||||
|
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||||
|
github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI=
|
||||||
|
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||||
|
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||||
|
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=
|
||||||
|
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
|
||||||
|
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
|
||||||
|
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk=
|
||||||
|
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
|
||||||
|
github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
|
||||||
|
github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0=
|
||||||
|
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
|
||||||
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
||||||
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
|
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
|
||||||
|
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||||
|
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||||
|
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||||
|
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||||
|
go.mongodb.org/mongo-driver v1.3.0 h1:ew6uUIeJOo+qdUUv7LxFCUhtWmVv7ZV/Xuy4FAUsw2E=
|
||||||
|
go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE=
|
||||||
|
go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
|
||||||
|
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||||
|
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
|
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
|
||||||
|
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
|
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
|
||||||
|
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||||
|
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||||
|
go.uber.org/zap v1.11.0 h1:gSmpCfs+R47a4yQPAI4xJ0IPDLTRGXskm6UelqNXpqE=
|
||||||
|
go.uber.org/zap v1.11.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||||
|
golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4=
|
||||||
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
|
golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||||
|
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||||
|
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f h1:kz4KIr+xcPUsI3VMoqWfPMvtnJ6MGfiVwsWSVzphMO4=
|
||||||
|
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
|
golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6 h1:Sy5bstxEqwwbYs6n0/pBuxKENqOeZUgD45Gp3Q3pqLg=
|
||||||
|
golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
|
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
|
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||||
|
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
|
||||||
|
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20181021155630-eda9bb28ed51/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM=
|
||||||
|
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 h1:sfkvUWPNGwSV+8/fNqctR5lS2AqCSqYwXdrjCxp/dXo=
|
||||||
|
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200320181252-af34d8274f85 h1:fD99hd4ciR6T3oPhr2EkmuKe9oHixHx9Hj/hND89j3g=
|
||||||
|
golang.org/x/sys v0.0.0-20200320181252-af34d8274f85/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
|
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||||
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
|
||||||
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||||
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
|
golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
|
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
|
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
|
golang.org/x/tools v0.0.0-20190914235951-31e00f45c22e h1:nOOVVcLC+/3MeovP40q5lCiWmP1Z1DaN8yn8ngU63hw=
|
||||||
|
golang.org/x/tools v0.0.0-20190914235951-31e00f45c22e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||||
|
google.golang.org/api v0.5.0 h1:lj9SyhMzyoa38fgFF0oO2T6pjs5IzkLPKfVtxpyCRMM=
|
||||||
|
google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||||
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
|
google.golang.org/appengine v1.6.0 h1:Tfd7cKwKbFRsI8RMAD3oqqw7JPFRrvFlOsfbgVkjOOw=
|
||||||
|
google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
|
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||||
|
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||||
|
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||||
|
google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||||
|
google.golang.org/genproto v0.0.0-20190513181449-d00d292a067c/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
||||||
|
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
|
||||||
|
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||||
|
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||||
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
|
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||||
|
google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw=
|
||||||
|
google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||||
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
|
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
|
||||||
|
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk=
|
||||||
|
gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||||
|
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||||
|
gopkg.in/h2non/filetype.v1 v1.0.5 h1:CC1jjJjoEhNVbMhXYalmGBhOBK2V70Q1N850wt/98/Y=
|
||||||
|
gopkg.in/h2non/filetype.v1 v1.0.5/go.mod h1:M0yem4rwSX5lLVrkEuRRp2/NinFMD5vgJ4DlAhZcfNo=
|
||||||
|
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
|
gopkg.in/ini.v1 v1.48.0 h1:URjZc+8ugRY5mL5uUeQH/a63JcHwdX9xZaWvmNWD7z8=
|
||||||
|
gopkg.in/ini.v1 v1.48.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
|
gopkg.in/ini.v1 v1.52.0 h1:j+Lt/M1oPPejkniCg1TkWE2J3Eh1oZTsHSXzMTzUXn4=
|
||||||
|
gopkg.in/ini.v1 v1.52.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
|
gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
|
||||||
|
gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
|
||||||
|
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM=
|
||||||
|
gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
|
||||||
|
gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI=
|
||||||
|
gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
|
||||||
|
gopkg.in/jcmturner/gokrb5.v7 v7.2.3 h1:hHMV/yKPwMnJhPuPx7pH2Uw/3Qyf+thJYlisUc44010=
|
||||||
|
gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
|
||||||
|
gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
|
||||||
|
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
|
||||||
|
gopkg.in/ldap.v3 v3.0.3 h1:YKRHW/2sIl05JsCtx/5ZuUueFuJyoj/6+DGXe3wp6ro=
|
||||||
|
gopkg.in/ldap.v3 v3.0.3/go.mod h1:oxD7NyBuxchC+SgJDE1Q5Od05eGt29SDQVBmV+HYbzw=
|
||||||
|
gopkg.in/olivere/elastic.v5 v5.0.80 h1:AKjfcq3ZIAAqO4m8h/vJ3GP6nY8n9ft5mgf54fEqC60=
|
||||||
|
gopkg.in/olivere/elastic.v5 v5.0.80/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0=
|
||||||
|
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||||
|
gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4=
|
||||||
|
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||||
|
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
||||||
|
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||||
|
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||||
|
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||||
15
minio_copyright.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
This file is part of MinIO Console Server
|
||||||
|
Copyright (c) 2020 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/>.
|
||||||
98
models/add_group_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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AddGroupRequest add group request
|
||||||
|
//
|
||||||
|
// swagger:model addGroupRequest
|
||||||
|
type AddGroupRequest struct {
|
||||||
|
|
||||||
|
// group
|
||||||
|
// Required: true
|
||||||
|
Group *string `json:"group"`
|
||||||
|
|
||||||
|
// members
|
||||||
|
// Required: true
|
||||||
|
Members []string `json:"members"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this add group request
|
||||||
|
func (m *AddGroupRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateGroup(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMembers(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AddGroupRequest) validateGroup(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("group", "body", m.Group); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AddGroupRequest) validateMembers(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("members", "body", m.Members); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *AddGroupRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *AddGroupRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res AddGroupRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
84
models/add_policy_request.go
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AddPolicyRequest add policy request
|
||||||
|
//
|
||||||
|
// swagger:model addPolicyRequest
|
||||||
|
type AddPolicyRequest struct {
|
||||||
|
|
||||||
|
// definition
|
||||||
|
Definition string `json:"definition,omitempty"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
// Required: true
|
||||||
|
Name *string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this add policy request
|
||||||
|
func (m *AddPolicyRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateName(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AddPolicyRequest) validateName(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("name", "body", m.Name); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *AddPolicyRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *AddPolicyRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res AddPolicyRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
98
models/add_user_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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AddUserRequest add user request
|
||||||
|
//
|
||||||
|
// swagger:model addUserRequest
|
||||||
|
type AddUserRequest struct {
|
||||||
|
|
||||||
|
// access key
|
||||||
|
// Required: true
|
||||||
|
AccessKey *string `json:"accessKey"`
|
||||||
|
|
||||||
|
// secret key
|
||||||
|
// Required: true
|
||||||
|
SecretKey *string `json:"secretKey"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this add user request
|
||||||
|
func (m *AddUserRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateAccessKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateSecretKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AddUserRequest) validateAccessKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("accessKey", "body", m.AccessKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AddUserRequest) validateSecretKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("secretKey", "body", m.SecretKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *AddUserRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *AddUserRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res AddUserRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
115
models/bucket.go
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Bucket bucket
|
||||||
|
//
|
||||||
|
// swagger:model bucket
|
||||||
|
type Bucket struct {
|
||||||
|
|
||||||
|
// access
|
||||||
|
Access BucketAccess `json:"access,omitempty"`
|
||||||
|
|
||||||
|
// creation date
|
||||||
|
CreationDate string `json:"creation_date,omitempty"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
// Required: true
|
||||||
|
// Min Length: 3
|
||||||
|
Name *string `json:"name"`
|
||||||
|
|
||||||
|
// size
|
||||||
|
Size int64 `json:"size,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this bucket
|
||||||
|
func (m *Bucket) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateAccess(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateName(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Bucket) validateAccess(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Access) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.Access.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("access")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Bucket) validateName(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("name", "body", m.Name); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := validate.MinLength("name", "body", string(*m.Name), 3); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Bucket) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Bucket) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Bucket
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
83
models/bucket_access.go
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BucketAccess bucket access
|
||||||
|
//
|
||||||
|
// swagger:model bucketAccess
|
||||||
|
type BucketAccess string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// BucketAccessPRIVATE captures enum value "PRIVATE"
|
||||||
|
BucketAccessPRIVATE BucketAccess = "PRIVATE"
|
||||||
|
|
||||||
|
// BucketAccessPUBLIC captures enum value "PUBLIC"
|
||||||
|
BucketAccessPUBLIC BucketAccess = "PUBLIC"
|
||||||
|
|
||||||
|
// BucketAccessCUSTOM captures enum value "CUSTOM"
|
||||||
|
BucketAccessCUSTOM BucketAccess = "CUSTOM"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var bucketAccessEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []BucketAccess
|
||||||
|
if err := json.Unmarshal([]byte(`["PRIVATE","PUBLIC","CUSTOM"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
bucketAccessEnum = append(bucketAccessEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m BucketAccess) validateBucketAccessEnum(path, location string, value BucketAccess) error {
|
||||||
|
if err := validate.Enum(path, location, value, bucketAccessEnum); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this bucket access
|
||||||
|
func (m BucketAccess) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateBucketAccessEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
63
models/config_description.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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConfigDescription config description
|
||||||
|
//
|
||||||
|
// swagger:model configDescription
|
||||||
|
type ConfigDescription struct {
|
||||||
|
|
||||||
|
// description
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
|
|
||||||
|
// key
|
||||||
|
Key string `json:"key,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this config description
|
||||||
|
func (m *ConfigDescription) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ConfigDescription) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ConfigDescription) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ConfigDescription
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
100
models/configuration.go
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Configuration configuration
|
||||||
|
//
|
||||||
|
// swagger:model configuration
|
||||||
|
type Configuration struct {
|
||||||
|
|
||||||
|
// key values
|
||||||
|
KeyValues []*ConfigurationKV `json:"key_values"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this configuration
|
||||||
|
func (m *Configuration) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateKeyValues(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Configuration) validateKeyValues(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.KeyValues) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.KeyValues); i++ {
|
||||||
|
if swag.IsZero(m.KeyValues[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.KeyValues[i] != nil {
|
||||||
|
if err := m.KeyValues[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("key_values" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Configuration) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Configuration) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Configuration
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
63
models/configuration_k_v.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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConfigurationKV configuration k v
|
||||||
|
//
|
||||||
|
// swagger:model configurationKV
|
||||||
|
type ConfigurationKV struct {
|
||||||
|
|
||||||
|
// key
|
||||||
|
Key string `json:"key,omitempty"`
|
||||||
|
|
||||||
|
// value
|
||||||
|
Value string `json:"value,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this configuration k v
|
||||||
|
func (m *ConfigurationKV) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ConfigurationKV) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ConfigurationKV) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ConfigurationKV
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
84
models/error.go
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Error error
|
||||||
|
//
|
||||||
|
// swagger:model error
|
||||||
|
type Error struct {
|
||||||
|
|
||||||
|
// code
|
||||||
|
Code int64 `json:"code,omitempty"`
|
||||||
|
|
||||||
|
// message
|
||||||
|
// Required: true
|
||||||
|
Message *string `json:"message"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this error
|
||||||
|
func (m *Error) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateMessage(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Error) validateMessage(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("message", "body", m.Message); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Error) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Error) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Error
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
69
models/group.go
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Group group
|
||||||
|
//
|
||||||
|
// swagger:model group
|
||||||
|
type Group struct {
|
||||||
|
|
||||||
|
// members
|
||||||
|
Members []string `json:"members"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
// policy
|
||||||
|
Policy string `json:"policy,omitempty"`
|
||||||
|
|
||||||
|
// status
|
||||||
|
Status string `json:"status,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this group
|
||||||
|
func (m *Group) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Group) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Group) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Group
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
100
models/list_bucket_events_response.go
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListBucketEventsResponse list bucket events response
|
||||||
|
//
|
||||||
|
// swagger:model listBucketEventsResponse
|
||||||
|
type ListBucketEventsResponse struct {
|
||||||
|
|
||||||
|
// events
|
||||||
|
Events []*NotificationConfig `json:"events"`
|
||||||
|
|
||||||
|
// total number of bucket events
|
||||||
|
Total int64 `json:"total,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this list bucket events response
|
||||||
|
func (m *ListBucketEventsResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateEvents(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ListBucketEventsResponse) validateEvents(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Events) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Events); i++ {
|
||||||
|
if swag.IsZero(m.Events[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Events[i] != nil {
|
||||||
|
if err := m.Events[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("events" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ListBucketEventsResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ListBucketEventsResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ListBucketEventsResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
100
models/list_buckets_response.go
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListBucketsResponse list buckets response
|
||||||
|
//
|
||||||
|
// swagger:model listBucketsResponse
|
||||||
|
type ListBucketsResponse struct {
|
||||||
|
|
||||||
|
// list of resulting buckets
|
||||||
|
Buckets []*Bucket `json:"buckets"`
|
||||||
|
|
||||||
|
// number of buckets accessible to tenant user
|
||||||
|
Total int64 `json:"total,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this list buckets response
|
||||||
|
func (m *ListBucketsResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateBuckets(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ListBucketsResponse) validateBuckets(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Buckets) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Buckets); i++ {
|
||||||
|
if swag.IsZero(m.Buckets[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Buckets[i] != nil {
|
||||||
|
if err := m.Buckets[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("buckets" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ListBucketsResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ListBucketsResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ListBucketsResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
100
models/list_config_response.go
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListConfigResponse list config response
|
||||||
|
//
|
||||||
|
// swagger:model listConfigResponse
|
||||||
|
type ListConfigResponse struct {
|
||||||
|
|
||||||
|
// configurations
|
||||||
|
Configurations []*ConfigDescription `json:"configurations"`
|
||||||
|
|
||||||
|
// total number of configurations
|
||||||
|
Total int64 `json:"total,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this list config response
|
||||||
|
func (m *ListConfigResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateConfigurations(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ListConfigResponse) validateConfigurations(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Configurations) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Configurations); i++ {
|
||||||
|
if swag.IsZero(m.Configurations[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Configurations[i] != nil {
|
||||||
|
if err := m.Configurations[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("configurations" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ListConfigResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ListConfigResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ListConfigResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
63
models/list_groups_response.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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListGroupsResponse list groups response
|
||||||
|
//
|
||||||
|
// swagger:model listGroupsResponse
|
||||||
|
type ListGroupsResponse struct {
|
||||||
|
|
||||||
|
// list of groups
|
||||||
|
Groups []string `json:"groups"`
|
||||||
|
|
||||||
|
// total number of groups
|
||||||
|
Total int64 `json:"total,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this list groups response
|
||||||
|
func (m *ListGroupsResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ListGroupsResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ListGroupsResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ListGroupsResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
100
models/list_policies_response.go
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListPoliciesResponse list policies response
|
||||||
|
//
|
||||||
|
// swagger:model listPoliciesResponse
|
||||||
|
type ListPoliciesResponse struct {
|
||||||
|
|
||||||
|
// list of policies
|
||||||
|
Policies []*Policy `json:"policies"`
|
||||||
|
|
||||||
|
// total number of policies
|
||||||
|
Total int64 `json:"total,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this list policies response
|
||||||
|
func (m *ListPoliciesResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validatePolicies(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ListPoliciesResponse) validatePolicies(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Policies) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Policies); i++ {
|
||||||
|
if swag.IsZero(m.Policies[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Policies[i] != nil {
|
||||||
|
if err := m.Policies[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("policies" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ListPoliciesResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ListPoliciesResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ListPoliciesResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
97
models/list_users_response.go
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListUsersResponse list users response
|
||||||
|
//
|
||||||
|
// swagger:model listUsersResponse
|
||||||
|
type ListUsersResponse struct {
|
||||||
|
|
||||||
|
// list of resulting users
|
||||||
|
Users []*User `json:"users"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this list users response
|
||||||
|
func (m *ListUsersResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateUsers(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ListUsersResponse) validateUsers(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Users) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Users); i++ {
|
||||||
|
if swag.IsZero(m.Users[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Users[i] != nil {
|
||||||
|
if err := m.Users[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("users" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ListUsersResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ListUsersResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ListUsersResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
120
models/login_details.go
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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/swag"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LoginDetails login details
|
||||||
|
//
|
||||||
|
// swagger:model loginDetails
|
||||||
|
type LoginDetails struct {
|
||||||
|
|
||||||
|
// login strategy
|
||||||
|
// Enum: [form redirect]
|
||||||
|
LoginStrategy string `json:"loginStrategy,omitempty"`
|
||||||
|
|
||||||
|
// redirect
|
||||||
|
Redirect string `json:"redirect,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this login details
|
||||||
|
func (m *LoginDetails) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateLoginStrategy(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var loginDetailsTypeLoginStrategyPropEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []string
|
||||||
|
if err := json.Unmarshal([]byte(`["form","redirect"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
loginDetailsTypeLoginStrategyPropEnum = append(loginDetailsTypeLoginStrategyPropEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// LoginDetailsLoginStrategyForm captures enum value "form"
|
||||||
|
LoginDetailsLoginStrategyForm string = "form"
|
||||||
|
|
||||||
|
// LoginDetailsLoginStrategyRedirect captures enum value "redirect"
|
||||||
|
LoginDetailsLoginStrategyRedirect string = "redirect"
|
||||||
|
)
|
||||||
|
|
||||||
|
// prop value enum
|
||||||
|
func (m *LoginDetails) validateLoginStrategyEnum(path, location string, value string) error {
|
||||||
|
if err := validate.Enum(path, location, value, loginDetailsTypeLoginStrategyPropEnum); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LoginDetails) validateLoginStrategy(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.LoginStrategy) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateLoginStrategyEnum("loginStrategy", "body", m.LoginStrategy); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *LoginDetails) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *LoginDetails) UnmarshalBinary(b []byte) error {
|
||||||
|
var res LoginDetails
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
98
models/login_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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LoginRequest login request
|
||||||
|
//
|
||||||
|
// swagger:model loginRequest
|
||||||
|
type LoginRequest struct {
|
||||||
|
|
||||||
|
// access key
|
||||||
|
// Required: true
|
||||||
|
AccessKey *string `json:"accessKey"`
|
||||||
|
|
||||||
|
// secret key
|
||||||
|
// Required: true
|
||||||
|
SecretKey *string `json:"secretKey"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this login request
|
||||||
|
func (m *LoginRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateAccessKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateSecretKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LoginRequest) validateAccessKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("accessKey", "body", m.AccessKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LoginRequest) validateSecretKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("secretKey", "body", m.SecretKey); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *LoginRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *LoginRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res LoginRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
60
models/login_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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LoginResponse login response
|
||||||
|
//
|
||||||
|
// swagger:model loginResponse
|
||||||
|
type LoginResponse struct {
|
||||||
|
|
||||||
|
// session Id
|
||||||
|
SessionID string `json:"sessionId,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this login response
|
||||||
|
func (m *LoginResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *LoginResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *LoginResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res LoginResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
104
models/make_bucket_request.go
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MakeBucketRequest make bucket request
|
||||||
|
//
|
||||||
|
// swagger:model makeBucketRequest
|
||||||
|
type MakeBucketRequest struct {
|
||||||
|
|
||||||
|
// access
|
||||||
|
Access BucketAccess `json:"access,omitempty"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
// Required: true
|
||||||
|
Name *string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this make bucket request
|
||||||
|
func (m *MakeBucketRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateAccess(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateName(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MakeBucketRequest) validateAccess(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Access) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.Access.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("access")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MakeBucketRequest) validateName(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("name", "body", m.Name); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *MakeBucketRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *MakeBucketRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res MakeBucketRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
104
models/notification_config.go
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NotificationConfig notification config
|
||||||
|
//
|
||||||
|
// swagger:model notificationConfig
|
||||||
|
type NotificationConfig struct {
|
||||||
|
|
||||||
|
// arn
|
||||||
|
Arn string `json:"arn,omitempty"`
|
||||||
|
|
||||||
|
// filter specific type of event. Defaults to all event (default: '[put,delete,get]')
|
||||||
|
Events []NotificationEventType `json:"events"`
|
||||||
|
|
||||||
|
// id
|
||||||
|
ID string `json:"id,omitempty"`
|
||||||
|
|
||||||
|
// filter event associated to the specified prefix
|
||||||
|
Prefix string `json:"prefix,omitempty"`
|
||||||
|
|
||||||
|
// filter event associated to the specified suffix
|
||||||
|
Suffix string `json:"suffix,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this notification config
|
||||||
|
func (m *NotificationConfig) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateEvents(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NotificationConfig) validateEvents(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Events) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Events); i++ {
|
||||||
|
|
||||||
|
if err := m.Events[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("events" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *NotificationConfig) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *NotificationConfig) UnmarshalBinary(b []byte) error {
|
||||||
|
var res NotificationConfig
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
83
models/notification_event_type.go
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NotificationEventType notification event type
|
||||||
|
//
|
||||||
|
// swagger:model notificationEventType
|
||||||
|
type NotificationEventType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// NotificationEventTypePut captures enum value "put"
|
||||||
|
NotificationEventTypePut NotificationEventType = "put"
|
||||||
|
|
||||||
|
// NotificationEventTypeDelete captures enum value "delete"
|
||||||
|
NotificationEventTypeDelete NotificationEventType = "delete"
|
||||||
|
|
||||||
|
// NotificationEventTypeGet captures enum value "get"
|
||||||
|
NotificationEventTypeGet NotificationEventType = "get"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var notificationEventTypeEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []NotificationEventType
|
||||||
|
if err := json.Unmarshal([]byte(`["put","delete","get"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
notificationEventTypeEnum = append(notificationEventTypeEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m NotificationEventType) validateNotificationEventTypeEnum(path, location string, value NotificationEventType) error {
|
||||||
|
if err := validate.Enum(path, location, value, notificationEventTypeEnum); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this notification event type
|
||||||
|
func (m NotificationEventType) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validateNotificationEventTypeEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
103
models/policy.go
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Policy policy
|
||||||
|
//
|
||||||
|
// swagger:model policy
|
||||||
|
type Policy struct {
|
||||||
|
|
||||||
|
// name
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
// statements
|
||||||
|
Statements []*Statement `json:"statements"`
|
||||||
|
|
||||||
|
// version
|
||||||
|
Version string `json:"version,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this policy
|
||||||
|
func (m *Policy) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateStatements(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Policy) validateStatements(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Statements) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Statements); i++ {
|
||||||
|
if swag.IsZero(m.Statements[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Statements[i] != nil {
|
||||||
|
if err := m.Statements[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("statements" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Policy) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Policy) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Policy
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
80
models/policy_entity.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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PolicyEntity policy entity
|
||||||
|
//
|
||||||
|
// swagger:model policyEntity
|
||||||
|
type PolicyEntity string
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// PolicyEntityUser captures enum value "user"
|
||||||
|
PolicyEntityUser PolicyEntity = "user"
|
||||||
|
|
||||||
|
// PolicyEntityGroup captures enum value "group"
|
||||||
|
PolicyEntityGroup PolicyEntity = "group"
|
||||||
|
)
|
||||||
|
|
||||||
|
// for schema
|
||||||
|
var policyEntityEnum []interface{}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var res []PolicyEntity
|
||||||
|
if err := json.Unmarshal([]byte(`["user","group"]`), &res); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for _, v := range res {
|
||||||
|
policyEntityEnum = append(policyEntityEnum, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m PolicyEntity) validatePolicyEntityEnum(path, location string, value PolicyEntity) error {
|
||||||
|
if err := validate.Enum(path, location, value, policyEntityEnum); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this policy entity
|
||||||
|
func (m PolicyEntity) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// value enum
|
||||||
|
if err := m.validatePolicyEntityEnum("", "body", m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
37
models/principal.go
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Principal principal
|
||||||
|
//
|
||||||
|
// swagger:model principal
|
||||||
|
type Principal string
|
||||||
|
|
||||||
|
// Validate validates this principal
|
||||||
|
func (m Principal) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
83
models/set_bucket_policy_request.go
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SetBucketPolicyRequest set bucket policy request
|
||||||
|
//
|
||||||
|
// swagger:model setBucketPolicyRequest
|
||||||
|
type SetBucketPolicyRequest struct {
|
||||||
|
|
||||||
|
// access
|
||||||
|
// Required: true
|
||||||
|
Access BucketAccess `json:"access"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this set bucket policy request
|
||||||
|
func (m *SetBucketPolicyRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateAccess(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetBucketPolicyRequest) validateAccess(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := m.Access.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("access")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *SetBucketPolicyRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *SetBucketPolicyRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res SetBucketPolicyRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
109
models/set_config_request.go
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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 (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SetConfigRequest set config request
|
||||||
|
//
|
||||||
|
// swagger:model setConfigRequest
|
||||||
|
type SetConfigRequest struct {
|
||||||
|
|
||||||
|
// Used if configuration is an event notification's target
|
||||||
|
ArnResourceID string `json:"arn_resource_id,omitempty"`
|
||||||
|
|
||||||
|
// key values
|
||||||
|
// Required: true
|
||||||
|
// Min Items: 1
|
||||||
|
KeyValues []*ConfigurationKV `json:"key_values"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this set config request
|
||||||
|
func (m *SetConfigRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateKeyValues(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetConfigRequest) validateKeyValues(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("key_values", "body", m.KeyValues); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
iKeyValuesSize := int64(len(m.KeyValues))
|
||||||
|
|
||||||
|
if err := validate.MinItems("key_values", "body", iKeyValuesSize, 1); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.KeyValues); i++ {
|
||||||
|
if swag.IsZero(m.KeyValues[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.KeyValues[i] != nil {
|
||||||
|
if err := m.KeyValues[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("key_values" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *SetConfigRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *SetConfigRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res SetConfigRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
101
models/set_policy_request.go
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SetPolicyRequest set policy request
|
||||||
|
//
|
||||||
|
// swagger:model setPolicyRequest
|
||||||
|
type SetPolicyRequest struct {
|
||||||
|
|
||||||
|
// entity name
|
||||||
|
// Required: true
|
||||||
|
EntityName *string `json:"entityName"`
|
||||||
|
|
||||||
|
// entity type
|
||||||
|
// Required: true
|
||||||
|
EntityType PolicyEntity `json:"entityType"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this set policy request
|
||||||
|
func (m *SetPolicyRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateEntityName(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateEntityType(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetPolicyRequest) validateEntityName(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("entityName", "body", m.EntityName); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetPolicyRequest) validateEntityType(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := m.EntityType.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("entityType")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *SetPolicyRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *SetPolicyRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res SetPolicyRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
66
models/statement.go
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Statement statement
|
||||||
|
//
|
||||||
|
// swagger:model statement
|
||||||
|
type Statement struct {
|
||||||
|
|
||||||
|
// actions
|
||||||
|
Actions []string `json:"actions"`
|
||||||
|
|
||||||
|
// effect
|
||||||
|
Effect string `json:"effect,omitempty"`
|
||||||
|
|
||||||
|
// resources
|
||||||
|
Resources []string `json:"resources"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this statement
|
||||||
|
func (m *Statement) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Statement) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Statement) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Statement
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
98
models/update_group_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) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateGroupRequest update group request
|
||||||
|
//
|
||||||
|
// swagger:model updateGroupRequest
|
||||||
|
type UpdateGroupRequest struct {
|
||||||
|
|
||||||
|
// members
|
||||||
|
// Required: true
|
||||||
|
Members []string `json:"members"`
|
||||||
|
|
||||||
|
// status
|
||||||
|
// Required: true
|
||||||
|
Status *string `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this update group request
|
||||||
|
func (m *UpdateGroupRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateMembers(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateStatus(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UpdateGroupRequest) validateMembers(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("members", "body", m.Members); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UpdateGroupRequest) validateStatus(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("status", "body", m.Status); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *UpdateGroupRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *UpdateGroupRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res UpdateGroupRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
69
models/user.go
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// User user
|
||||||
|
//
|
||||||
|
// swagger:model user
|
||||||
|
type User struct {
|
||||||
|
|
||||||
|
// access key
|
||||||
|
AccessKey string `json:"accessKey,omitempty"`
|
||||||
|
|
||||||
|
// member of
|
||||||
|
MemberOf []string `json:"memberOf"`
|
||||||
|
|
||||||
|
// policy
|
||||||
|
Policy string `json:"policy,omitempty"`
|
||||||
|
|
||||||
|
// status
|
||||||
|
Status string `json:"status,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user
|
||||||
|
func (m *User) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *User) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *User) UnmarshalBinary(b []byte) error {
|
||||||
|
var res User
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
1
portal-ui/.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules/
|
||||||
24
portal-ui/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/build
|
||||||
|
node_modules/
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
7
portal-ui/Makefile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
default: build
|
||||||
|
|
||||||
|
build:
|
||||||
|
@echo "Building frontend static assets to 'build'"
|
||||||
|
yarn build
|
||||||
|
go-bindata-assetfs -pkg portal build/...
|
||||||
|
|
||||||
44
portal-ui/README.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||||
|
|
||||||
|
## Available Scripts
|
||||||
|
|
||||||
|
In the project directory, you can run:
|
||||||
|
|
||||||
|
### `yarn start`
|
||||||
|
|
||||||
|
Runs the app in the development mode.<br />
|
||||||
|
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||||
|
|
||||||
|
The page will reload if you make edits.<br />
|
||||||
|
You will also see any lint errors in the console.
|
||||||
|
|
||||||
|
### `yarn test`
|
||||||
|
|
||||||
|
Launches the test runner in the interactive watch mode.<br />
|
||||||
|
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||||
|
|
||||||
|
### `yarn build`
|
||||||
|
|
||||||
|
Builds the app for production to the `build` folder.<br />
|
||||||
|
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||||
|
|
||||||
|
The build is minified and the filenames include the hashes.<br />
|
||||||
|
Your app is ready to be deployed!
|
||||||
|
|
||||||
|
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||||
|
|
||||||
|
### `yarn eject`
|
||||||
|
|
||||||
|
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||||
|
|
||||||
|
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||||
|
|
||||||
|
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||||
|
|
||||||
|
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||||
|
|
||||||
|
## Learn More
|
||||||
|
|
||||||
|
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||||
|
|
||||||
|
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||||
957
portal-ui/bindata_assetfs.go
Normal file
87
portal-ui/k8s/mime.types
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
|
||||||
|
types {
|
||||||
|
text/html html htm shtml;
|
||||||
|
text/css css;
|
||||||
|
text/xml xml;
|
||||||
|
image/gif gif;
|
||||||
|
image/jpeg jpeg jpg;
|
||||||
|
application/x-javascript js;
|
||||||
|
application/atom+xml atom;
|
||||||
|
application/rss+xml rss;
|
||||||
|
|
||||||
|
text/mathml mml;
|
||||||
|
text/plain txt;
|
||||||
|
text/vnd.sun.j2me.app-descriptor jad;
|
||||||
|
text/vnd.wap.wml wml;
|
||||||
|
text/x-component htc;
|
||||||
|
|
||||||
|
image/png png;
|
||||||
|
image/tiff tif tiff;
|
||||||
|
image/vnd.wap.wbmp wbmp;
|
||||||
|
image/x-icon ico;
|
||||||
|
image/x-jng jng;
|
||||||
|
image/x-ms-bmp bmp;
|
||||||
|
image/svg+xml svg svgz;
|
||||||
|
image/webp webp;
|
||||||
|
|
||||||
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
|
||||||
|
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx;
|
||||||
|
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
|
||||||
|
|
||||||
|
application/java-archive jar war ear;
|
||||||
|
application/mac-binhex40 hqx;
|
||||||
|
application/msword doc;
|
||||||
|
application/pdf pdf;
|
||||||
|
application/postscript ps eps ai;
|
||||||
|
application/rtf rtf;
|
||||||
|
application/vnd.ms-excel xls;
|
||||||
|
application/vnd.ms-powerpoint ppt;
|
||||||
|
application/vnd.wap.wmlc wmlc;
|
||||||
|
application/vnd.google-earth.kml+xml kml;
|
||||||
|
application/vnd.google-earth.kmz kmz;
|
||||||
|
application/x-7z-compressed 7z;
|
||||||
|
application/x-cocoa cco;
|
||||||
|
application/x-java-archive-diff jardiff;
|
||||||
|
application/x-java-jnlp-file jnlp;
|
||||||
|
application/x-makeself run;
|
||||||
|
application/x-perl pl pm;
|
||||||
|
application/x-pilot prc pdb;
|
||||||
|
application/x-rar-compressed rar;
|
||||||
|
application/x-redhat-package-manager rpm;
|
||||||
|
application/x-sea sea;
|
||||||
|
application/x-shockwave-flash swf;
|
||||||
|
application/x-stuffit sit;
|
||||||
|
application/x-tcl tcl tk;
|
||||||
|
application/x-x509-ca-cert der pem crt;
|
||||||
|
application/x-xpinstall xpi;
|
||||||
|
application/xhtml+xml xhtml;
|
||||||
|
application/zip zip;
|
||||||
|
|
||||||
|
application/octet-stream bin exe dll;
|
||||||
|
application/octet-stream deb;
|
||||||
|
application/octet-stream dmg;
|
||||||
|
application/octet-stream eot;
|
||||||
|
application/octet-stream iso img;
|
||||||
|
application/octet-stream msi msp msm;
|
||||||
|
|
||||||
|
audio/midi mid midi kar;
|
||||||
|
audio/mpeg mp3;
|
||||||
|
audio/ogg ogg;
|
||||||
|
audio/x-realaudio ra;
|
||||||
|
audio/x-m4a m4a;
|
||||||
|
|
||||||
|
video/3gpp 3gpp 3gp;
|
||||||
|
video/mpeg mpeg mpg;
|
||||||
|
video/quicktime mov;
|
||||||
|
video/x-flv flv;
|
||||||
|
video/x-mng mng;
|
||||||
|
video/x-ms-asf asx asf;
|
||||||
|
video/x-ms-wmv wmv;
|
||||||
|
video/x-msvideo avi;
|
||||||
|
|
||||||
|
video/mp4 mp4;
|
||||||
|
video/webm webm;
|
||||||
|
video/x-m4v m4v;
|
||||||
|
|
||||||
|
}
|
||||||
27
portal-ui/k8s/nginx.conf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
error_log /dev/stdout debug;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
log_format main '$http_host - $remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html/;
|
||||||
|
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
61
portal-ui/package.json
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"name": "portal-ui",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/helper-create-regexp-features-plugin": "^7.7.4",
|
||||||
|
"@material-ui/core": "^4.9.1",
|
||||||
|
"@material-ui/icons": "^4.9.1",
|
||||||
|
"@types/history": "^4.7.3",
|
||||||
|
"@types/jest": "24.0.23",
|
||||||
|
"@types/node": "12.12.8",
|
||||||
|
"@types/react": "16.9.11",
|
||||||
|
"@types/react-dom": "16.9.4",
|
||||||
|
"@types/react-redux": "^7.1.5",
|
||||||
|
"@types/react-router": "^5.1.3",
|
||||||
|
"@types/react-router-dom": "^5.1.2",
|
||||||
|
"@types/recharts": "^1.8.5",
|
||||||
|
"@types/superagent": "^4.1.4",
|
||||||
|
"@types/webpack-env": "^1.14.1",
|
||||||
|
"history": "^4.10.1",
|
||||||
|
"local-storage-fallback": "^4.1.1",
|
||||||
|
"moment": "^2.24.0",
|
||||||
|
"react": "^16.12.0",
|
||||||
|
"react-dom": "^16.12.0",
|
||||||
|
"react-moment": "^0.9.7",
|
||||||
|
"react-redux": "^7.1.3",
|
||||||
|
"react-router-dom": "^5.1.2",
|
||||||
|
"react-scripts": "3.3.1",
|
||||||
|
"recharts": "^2.0.0-beta.1",
|
||||||
|
"redux": "^4.0.4",
|
||||||
|
"redux-thunk": "^2.3.0",
|
||||||
|
"superagent": "^5.1.0",
|
||||||
|
"typeface-roboto": "^0.0.75",
|
||||||
|
"typescript": "3.6.4"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "PORT=5000 react-scripts start",
|
||||||
|
"build": "react-scripts build",
|
||||||
|
"test": "react-scripts test",
|
||||||
|
"eject": "react-scripts eject"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": "react-app"
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"proxy": "http://localhost:52300",
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "^1.19.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
portal-ui/public/android-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
portal-ui/public/android-icon-192x192.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
portal-ui/public/android-icon-36x36.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
portal-ui/public/android-icon-48x48.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
portal-ui/public/android-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
portal-ui/public/android-icon-96x96.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
portal-ui/public/apple-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
portal-ui/public/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
portal-ui/public/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
portal-ui/public/favicon-96x96.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
portal-ui/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 22 KiB |
1
portal-ui/public/images/BG_Illustration.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 368.999 192.934"><defs><style>.cls-1{opacity:0.35;}.cls-12,.cls-15,.cls-16,.cls-17,.cls-2,.cls-5,.cls-6,.cls-7,.cls-8{opacity:0.5;}.cls-10,.cls-11,.cls-12,.cls-13,.cls-14,.cls-15,.cls-16,.cls-17,.cls-3,.cls-4,.cls-5,.cls-6,.cls-7,.cls-9{fill:none;stroke:#fff;stroke-miterlimit:10;}.cls-4{stroke-width:0.5px;}.cls-10,.cls-11,.cls-5,.cls-9{stroke-width:0.873px;}.cls-5{stroke-dasharray:2.619 2.182;}.cls-12,.cls-15,.cls-16,.cls-17,.cls-5,.cls-6,.cls-7,.cls-8{isolation:isolate;}.cls-6{stroke-width:0.715px;stroke-dasharray:2.144 1.786;}.cls-7{stroke-width:0.743px;stroke-dasharray:2.23 1.858;}.cls-10{stroke-dasharray:2.646 2.204;}.cls-11{stroke-dasharray:2.585 2.154;}.cls-12{stroke-width:0.828px;stroke-dasharray:2.484 2.07;}.cls-13{stroke-dasharray:2.984 2.487;}.cls-14{stroke-dasharray:2.773 2.311;}.cls-16{stroke-width:0.899px;}.cls-17{stroke-width:0.859px;}</style></defs><title>BG_Illustration</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="BG_Illustration" data-name="BG Illustration" class="cls-1"><g id="Group_118" data-name="Group 118" class="cls-2"><path id="Path_56" data-name="Path 56" class="cls-3" d="M211.5,140.678l-52.726,29.078L79.687,126.139V29.652L132.411.571,211.5,44.188Z"/><path id="Path_58" data-name="Path 58" class="cls-3" d="M158.776,169.756V73.271L211.5,44.193,158.776,73.271,79.688,29.654"/><path id="Path_59" data-name="Path 59" class="cls-4" d="M84.681,41l69.1,38.11v79.3l-69.1-38.11Z"/><line id="Line_37" data-name="Line 37" class="cls-4" x1="106.25" y1="52.782" x2="106.25" y2="132.086"/><line id="Line_38" data-name="Line 38" class="cls-4" x1="153.783" y1="92.327" x2="106.25" y2="65.999"/><line id="Line_39" data-name="Line 39" class="cls-4" x1="153.783" y1="105.545" x2="106.25" y2="79.217"/><line id="Line_40" data-name="Line 40" class="cls-4" x1="153.783" y1="118.762" x2="106.25" y2="92.434"/><line id="Line_41" data-name="Line 41" class="cls-4" x1="153.783" y1="131.979" x2="106.25" y2="105.651"/><line id="Line_42" data-name="Line 42" class="cls-4" x1="153.783" y1="145.197" x2="106.25" y2="118.869"/><path id="Path_60" data-name="Path 60" class="cls-4" d="M166.723,151.031l38.8-22.487V62.916L166.723,85.4Z"/></g><path id="Path_62" data-name="Path 62" class="cls-5" d="M117.106,148.062l-76.18,43.33"/><path id="Path_63" data-name="Path 63" class="cls-6" d="M271.394,167.271l-44.483,25.3"/><path id="Path_64" data-name="Path 64" class="cls-7" d="M190.722,155.708l61.951,36.031"/><path id="Path_65" data-name="Path 65" class="cls-5" d="M237.7,36.385l28.182,17.229"/><g id="Path_66" data-name="Path 66" class="cls-8"><line class="cls-9" x1="362.563" y1="69.327" x2="361.42" y2="68.688"/><line class="cls-10" x1="359.496" y1="67.613" x2="305.418" y2="37.39"/><polyline class="cls-9" points="304.456 36.852 303.313 36.213 302.158 36.83"/><line class="cls-11" x1="300.258" y1="37.844" x2="213.418" y2="84.213"/><line class="cls-9" x1="212.468" y1="84.72" x2="211.313" y2="85.337"/></g><path id="Path_67" data-name="Path 67" class="cls-12" d="M79.648,192.571,31.786,166.344h-.868l-23.579,14.2"/><g id="Path_68" data-name="Path 68" class="cls-8"><line class="cls-3" x1="22.871" y1="84.641" x2="24.156" y2="83.867"/><line class="cls-13" x1="26.286" y1="82.584" x2="48.654" y2="69.113"/><polyline class="cls-3" points="49.719 68.471 51.004 67.698 52.307 68.441"/><line class="cls-14" x1="54.315" y1="69.585" x2="75.395" y2="81.606"/><line class="cls-3" x1="76.399" y1="82.178" x2="77.702" y2="82.921"/></g><circle id="Ellipse_11" data-name="Ellipse 11" class="cls-15" cx="4.092" cy="183.59" r="3.592"/><circle id="Ellipse_12" data-name="Ellipse 12" class="cls-15" cx="274.986" cy="165.477" r="3.592"/><ellipse id="Ellipse_13" data-name="Ellipse 13" class="cls-16" cx="364.957" cy="71.922" rx="3.592" ry="2.904"/><circle id="Ellipse_14" data-name="Ellipse 14" class="cls-15" cx="19.279" cy="87.681" r="3.592"/><ellipse id="Ellipse_15" data-name="Ellipse 15" class="cls-17" cx="234.106" cy="32.58" rx="3.592" ry="2.649"/></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 4.0 KiB |
47
portal-ui/public/index.html
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Acme cloud storage"
|
||||||
|
/>
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Questrial&display=swap" rel="stylesheet">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-icon-180x180.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicon-96x96.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||||
|
<link rel="mask-icon" href="%PUBLIC_URL%/safari-pinned-tab.svg" color="#3a4e54">
|
||||||
|
<!--
|
||||||
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
|
|
||||||
|
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||||
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
|
-->
|
||||||
|
<title>Acme Storage</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
portal-ui/public/logo192.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
portal-ui/public/logo512.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
41
portal-ui/public/manifest.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"name": "Acme Storage",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "android-icon-36x36.png",
|
||||||
|
"sizes": "36x36",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": "0.75"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "android-icon-48x48.png",
|
||||||
|
"sizes": "48x48",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": "1.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "android-icon-72x72.png",
|
||||||
|
"sizes": "72x72",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": "1.5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "android-icon-96x96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": "2.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "android-icon-144x144.png",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": "3.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "android-icon-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": "4.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
2
portal-ui/public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
148
portal-ui/public/safari-pinned-tab.svg
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="1344.000000pt" height="1344.000000pt" viewBox="0 0 1344.000000 1344.000000"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0.000000,1344.000000) scale(0.100000,-0.100000)"
|
||||||
|
fill="#000000" stroke="none">
|
||||||
|
<path d="M7171 13408 c-35 -4 -87 -12 -117 -18 -30 -6 -56 -11 -59 -10 -3 0
|
||||||
|
-19 -7 -35 -15 -17 -9 -30 -13 -30 -11 0 12 -265 -115 -280 -133 -3 -3 -24
|
||||||
|
-19 -48 -34 -71 -46 -214 -196 -274 -287 -93 -144 -150 -293 -176 -460 -17
|
||||||
|
-119 -2 -363 29 -450 1 -3 3 -9 5 -15 42 -141 95 -243 187 -365 23 -30 45 -59
|
||||||
|
49 -65 34 -48 152 -181 244 -275 61 -63 129 -133 150 -156 54 -57 367 -384
|
||||||
|
494 -515 93 -96 218 -226 500 -519 47 -48 137 -143 200 -211 63 -67 143 -152
|
||||||
|
178 -188 104 -108 196 -221 255 -311 75 -116 173 -328 177 -382 1 -4 7 -22 15
|
||||||
|
-41 14 -34 42 -167 53 -252 9 -70 8 -328 -2 -400 -14 -110 -77 -347 -97 -370
|
||||||
|
-5 -5 -9 -15 -9 -22 0 -21 -72 -163 -126 -249 -36 -58 -77 -119 -83 -124 -3
|
||||||
|
-3 -25 -28 -49 -57 -43 -53 -159 -169 -200 -200 -13 -10 -36 -27 -50 -39 -108
|
||||||
|
-85 -380 -234 -392 -214 -3 4 -5 580 -4 1279 l0 1270 -105 -55 c-57 -30 -109
|
||||||
|
-58 -115 -63 -6 -4 -36 -22 -66 -38 -141 -77 -319 -186 -498 -306 -75 -51
|
||||||
|
-141 -94 -147 -96 -5 -2 -15 -9 -22 -15 -29 -26 -43 -36 -70 -53 -51 -32 -292
|
||||||
|
-215 -329 -250 -7 -7 -17 -13 -22 -13 -6 0 -12 -3 -14 -7 -1 -5 -28 -28 -58
|
||||||
|
-53 -30 -25 -60 -49 -66 -55 -6 -5 -36 -30 -65 -55 -46 -38 -80 -68 -155 -135
|
||||||
|
-169 -151 -434 -411 -434 -426 0 -5 -7 -9 -15 -9 -8 0 -15 -3 -15 -7 0 -5 -25
|
||||||
|
-35 -56 -68 -102 -109 -180 -198 -291 -330 -95 -113 -100 -120 -143 -175 -19
|
||||||
|
-25 -37 -47 -40 -50 -29 -26 -440 -610 -440 -626 0 -3 -43 -70 -57 -89 -5 -5
|
||||||
|
-15 -23 -23 -40 -8 -16 -18 -32 -21 -35 -10 -9 -194 -335 -190 -339 1 -2 -1
|
||||||
|
-7 -6 -10 -5 -3 -24 -37 -43 -76 -19 -38 -38 -73 -43 -76 -5 -3 -9 -10 -9 -15
|
||||||
|
0 -5 -29 -67 -63 -139 -72 -150 -100 -211 -144 -315 -18 -41 -36 -84 -41 -95
|
||||||
|
-43 -93 -212 -555 -204 -555 2 0 -2 -13 -11 -30 -8 -16 -15 -38 -15 -50 0 -11
|
||||||
|
-4 -20 -8 -20 -5 0 -9 -6 -9 -13 0 -7 -16 -67 -37 -135 -20 -67 -39 -130 -41
|
||||||
|
-140 -2 -9 -20 -80 -40 -156 -20 -77 -39 -151 -41 -165 -3 -14 -10 -44 -16
|
||||||
|
-66 -6 -22 -11 -43 -10 -46 0 -3 -3 -22 -8 -42 -4 -20 -5 -36 -1 -34 51 24 87
|
||||||
|
44 93 52 4 6 8 7 8 3 0 -6 284 135 305 152 6 5 14 8 18 8 8 1 339 164 347 172
|
||||||
|
10 10 459 230 468 230 6 0 12 3 14 8 2 4 158 85 348 180 190 96 352 177 360
|
||||||
|
182 8 4 29 14 45 21 17 8 33 18 37 24 4 5 8 6 8 1 0 -5 6 -4 13 2 17 14 335
|
||||||
|
173 343 171 4 0 10 3 13 8 3 5 110 62 236 125 127 64 336 171 465 237 232 119
|
||||||
|
318 161 327 161 3 0 3 -9 0 -20 -3 -11 -1 -22 4 -25 4 -3 5 -16 0 -28 -5 -12
|
||||||
|
-5 -31 -1 -42 4 -11 5 -26 2 -34 -7 -19 -7 -80 1 -87 3 -3 1 -18 -4 -33 -6
|
||||||
|
-14 -10 -27 -9 -28 9 -15 17 -63 10 -63 -4 0 -4 -16 0 -35 4 -19 5 -35 1 -35
|
||||||
|
-8 0 -6 -68 2 -76 3 -3 2 -17 -3 -30 -5 -13 -6 -25 -2 -28 5 -3 5 -30 2 -61
|
||||||
|
-3 -31 -3 -58 2 -61 4 -3 3 -15 -2 -28 -5 -13 -6 -27 -3 -30 8 -7 10 -76 3
|
||||||
|
-76 -7 0 -3 -77 4 -88 2 -4 1 -14 -4 -21 -4 -8 -4 -27 0 -42 5 -16 6 -29 2
|
||||||
|
-29 -4 0 -7 -16 -7 -35 0 -19 2 -35 5 -35 3 0 5 -16 5 -35 0 -19 -2 -35 -5
|
||||||
|
-35 -3 0 -4 -19 -2 -43 3 -48 5 -100 2 -107 -5 -17 -4 -280 2 -280 4 0 3 -13
|
||||||
|
-2 -30 -5 -18 -5 -30 0 -30 6 0 6 -10 0 -25 -6 -15 -6 -26 1 -30 5 -4 7 -10 4
|
||||||
|
-15 -7 -12 -10 -124 -3 -135 3 -6 2 -19 -2 -30 -4 -11 -4 -30 1 -41 4 -12 5
|
||||||
|
-24 2 -28 -8 -8 -9 -276 -1 -276 4 0 3 -13 -2 -30 -5 -18 -5 -30 0 -30 6 0 6
|
||||||
|
-10 0 -25 -6 -15 -6 -26 1 -30 5 -4 7 -10 4 -15 -5 -8 -9 -116 -5 -135 1 -5 1
|
||||||
|
-14 0 -20 -5 -24 -3 -105 3 -111 3 -3 2 -16 -3 -29 -5 -13 -6 -26 -3 -29 8 -7
|
||||||
|
10 -76 3 -76 -7 0 -3 -77 4 -88 2 -4 1 -14 -4 -21 -4 -8 -4 -27 0 -42 5 -16 6
|
||||||
|
-29 2 -29 -4 0 -7 -16 -7 -35 0 -19 2 -35 5 -35 3 0 5 -16 5 -35 0 -19 -2 -35
|
||||||
|
-5 -35 -7 0 -3 -77 4 -88 2 -4 1 -14 -4 -21 -4 -8 -4 -27 0 -42 5 -16 5 -29 0
|
||||||
|
-29 -4 0 -4 -16 0 -35 4 -19 5 -35 1 -35 -8 0 -6 -68 2 -76 3 -3 2 -16 -3 -29
|
||||||
|
-5 -13 -6 -26 -3 -29 5 -5 8 -80 3 -88 -5 -10 -4 -278 2 -278 4 0 3 -13 -2
|
||||||
|
-30 -5 -18 -5 -30 0 -30 6 0 6 -10 0 -25 -6 -15 -6 -26 1 -30 5 -4 7 -10 4
|
||||||
|
-15 -8 -13 -10 -128 -3 -136 4 -3 2 -18 -3 -33 -6 -14 -10 -27 -9 -28 9 -15
|
||||||
|
17 -63 10 -63 -4 0 -4 -16 0 -35 4 -19 5 -35 1 -35 -8 0 -6 -68 2 -76 3 -3 2
|
||||||
|
-17 -3 -30 -5 -13 -6 -25 -2 -28 5 -3 5 -30 2 -61 -3 -31 -3 -58 2 -61 4 -3 3
|
||||||
|
-15 -2 -28 -5 -13 -6 -27 -3 -30 7 -7 10 -76 3 -76 -3 0 -4 -17 -2 -37 4 -55
|
||||||
|
2 -124 -3 -133 -3 -5 -1 -11 5 -15 6 -4 7 -13 1 -23 -6 -11 -5 -24 1 -36 13
|
||||||
|
-23 785 -796 796 -796 4 0 6 19 4 42 -1 24 -3 49 -2 56 0 6 0 19 0 27 0 8 0
|
||||||
|
22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0
|
||||||
|
30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0
|
||||||
|
8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0 22 0 30 0 8 0
|
||||||
|
21 0 28 -1 6 1 31 2 55 2 23 0 42 -4 42 -4 0 -3 14 2 30 5 17 5 30 0 30 -5 0
|
||||||
|
-5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5
|
||||||
|
17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30
|
||||||
|
-5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0
|
||||||
|
30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30
|
||||||
|
0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5
|
||||||
|
13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17
|
||||||
|
5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5
|
||||||
|
0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30
|
||||||
|
5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0
|
||||||
|
30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13
|
||||||
|
0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5
|
||||||
|
30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0
|
||||||
|
-5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5
|
||||||
|
17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30
|
||||||
|
-5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 6 30 2 30 -8 0 -7 68 1
|
||||||
|
76 3 3 2 17 -3 30 -6 14 -6 26 0 29 6 3 6 15 0 29 -5 13 -6 26 -4 29 8 8 10
|
||||||
|
167 2 167 -4 0 -3 14 2 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5
|
||||||
|
0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30
|
||||||
|
5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0
|
||||||
|
30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13
|
||||||
|
0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5
|
||||||
|
30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0
|
||||||
|
-5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5
|
||||||
|
17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30
|
||||||
|
-5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0
|
||||||
|
30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30
|
||||||
|
0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5
|
||||||
|
13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17
|
||||||
|
5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5
|
||||||
|
0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30
|
||||||
|
5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0 30 -5 0 -5 13 0 30 5 17 5 30 0
|
||||||
|
30 -4 0 -5 15 -1 33 4 17 4 47 0 65 -3 17 -3 32 2 32 4 0 4 13 -1 29 -4 15 -4
|
||||||
|
34 0 42 5 7 5 20 0 29 -5 9 -5 22 0 30 5 8 5 21 0 30 -5 9 -5 22 0 30 5 8 5
|
||||||
|
21 0 30 -5 9 -5 22 0 30 5 8 5 21 0 30 -5 9 -5 22 0 30 5 8 5 21 0 30 -4 8 -4
|
||||||
|
22 0 31 5 8 5 21 0 29 -4 7 -4 24 0 36 5 13 6 26 1 28 -5 3 -6 17 -4 30 4 21
|
||||||
|
33 39 172 109 266 135 574 311 627 358 11 11 23 19 27 19 8 0 26 15 141 115
|
||||||
|
144 125 302 298 374 409 15 22 30 43 33 46 14 11 130 212 160 276 18 38 37 72
|
||||||
|
43 76 6 4 8 8 4 8 -7 0 9 42 57 155 12 27 54 164 59 190 1 6 5 19 9 30 6 21 7
|
||||||
|
25 31 140 60 297 53 661 -19 975 -8 36 -17 76 -20 89 -3 13 -10 31 -14 40 -5
|
||||||
|
9 -9 18 -9 21 0 13 -24 93 -39 127 -9 21 -17 40 -18 43 -5 35 -111 254 -174
|
||||||
|
359 -29 49 -104 162 -123 186 -4 6 -24 30 -43 55 -84 106 -109 133 -635 679
|
||||||
|
-93 97 -406 423 -465 485 -69 72 -376 393 -455 476 -36 37 -137 143 -225 235
|
||||||
|
-88 93 -170 177 -182 188 -13 12 -23 25 -23 31 0 5 -6 17 -13 25 -41 48 -65
|
||||||
|
187 -46 269 11 52 41 122 51 122 5 0 8 6 8 13 0 24 116 119 176 145 117 50
|
||||||
|
275 35 374 -37 37 -27 46 -36 295 -296 172 -179 189 -196 405 -425 74 -78 155
|
||||||
|
-164 180 -190 25 -26 106 -111 180 -190 74 -78 158 -166 185 -195 28 -29 113
|
||||||
|
-119 190 -200 77 -81 170 -178 206 -216 36 -37 123 -130 195 -205 71 -75 149
|
||||||
|
-158 174 -183 25 -26 99 -105 165 -175 245 -260 297 -309 320 -300 8 3 15 11
|
||||||
|
15 16 0 23 -24 94 -37 109 -7 8 -13 21 -13 27 0 6 -10 23 -23 39 -12 15 -33
|
||||||
|
48 -46 73 -13 25 -29 52 -36 60 -7 8 -25 39 -41 67 -16 29 -32 53 -36 53 -5 0
|
||||||
|
-8 9 -8 20 0 11 -3 20 -7 20 -8 0 -34 39 -60 90 -7 14 -21 39 -32 55 -87 140
|
||||||
|
-121 198 -121 205 0 5 -3 10 -7 12 -5 2 -53 77 -107 168 -54 91 -127 211 -162
|
||||||
|
267 -35 56 -64 106 -64 112 0 5 -3 11 -7 13 -11 4 -83 124 -83 136 0 6 -4 12
|
||||||
|
-8 14 -7 3 -126 194 -201 322 -13 23 -32 53 -42 68 -11 14 -19 31 -19 37 0 6
|
||||||
|
-4 11 -9 11 -5 0 -18 19 -30 43 -12 23 -35 62 -51 87 -30 46 -68 108 -85 141
|
||||||
|
-5 11 -13 19 -17 19 -5 0 -8 4 -8 9 0 6 -27 52 -60 103 -34 51 -66 105 -73
|
||||||
|
121 -6 15 -15 27 -19 27 -4 0 -8 7 -8 15 0 8 -4 15 -10 15 -5 0 -10 5 -10 11
|
||||||
|
0 9 -155 245 -170 259 -3 3 -18 22 -34 43 -102 137 -309 304 -476 384 -79 38
|
||||||
|
-114 53 -132 58 -5 2 -9 3 -10 5 -2 1 -10 3 -18 6 -8 2 -38 10 -67 18 -128 36
|
||||||
|
-284 49 -412 34z m-292 -5345 c-4 -18 -3 -33 1 -33 4 0 4 -18 0 -40 -4 -22 -4
|
||||||
|
-40 1 -40 5 0 4 -11 -1 -24 -5 -13 -6 -27 -2 -30 7 -8 5 -123 -3 -136 -3 -5
|
||||||
|
-1 -11 4 -15 6 -3 7 -15 2 -28 -5 -12 -5 -32 0 -44 4 -12 4 -25 0 -27 -5 -3
|
||||||
|
-6 -20 -2 -38 4 -18 4 -51 1 -73 -3 -22 -3 -53 0 -70 3 -16 3 -45 -1 -62 -4
|
||||||
|
-18 -3 -33 1 -33 5 0 5 -13 0 -30 -5 -18 -5 -30 0 -30 6 0 6 -10 0 -24 -5 -13
|
||||||
|
-6 -27 -2 -30 7 -8 5 -123 -3 -136 -3 -5 -1 -11 5 -15 6 -4 8 -11 4 -16 -8
|
||||||
|
-13 -9 -107 -1 -115 3 -3 2 -16 -3 -29 -5 -13 -6 -26 -3 -29 8 -7 10 -76 3
|
||||||
|
-76 -3 0 -4 -19 -2 -42 4 -51 4 -50 1 -111 -3 -72 -29 -103 -139 -160 -52 -27
|
||||||
|
-129 -66 -170 -88 -41 -21 -80 -39 -87 -39 -6 0 -13 -3 -15 -7 -1 -5 -45 -29
|
||||||
|
-96 -55 -51 -26 -141 -73 -200 -104 -225 -119 -303 -160 -507 -264 -115 -60
|
||||||
|
-223 -115 -240 -124 -16 -9 -35 -16 -42 -16 -6 0 -13 -3 -15 -8 -1 -4 -77 -45
|
||||||
|
-168 -91 -91 -46 -238 -121 -327 -167 -90 -46 -163 -79 -163 -73 0 13 117 245
|
||||||
|
142 282 11 15 16 27 11 27 -4 0 -3 4 2 8 6 4 21 29 35 55 14 27 30 56 35 65 6
|
||||||
|
10 34 58 63 107 84 143 90 151 201 320 92 140 236 347 266 382 5 6 21 26 35
|
||||||
|
44 38 50 223 282 235 295 5 6 35 40 65 75 122 141 308 337 424 448 32 31 84
|
||||||
|
81 116 111 65 62 174 159 215 192 15 12 37 31 49 42 11 12 55 48 96 81 41 33
|
||||||
|
84 68 95 78 11 10 32 26 48 35 15 9 28 21 28 27 1 5 5 -8 8 -30 4 -22 3 -55 0
|
||||||
|
-72z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 10 KiB |
80
portal-ui/src/Routes.tsx
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2020 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import {Route, Router, Switch} from "react-router-dom";
|
||||||
|
import history from "./history";
|
||||||
|
import Login from "./screens/LoginPage";
|
||||||
|
import Signup from "./screens/SignupPage";
|
||||||
|
import Console from "./screens/Console/Console";
|
||||||
|
import NotFoundPage from "./screens/NotFoundPage";
|
||||||
|
import storage from "local-storage-fallback";
|
||||||
|
import CreatePassword from "./screens/CreatePassword";
|
||||||
|
import {connect} from "react-redux";
|
||||||
|
import {AppState} from "./store";
|
||||||
|
import {userLoggedIn} from "./actions";
|
||||||
|
|
||||||
|
const isLoggedIn = () => {
|
||||||
|
return (
|
||||||
|
storage.getItem("token") !== undefined &&
|
||||||
|
storage.getItem("token") !== null &&
|
||||||
|
storage.getItem("token") !== ""
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapState = (state: AppState) => ({
|
||||||
|
loggedIn: state.system.loggedIn
|
||||||
|
});
|
||||||
|
|
||||||
|
const connector = connect(mapState, { userLoggedIn });
|
||||||
|
|
||||||
|
interface RoutesProps {
|
||||||
|
loggedIn: boolean;
|
||||||
|
userLoggedIn: typeof userLoggedIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Routes extends React.Component<RoutesProps> {
|
||||||
|
componentDidMount(): void {
|
||||||
|
if (isLoggedIn()) {
|
||||||
|
this.props.userLoggedIn(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<Router history={history}>
|
||||||
|
<Switch>
|
||||||
|
<Route exact path="/create-password" component={CreatePassword} />
|
||||||
|
<Route exact path="/login" component={Login} />
|
||||||
|
<Route exact path="/signup" component={Signup} />
|
||||||
|
{this.props.loggedIn ? (
|
||||||
|
<Switch>
|
||||||
|
<Route path="/*" component={Console} />
|
||||||
|
<Route component={NotFoundPage} />
|
||||||
|
</Switch>
|
||||||
|
) : (
|
||||||
|
<Switch>
|
||||||
|
<Route exact path="/" component={Login} />
|
||||||
|
<Route component={NotFoundPage} />
|
||||||
|
</Switch>
|
||||||
|
)}
|
||||||
|
</Switch>
|
||||||
|
</Router>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default connector(Routes);
|
||||||
31
portal-ui/src/actions.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import { MENU_OPEN, USER_LOGGED } from "./types";
|
||||||
|
|
||||||
|
export function userLoggedIn(loggedIn: boolean) {
|
||||||
|
return {
|
||||||
|
type: USER_LOGGED,
|
||||||
|
logged: loggedIn
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setMenuOpen(open: boolean) {
|
||||||
|
return {
|
||||||
|
type: MENU_OPEN,
|
||||||
|
open: open
|
||||||
|
};
|
||||||
|
}
|
||||||
16
portal-ui/src/common/Copyright.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import Link from "@material-ui/core/Link";
|
||||||
|
|
||||||
|
export default function Copyright() {
|
||||||
|
return (
|
||||||
|
<Typography variant="body2" color="textSecondary" align="center">
|
||||||
|
{'Copyright © '}
|
||||||
|
<Link color="inherit" href="https://material-ui.com/">
|
||||||
|
MinIO
|
||||||
|
</Link>{' '}
|
||||||
|
{new Date().getFullYear()}
|
||||||
|
{'.'}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
|
}
|
||||||
108
portal-ui/src/common/MinTablePaginationActions.tsx
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import { TablePaginationActionsProps } from "@material-ui/core/TablePagination/TablePaginationActions";
|
||||||
|
import {
|
||||||
|
createStyles,
|
||||||
|
makeStyles,
|
||||||
|
Theme,
|
||||||
|
useTheme
|
||||||
|
} from "@material-ui/core/styles";
|
||||||
|
import React from "react";
|
||||||
|
import { IconButton } from "@material-ui/core";
|
||||||
|
import LastPageIcon from "@material-ui/icons/LastPage";
|
||||||
|
import FirstPageIcon from "@material-ui/icons/FirstPage";
|
||||||
|
import { KeyboardArrowLeft, KeyboardArrowRight } from "@material-ui/icons";
|
||||||
|
|
||||||
|
const useStyles1 = makeStyles((theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
root: {
|
||||||
|
flexShrink: 0,
|
||||||
|
marginLeft: theme.spacing(2.5)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
export function MinTablePaginationActions(props: TablePaginationActionsProps) {
|
||||||
|
const classes = useStyles1();
|
||||||
|
const theme = useTheme();
|
||||||
|
const { count, page, rowsPerPage, onChangePage } = props;
|
||||||
|
|
||||||
|
const handleFirstPageButtonClick = (
|
||||||
|
event: React.MouseEvent<HTMLButtonElement>
|
||||||
|
) => {
|
||||||
|
onChangePage(event, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBackButtonClick = (
|
||||||
|
event: React.MouseEvent<HTMLButtonElement>
|
||||||
|
) => {
|
||||||
|
onChangePage(event, page - 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleNextButtonClick = (
|
||||||
|
event: React.MouseEvent<HTMLButtonElement>
|
||||||
|
) => {
|
||||||
|
onChangePage(event, page + 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleLastPageButtonClick = (
|
||||||
|
event: React.MouseEvent<HTMLButtonElement>
|
||||||
|
) => {
|
||||||
|
onChangePage(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={classes.root}>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleFirstPageButtonClick}
|
||||||
|
disabled={page === 0}
|
||||||
|
aria-label="first page"
|
||||||
|
>
|
||||||
|
{theme.direction === "rtl" ? <LastPageIcon /> : <FirstPageIcon />}
|
||||||
|
</IconButton>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleBackButtonClick}
|
||||||
|
disabled={page === 0}
|
||||||
|
aria-label="previous page"
|
||||||
|
>
|
||||||
|
{theme.direction === "rtl" ? (
|
||||||
|
<KeyboardArrowRight />
|
||||||
|
) : (
|
||||||
|
<KeyboardArrowLeft />
|
||||||
|
)}
|
||||||
|
</IconButton>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleNextButtonClick}
|
||||||
|
disabled={page >= Math.ceil(count / rowsPerPage) - 1}
|
||||||
|
aria-label="next page"
|
||||||
|
>
|
||||||
|
{theme.direction === "rtl" ? (
|
||||||
|
<KeyboardArrowLeft />
|
||||||
|
) : (
|
||||||
|
<KeyboardArrowRight />
|
||||||
|
)}
|
||||||
|
</IconButton>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleLastPageButtonClick}
|
||||||
|
disabled={page >= Math.ceil(count / rowsPerPage) - 1}
|
||||||
|
aria-label="last page"
|
||||||
|
>
|
||||||
|
{theme.direction === "rtl" ? <FirstPageIcon /> : <LastPageIcon />}
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
15
portal-ui/src/common/Title.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import Typography from '@material-ui/core/Typography';
|
||||||
|
|
||||||
|
export default function Title(props: React.Props<any>) {
|
||||||
|
return (
|
||||||
|
<Typography component="h2" variant="h6" color="primary" gutterBottom>
|
||||||
|
{props.children}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Title.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
};
|
||||||
42
portal-ui/src/common/api/index.ts
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import storage from "local-storage-fallback";
|
||||||
|
import request from "superagent";
|
||||||
|
|
||||||
|
export class API {
|
||||||
|
invoke(method: string, url: string, data?: object) {
|
||||||
|
const token: string = storage.getItem("token")!;
|
||||||
|
return request(method, url)
|
||||||
|
.set("Authorization", `Bearer ${token}`)
|
||||||
|
.send(data)
|
||||||
|
.then(res => res.body)
|
||||||
|
.catch(err => this.onError(err));
|
||||||
|
}
|
||||||
|
|
||||||
|
onError(err: any) {
|
||||||
|
if (err.status) {
|
||||||
|
const errMessage: string =
|
||||||
|
(err.response.body && err.response.body.error) ||
|
||||||
|
err.status.toString(10);
|
||||||
|
return Promise.reject(errMessage);
|
||||||
|
} else {
|
||||||
|
return Promise.reject("Unknown error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const api = new API();
|
||||||
|
export default api;
|
||||||
4
portal-ui/src/history.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import { createBrowserHistory } from "history";
|
||||||
|
|
||||||
|
|
||||||
|
export default createBrowserHistory();
|
||||||
35
portal-ui/src/icons/BucketsIcon.tsx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import {SvgIcon} from "@material-ui/core";
|
||||||
|
class BucketsIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<title>ic_h_buckets</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<polygon className="cls-1" points="13.428 16 2.572 16 0 0 16 0 13.428 16"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BucketsIcon;
|
||||||
35
portal-ui/src/icons/CreateIcon.tsx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import {SvgIcon} from "@material-ui/core";
|
||||||
|
class CreateIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<title>ic_h_create-new_sl</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<path className="cls-1"
|
||||||
|
d="M0,0V16H16V0ZM11.886,9.048H9.048v2.838h-2.1V9.048H4.114v-2.1H6.952V4.114h2.1V6.952h2.838Z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CreateIcon;
|
||||||
39
portal-ui/src/icons/DashboardIcon.tsx
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { SvgIcon } from "@material-ui/core";
|
||||||
|
class DashboardIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<title>ic_h_dashboard</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<rect className="cls-1" x="9" width="7" height="7" />
|
||||||
|
<rect className="cls-1" width="7" height="7" />
|
||||||
|
<rect className="cls-1" x="9" y="9" width="7" height="7" />
|
||||||
|
<rect className="cls-1" y="9" width="7" height="7" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DashboardIcon;
|
||||||
35
portal-ui/src/icons/DeleteIcon.tsx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import {SvgIcon} from "@material-ui/core";
|
||||||
|
class DeleteIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<title>ic_h_delete</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<path className="cls-1"
|
||||||
|
d="M0,8H0a8,8,0,0,0,8,8H8a8,8,0,0,0,8-8h0A8,8,0,0,0,8,0H8A8,8,0,0,0,0,8Zm10.007,3.489L8,9.482,5.993,11.489,4.511,10.007,6.518,8,4.511,5.993,5.993,4.511,8,6.518l2.007-2.007,1.482,1.482L9.482,8l2.007,2.007Z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DeleteIcon;
|
||||||
34
portal-ui/src/icons/PermissionIcon.tsx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import {SvgIcon} from "@material-ui/core";
|
||||||
|
class PermissionIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 16">
|
||||||
|
<title>ic_permissions</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<polygon className="cls-1" points="14 16 7.035 12.13 0 16 0 0 14 0 14 16"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PermissionIcon;
|
||||||
39
portal-ui/src/icons/ServiceAccountIcon.tsx
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { SvgIcon } from "@material-ui/core";
|
||||||
|
class ServiceAccountIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.856 16">
|
||||||
|
<title>ic_service-accounts</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<path
|
||||||
|
className="cls-1"
|
||||||
|
d="M6.928,0,0,4v8l6.928,4,6.928-4V4Zm0,10.286A2.286,2.286,0,1,1,9.215,8,2.286,2.286,0,0,1,6.928,10.286Z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ServiceAccountIcon;
|
||||||
40
portal-ui/src/icons/UsersIcon.tsx
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import {SvgIcon} from "@material-ui/core";
|
||||||
|
class UsersIcon extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (<SvgIcon>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 14.874">
|
||||||
|
<title>ic_users</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="Layer_1-2" data-name="Layer 1">
|
||||||
|
<path className="cls-1"
|
||||||
|
d="M3.5,6.875h0a3.5,3.5,0,0,1,3.5,3.5v4.5a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0v-4.5A3.5,3.5,0,0,1,3.5,6.875Z"/>
|
||||||
|
<path className="cls-1"
|
||||||
|
d="M12.5,6.875h0a3.5,3.5,0,0,1,3.5,3.5v4.5a0,0,0,0,1,0,0H9a0,0,0,0,1,0,0v-4.5A3.5,3.5,0,0,1,12.5,6.875Z"/>
|
||||||
|
<circle className="cls-1" cx="3.498" cy="2.859" r="2.859"/>
|
||||||
|
<circle className="cls-1" cx="12.502" cy="2.859" r="2.859"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</SvgIcon>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default UsersIcon;
|
||||||
23
portal-ui/src/icons/index.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
export { default as PermissionIcon } from './PermissionIcon';
|
||||||
|
export { default as CreateIcon } from './CreateIcon';
|
||||||
|
export { default as DeleteIcon } from './DeleteIcon';
|
||||||
|
export { default as ServiceAccountIcon } from './ServiceAccountIcon';
|
||||||
|
export { default as DashboardIcon } from './DashboardIcon';
|
||||||
|
export { default as BucketsIcon } from './BucketsIcon';
|
||||||
|
export { default as UsersIcon } from './UsersIcon';
|
||||||
1
portal-ui/src/icons/mkube_logo_temp.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 82.816 18.487"><defs><style>.cls-1{fill:#1e1059;}</style></defs><title>mkube_logo_temp</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M19,18.127H16.152V3.612L11,16.4H8L2.848,3.751V18.127H0V.487H4.372L9.5,13.087,14.628.487H19Z"/><path class="cls-1" d="M28.556,10.623h-1.7v7.533H24V.489h2.852V7.922h1.741L35.231.489h3.685l-7.95,8.619,8.492,9.048H35.584Z"/><path class="cls-1" d="M51.962,13.049c0,3.848-2.775,5.438-5.6,5.438s-5.6-1.59-5.6-5.438V6.083h2.65v6.726c0,2.335,1.3,3.192,2.953,3.192s2.952-.857,2.952-3.192V6.083h2.65Z"/><path class="cls-1" d="M68.6,12.127a6.068,6.068,0,0,1-6.045,6.36,4.584,4.584,0,0,1-3.785-1.754v1.439H56.136V0h2.638V7.521a4.584,4.584,0,0,1,3.785-1.753A6.068,6.068,0,0,1,68.6,12.127Zm-10.007,0a3.654,3.654,0,1,0,7.294,0,3.654,3.654,0,1,0-7.294,0Z"/><path class="cls-1" d="M82.816,12.115c0,.34-.025.681-.051.984H73.831a3.415,3.415,0,0,0,3.6,3.079,5.778,5.778,0,0,0,3.5-1.275l1.312,1.881a7.279,7.279,0,0,1-4.971,1.7,5.963,5.963,0,0,1-6.184-6.36c0-3.785,2.461-6.359,6.02-6.359C80.481,5.768,82.8,8.342,82.816,12.115Zm-8.972-1.022h6.271c-.29-1.881-1.388-2.979-3.066-2.979A3.123,3.123,0,0,0,73.844,11.093Z"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
13
portal-ui/src/index.css
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||||
|
monospace;
|
||||||
|
}
|
||||||
69
portal-ui/src/index.tsx
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import ReactDOM from "react-dom";
|
||||||
|
import { Provider } from "react-redux";
|
||||||
|
import Routes from "./Routes";
|
||||||
|
import configureStore from "./store";
|
||||||
|
import * as serviceWorker from "./serviceWorker";
|
||||||
|
import { ThemeProvider, withStyles } from "@material-ui/core/styles";
|
||||||
|
|
||||||
|
import "./index.css";
|
||||||
|
import theme from "./theme/main";
|
||||||
|
|
||||||
|
const GlobalCss = withStyles({
|
||||||
|
// @global is handled by jss-plugin-global.
|
||||||
|
"@global": {
|
||||||
|
// You should target [class*="MuiButton-root"] instead if you nest themes.
|
||||||
|
".MuiButton-root": {
|
||||||
|
fontSize: "14px",
|
||||||
|
textTransform: "capitalize",
|
||||||
|
padding: "16px 25px 16px 25px",
|
||||||
|
borderRadius: "3px"
|
||||||
|
},
|
||||||
|
".MuiTableCell-head": {
|
||||||
|
borderRadius: "3px 3px 0px 0px",
|
||||||
|
fontSize: "13px"
|
||||||
|
},
|
||||||
|
".MuiPaper-root": {
|
||||||
|
borderRadius: "3px"
|
||||||
|
},
|
||||||
|
".MuiDrawer-paperAnchorDockedLeft": {
|
||||||
|
borderRight: "0px"
|
||||||
|
},
|
||||||
|
".MuiDrawer-root": {
|
||||||
|
"& .MuiPaper-root": {
|
||||||
|
borderRadius: "0px"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})(() => null);
|
||||||
|
|
||||||
|
ReactDOM.render(
|
||||||
|
<Provider store={configureStore()}>
|
||||||
|
<GlobalCss />
|
||||||
|
<ThemeProvider theme={theme}>
|
||||||
|
<Routes />
|
||||||
|
</ThemeProvider>
|
||||||
|
</Provider>,
|
||||||
|
document.getElementById("root")
|
||||||
|
);
|
||||||
|
|
||||||
|
// If you want your app to work offline and load faster, you can change
|
||||||
|
// unregister() to register() below. Note this comes with some pitfalls.
|
||||||
|
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||||
|
serviceWorker.unregister();
|
||||||
1
portal-ui/src/logo.svg
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
1
portal-ui/src/react-app-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/// <reference types="react-scripts" />
|
||||||
44
portal-ui/src/reducer.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import {MENU_OPEN, SystemActionTypes, SystemState, USER_LOGGED} from "./types";
|
||||||
|
|
||||||
|
const initialState: SystemState = {
|
||||||
|
loggedIn: false,
|
||||||
|
session: "",
|
||||||
|
userName: "",
|
||||||
|
sidebarOpen:true,
|
||||||
|
};
|
||||||
|
|
||||||
|
export function systemReducer(
|
||||||
|
state = initialState,
|
||||||
|
action: SystemActionTypes
|
||||||
|
): SystemState {
|
||||||
|
switch (action.type) {
|
||||||
|
case USER_LOGGED:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
loggedIn: action.logged
|
||||||
|
};
|
||||||
|
case MENU_OPEN:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
sidebarOpen: action.open
|
||||||
|
};
|
||||||
|
default:
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
}
|
||||||
189
portal-ui/src/screens/Console/Buckets/AddBucket.tsx
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import Title from "../../../common/Title";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogTitle,
|
||||||
|
FormControl,
|
||||||
|
InputLabel,
|
||||||
|
LinearProgress,
|
||||||
|
MenuItem,
|
||||||
|
Select,
|
||||||
|
TextField
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IAddBucketProps {
|
||||||
|
classes: any;
|
||||||
|
open: boolean;
|
||||||
|
closeModalAndRefresh: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IAddBucketState {
|
||||||
|
addLoading: boolean;
|
||||||
|
addError: string;
|
||||||
|
bucketName: string;
|
||||||
|
accessPolicy: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddBucket extends React.Component<IAddBucketProps, IAddBucketState> {
|
||||||
|
state: IAddBucketState = {
|
||||||
|
addLoading: false,
|
||||||
|
addError: "",
|
||||||
|
bucketName: "",
|
||||||
|
accessPolicy: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
addRecord(event: React.FormEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
const { bucketName, addLoading, accessPolicy } = this.state;
|
||||||
|
if (addLoading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ addLoading: true }, () => {
|
||||||
|
api
|
||||||
|
.invoke("POST", "/api/v1/buckets", {
|
||||||
|
name: bucketName,
|
||||||
|
access: accessPolicy
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
addLoading: false,
|
||||||
|
addError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeModalAndRefresh();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
addLoading: false,
|
||||||
|
addError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes, open } = this.props;
|
||||||
|
const { addLoading, addError, accessPolicy } = this.state;
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({ addError: "" }, () => {
|
||||||
|
this.props.closeModalAndRefresh();
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<DialogTitle id="alert-dialog-title">
|
||||||
|
<Title>Create Bucket</Title>
|
||||||
|
</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
<form
|
||||||
|
noValidate
|
||||||
|
autoComplete="off"
|
||||||
|
onSubmit={(e: React.FormEvent<HTMLFormElement>) => {
|
||||||
|
this.addRecord(e);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Grid container>
|
||||||
|
{addError !== "" && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
variant="body1"
|
||||||
|
className={classes.errorBlock}
|
||||||
|
>
|
||||||
|
{addError}
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<TextField
|
||||||
|
id="standard-basic"
|
||||||
|
fullWidth
|
||||||
|
label="Bucket Name"
|
||||||
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
this.setState({ bucketName: e.target.value });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<FormControl className={classes.formControl} fullWidth>
|
||||||
|
<InputLabel id="select-access-policy">
|
||||||
|
Access Policy
|
||||||
|
</InputLabel>
|
||||||
|
<Select
|
||||||
|
labelId="select-access-policy"
|
||||||
|
id="select-access-policy"
|
||||||
|
value={accessPolicy}
|
||||||
|
onChange={(e: React.ChangeEvent<{ value: unknown }>) => {
|
||||||
|
this.setState({ accessPolicy: e.target.value as string });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MenuItem value="PRIVATE">Private</MenuItem>
|
||||||
|
<MenuItem value="PUBLIC">Public</MenuItem>
|
||||||
|
<MenuItem value="CUSTOM">Custom</MenuItem>
|
||||||
|
</Select>
|
||||||
|
</FormControl>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
fullWidth
|
||||||
|
disabled={addLoading}
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
{addLoading && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<LinearProgress />
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
</Grid>
|
||||||
|
</form>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withStyles(styles)(AddBucket);
|
||||||
340
portal-ui/src/screens/Console/Buckets/Buckets.tsx
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
||||||
|
import Table from "@material-ui/core/Table";
|
||||||
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
import Paper from "@material-ui/core/Paper";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
import { Bucket, BucketList } from "./types";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
IconButton,
|
||||||
|
LinearProgress,
|
||||||
|
TableFooter,
|
||||||
|
TablePagination
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import DeleteIcon from "@material-ui/icons/Delete";
|
||||||
|
import AddBucket from "./AddBucket";
|
||||||
|
import DeleteBucket from "./DeleteBucket";
|
||||||
|
import { MinTablePaginationActions } from "../../../common/MinTablePaginationActions";
|
||||||
|
import { CreateIcon } from "../../../icons";
|
||||||
|
import TextField from "@material-ui/core/TextField";
|
||||||
|
import InputAdornment from "@material-ui/core/InputAdornment";
|
||||||
|
import SearchIcon from "@material-ui/icons/Search";
|
||||||
|
import Moment from "react-moment";
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
seeMore: {
|
||||||
|
marginTop: theme.spacing(3)
|
||||||
|
},
|
||||||
|
paper: {
|
||||||
|
display: "flex",
|
||||||
|
overflow: "auto",
|
||||||
|
flexDirection: "column"
|
||||||
|
},
|
||||||
|
|
||||||
|
addSideBar: {
|
||||||
|
width: "320px",
|
||||||
|
padding: "20px"
|
||||||
|
},
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
},
|
||||||
|
tableToolbar: {
|
||||||
|
paddingLeft: theme.spacing(2),
|
||||||
|
paddingRight: theme.spacing(0)
|
||||||
|
},
|
||||||
|
minTableHeader: {
|
||||||
|
color: "#393939",
|
||||||
|
"& tr": {
|
||||||
|
"& th": {
|
||||||
|
fontWeight: "bold"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actionsTray: {
|
||||||
|
textAlign: "right",
|
||||||
|
"& button": {
|
||||||
|
marginLeft: 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchField: {
|
||||||
|
background: "#FFFFFF",
|
||||||
|
padding: 12,
|
||||||
|
borderRadius: 5,
|
||||||
|
boxShadow: "0px 3px 6px #00000012"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IBucketsProps {
|
||||||
|
classes: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IBucketsState {
|
||||||
|
records: Bucket[];
|
||||||
|
totalRecords: number;
|
||||||
|
loading: boolean;
|
||||||
|
error: string;
|
||||||
|
deleteError: string;
|
||||||
|
addScreenOpen: boolean;
|
||||||
|
page: number;
|
||||||
|
rowsPerPage: number;
|
||||||
|
deleteOpen: boolean;
|
||||||
|
selectedBucket: string;
|
||||||
|
filterBuckets: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Buckets extends React.Component<IBucketsProps, IBucketsState> {
|
||||||
|
state: IBucketsState = {
|
||||||
|
records: [],
|
||||||
|
totalRecords: 0,
|
||||||
|
loading: false,
|
||||||
|
error: "",
|
||||||
|
deleteError: "",
|
||||||
|
addScreenOpen: false,
|
||||||
|
page: 0,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
deleteOpen: false,
|
||||||
|
selectedBucket: "",
|
||||||
|
filterBuckets: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchRecords() {
|
||||||
|
this.setState({ loading: true }, () => {
|
||||||
|
const { page, rowsPerPage } = this.state;
|
||||||
|
const offset = page * rowsPerPage;
|
||||||
|
api
|
||||||
|
.invoke("GET", `/api/v1/buckets?offset=${offset}&limit=${rowsPerPage}`)
|
||||||
|
.then((res: BucketList) => {
|
||||||
|
this.setState({
|
||||||
|
loading: false,
|
||||||
|
records: res.buckets,
|
||||||
|
totalRecords: res.total,
|
||||||
|
error: ""
|
||||||
|
});
|
||||||
|
// if we get 0 results, and page > 0 , go down 1 page
|
||||||
|
if (
|
||||||
|
(res.buckets === undefined ||
|
||||||
|
res.buckets == null ||
|
||||||
|
res.buckets.length === 0) &&
|
||||||
|
page > 0
|
||||||
|
) {
|
||||||
|
const newPage = page - 1;
|
||||||
|
this.setState({ page: newPage }, () => {
|
||||||
|
this.fetchRecords();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({ loading: false, error: err });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
closeAddModalAndRefresh() {
|
||||||
|
this.setState({ addScreenOpen: false }, () => {
|
||||||
|
this.fetchRecords();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
closeDeleteModalAndRefresh(refresh: boolean) {
|
||||||
|
this.setState({ deleteOpen: false }, () => {
|
||||||
|
if (refresh) {
|
||||||
|
this.fetchRecords();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
this.fetchRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
bucketFilter(): void {}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes } = this.props;
|
||||||
|
const {
|
||||||
|
records,
|
||||||
|
totalRecords,
|
||||||
|
addScreenOpen,
|
||||||
|
loading,
|
||||||
|
page,
|
||||||
|
rowsPerPage,
|
||||||
|
deleteOpen,
|
||||||
|
selectedBucket,
|
||||||
|
filterBuckets
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
const offset = page * rowsPerPage;
|
||||||
|
|
||||||
|
const handleChangePage = (event: unknown, newPage: number) => {
|
||||||
|
this.setState({ page: newPage });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangeRowsPerPage = (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
const rPP = parseInt(event.target.value, 10);
|
||||||
|
this.setState({ page: 0, rowsPerPage: rPP });
|
||||||
|
};
|
||||||
|
|
||||||
|
const confirmDeleteBucket = (bucket: string) => {
|
||||||
|
this.setState({ deleteOpen: true, selectedBucket: bucket });
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<AddBucket
|
||||||
|
open={addScreenOpen}
|
||||||
|
closeModalAndRefresh={() => {
|
||||||
|
this.closeAddModalAndRefresh();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Grid container>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography variant="h6">Buckets</Typography>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} className={classes.actionsTray}>
|
||||||
|
<TextField
|
||||||
|
placeholder="Search Buckets"
|
||||||
|
className={classes.searchField}
|
||||||
|
id="search-resource"
|
||||||
|
label=""
|
||||||
|
onChange={val => {
|
||||||
|
this.setState({
|
||||||
|
filterBuckets: val.target.value
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
InputProps={{
|
||||||
|
disableUnderline: true,
|
||||||
|
startAdornment: (
|
||||||
|
<InputAdornment position="start">
|
||||||
|
<SearchIcon />
|
||||||
|
</InputAdornment>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
startIcon={<CreateIcon />}
|
||||||
|
onClick={() => {
|
||||||
|
this.setState({
|
||||||
|
addScreenOpen: true
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Create Bucket
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Paper className={classes.paper}>
|
||||||
|
{loading && <LinearProgress />}
|
||||||
|
{records != null && records.length > 0 ? (
|
||||||
|
<Table size="medium">
|
||||||
|
<TableHead className={classes.minTableHeader}>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>Name</TableCell>
|
||||||
|
<TableCell>Creation Date</TableCell>
|
||||||
|
<TableCell align="right">Actions</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
{records
|
||||||
|
.slice(offset, offset + rowsPerPage)
|
||||||
|
.filter((b: Bucket) => {
|
||||||
|
if (filterBuckets === "") {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
if (b.name.indexOf(filterBuckets) >= 0) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.map(row => (
|
||||||
|
<TableRow key={row.name}>
|
||||||
|
<TableCell>{row.name}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Moment>{row.creation_date}</Moment>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell align="right">
|
||||||
|
<IconButton
|
||||||
|
aria-label="delete"
|
||||||
|
onClick={() => {
|
||||||
|
confirmDeleteBucket(row.name);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DeleteIcon />
|
||||||
|
</IconButton>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
))}
|
||||||
|
</TableBody>
|
||||||
|
<TableFooter>
|
||||||
|
<TableRow>
|
||||||
|
<TablePagination
|
||||||
|
rowsPerPageOptions={[5, 10, 25]}
|
||||||
|
colSpan={3}
|
||||||
|
count={totalRecords}
|
||||||
|
rowsPerPage={rowsPerPage}
|
||||||
|
page={page}
|
||||||
|
SelectProps={{
|
||||||
|
inputProps: { "aria-label": "rows per page" },
|
||||||
|
native: true
|
||||||
|
}}
|
||||||
|
onChangePage={handleChangePage}
|
||||||
|
onChangeRowsPerPage={handleChangeRowsPerPage}
|
||||||
|
ActionsComponent={MinTablePaginationActions}
|
||||||
|
/>
|
||||||
|
</TableRow>
|
||||||
|
</TableFooter>
|
||||||
|
</Table>
|
||||||
|
) : (
|
||||||
|
<div>No Buckets</div>
|
||||||
|
)}
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<DeleteBucket
|
||||||
|
deleteOpen={deleteOpen}
|
||||||
|
selectedBucket={selectedBucket}
|
||||||
|
closeDeleteModalAndRefresh={(refresh: boolean) => {
|
||||||
|
this.closeDeleteModalAndRefresh(refresh);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withStyles(styles)(Buckets);
|
||||||
153
portal-ui/src/screens/Console/Buckets/DeleteBucket.tsx
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogActions,
|
||||||
|
DialogContent,
|
||||||
|
DialogContentText,
|
||||||
|
DialogTitle,
|
||||||
|
LinearProgress
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
import { BucketList } from "./types";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IDeleteBucketProps {
|
||||||
|
classes: any;
|
||||||
|
closeDeleteModalAndRefresh: (refresh: boolean) => void;
|
||||||
|
deleteOpen: boolean;
|
||||||
|
selectedBucket: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IDeleteBucketState {
|
||||||
|
deleteLoading: boolean;
|
||||||
|
deleteError: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeleteBucket extends React.Component<
|
||||||
|
IDeleteBucketProps,
|
||||||
|
IDeleteBucketState
|
||||||
|
> {
|
||||||
|
state: IDeleteBucketState = {
|
||||||
|
deleteLoading: false,
|
||||||
|
deleteError: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
removeRecord() {
|
||||||
|
const { deleteLoading } = this.state;
|
||||||
|
const { selectedBucket } = this.props;
|
||||||
|
if (deleteLoading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ deleteLoading: true }, () => {
|
||||||
|
api
|
||||||
|
.invoke("DELETE", `/api/v1/buckets/${selectedBucket}`, {
|
||||||
|
name: selectedBucket
|
||||||
|
})
|
||||||
|
.then((res: BucketList) => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
deleteLoading: false,
|
||||||
|
deleteError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeDeleteModalAndRefresh(true);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
deleteLoading: false,
|
||||||
|
deleteError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes, deleteOpen, selectedBucket } = this.props;
|
||||||
|
const { deleteLoading, deleteError } = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
open={deleteOpen}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({deleteError:""},()=>{
|
||||||
|
this.props.closeDeleteModalAndRefresh(false);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<DialogTitle id="alert-dialog-title">Delete Bucket</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
{deleteLoading && <LinearProgress />}
|
||||||
|
<DialogContentText id="alert-dialog-description">
|
||||||
|
Are you sure you want to delete bucket <b>{selectedBucket}</b>?{" "}
|
||||||
|
<br />A bucket can only be deleted if it's empty.
|
||||||
|
{deleteError !== "" && (
|
||||||
|
<React.Fragment>
|
||||||
|
<br />
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
variant="body1"
|
||||||
|
className={classes.errorBlock}
|
||||||
|
>
|
||||||
|
{deleteError}
|
||||||
|
</Typography>
|
||||||
|
</React.Fragment>
|
||||||
|
)}
|
||||||
|
</DialogContentText>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
this.setState({deleteError:""},()=>{
|
||||||
|
this.props.closeDeleteModalAndRefresh(false);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
color="primary"
|
||||||
|
disabled={deleteLoading}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
this.removeRecord();
|
||||||
|
}}
|
||||||
|
color="secondary"
|
||||||
|
autoFocus
|
||||||
|
>
|
||||||
|
Delete
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withStyles(styles)(DeleteBucket);
|
||||||
25
portal-ui/src/screens/Console/Buckets/types.tsx
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
export interface Bucket {
|
||||||
|
name: string;
|
||||||
|
creation_date: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BucketList {
|
||||||
|
buckets: Bucket[];
|
||||||
|
total: number;
|
||||||
|
}
|
||||||
238
portal-ui/src/screens/Console/Console.tsx
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import clsx from "clsx";
|
||||||
|
import {
|
||||||
|
createStyles,
|
||||||
|
StyledProps,
|
||||||
|
Theme,
|
||||||
|
withStyles
|
||||||
|
} from "@material-ui/core/styles";
|
||||||
|
import CssBaseline from "@material-ui/core/CssBaseline";
|
||||||
|
import Drawer from "@material-ui/core/Drawer";
|
||||||
|
import Box from "@material-ui/core/Box";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import Container from "@material-ui/core/Container";
|
||||||
|
import Link from "@material-ui/core/Link";
|
||||||
|
|
||||||
|
import history from "../../history";
|
||||||
|
import {
|
||||||
|
Redirect,
|
||||||
|
Route,
|
||||||
|
RouteComponentProps,
|
||||||
|
Router,
|
||||||
|
Switch,
|
||||||
|
withRouter
|
||||||
|
} from "react-router-dom";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { AppState } from "../../store";
|
||||||
|
import { setMenuOpen } from "../../actions";
|
||||||
|
import { ThemedComponentProps } from "@material-ui/core/styles/withTheme";
|
||||||
|
import Buckets from "./Buckets/Buckets";
|
||||||
|
import Permissions from "./Permissions/Permissions";
|
||||||
|
import Dashboard from "./Dashboard/Dashboard";
|
||||||
|
import Menu from "./Menu";
|
||||||
|
import api from "../../common/api";
|
||||||
|
import storage from "local-storage-fallback";
|
||||||
|
import NotFoundPage from "../NotFoundPage";
|
||||||
|
import ServiceAccounts from "./ServiceAccounts/ServiceAccounts";
|
||||||
|
import Users from "./Users/Users";
|
||||||
|
|
||||||
|
function Copyright() {
|
||||||
|
return (
|
||||||
|
<Typography variant="body2" color="textSecondary" align="center">
|
||||||
|
{"Copyright © "}
|
||||||
|
<Link color="inherit" href="https://material-ui.com/">
|
||||||
|
MinIO
|
||||||
|
</Link>{" "}
|
||||||
|
{new Date().getFullYear()}
|
||||||
|
{"."}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const drawerWidth = 254;
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
root: {
|
||||||
|
display: "flex"
|
||||||
|
},
|
||||||
|
toolbar: {
|
||||||
|
background: theme.palette.background.default,
|
||||||
|
color: "black",
|
||||||
|
paddingRight: 24 // keep right padding when drawer closed
|
||||||
|
},
|
||||||
|
toolbarIcon: {
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "flex-end",
|
||||||
|
padding: "0 8px",
|
||||||
|
...theme.mixins.toolbar
|
||||||
|
},
|
||||||
|
appBar: {
|
||||||
|
zIndex: theme.zIndex.drawer + 1,
|
||||||
|
transition: theme.transitions.create(["width", "margin"], {
|
||||||
|
easing: theme.transitions.easing.sharp,
|
||||||
|
duration: theme.transitions.duration.leavingScreen
|
||||||
|
})
|
||||||
|
},
|
||||||
|
appBarShift: {
|
||||||
|
marginLeft: drawerWidth,
|
||||||
|
width: `calc(100% - ${drawerWidth}px)`,
|
||||||
|
transition: theme.transitions.create(["width", "margin"], {
|
||||||
|
easing: theme.transitions.easing.sharp,
|
||||||
|
duration: theme.transitions.duration.enteringScreen
|
||||||
|
})
|
||||||
|
},
|
||||||
|
menuButton: {
|
||||||
|
marginRight: 36
|
||||||
|
},
|
||||||
|
menuButtonHidden: {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
flexGrow: 1
|
||||||
|
},
|
||||||
|
drawerPaper: {
|
||||||
|
position: "relative",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
width: drawerWidth,
|
||||||
|
transition: theme.transitions.create("width", {
|
||||||
|
easing: theme.transitions.easing.sharp,
|
||||||
|
duration: theme.transitions.duration.enteringScreen
|
||||||
|
})
|
||||||
|
},
|
||||||
|
drawerPaperClose: {
|
||||||
|
overflowX: "hidden",
|
||||||
|
transition: theme.transitions.create("width", {
|
||||||
|
easing: theme.transitions.easing.sharp,
|
||||||
|
duration: theme.transitions.duration.leavingScreen
|
||||||
|
}),
|
||||||
|
width: theme.spacing(7),
|
||||||
|
[theme.breakpoints.up("sm")]: {
|
||||||
|
width: theme.spacing(9)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
appBarSpacer: {
|
||||||
|
height: "5px"
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
flexGrow: 1,
|
||||||
|
height: "100vh",
|
||||||
|
overflow: "auto"
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
paddingTop: theme.spacing(4),
|
||||||
|
paddingBottom: theme.spacing(4)
|
||||||
|
},
|
||||||
|
paper: {
|
||||||
|
padding: theme.spacing(2),
|
||||||
|
display: "flex",
|
||||||
|
overflow: "auto",
|
||||||
|
flexDirection: "column"
|
||||||
|
},
|
||||||
|
fixedHeight: {
|
||||||
|
minHeight: 240
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapState = (state: AppState) => ({
|
||||||
|
open: state.system.sidebarOpen
|
||||||
|
});
|
||||||
|
|
||||||
|
const connector = connect(mapState, { setMenuOpen });
|
||||||
|
|
||||||
|
interface ConsoleProps {
|
||||||
|
open: boolean;
|
||||||
|
title: string;
|
||||||
|
classes: any;
|
||||||
|
setMenuOpen: typeof setMenuOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Console extends React.Component<
|
||||||
|
ConsoleProps & RouteComponentProps & StyledProps & ThemedComponentProps
|
||||||
|
> {
|
||||||
|
componentDidMount(): void {
|
||||||
|
//TODO: verify the session is still valid
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes, open } = this.props;
|
||||||
|
return (
|
||||||
|
<div className={classes.root}>
|
||||||
|
<CssBaseline />
|
||||||
|
<Drawer
|
||||||
|
variant="permanent"
|
||||||
|
classes={{
|
||||||
|
paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)
|
||||||
|
}}
|
||||||
|
open={open}
|
||||||
|
>
|
||||||
|
{/*<div className={classes.toolbarIcon}>*/}
|
||||||
|
{/* <IconButton*/}
|
||||||
|
{/* onClick={() => {*/}
|
||||||
|
{/* this.props.setMenuOpen(false);*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/* >*/}
|
||||||
|
{/* <ChevronLeftIcon />*/}
|
||||||
|
{/* </IconButton>*/}
|
||||||
|
{/*</div>*/}
|
||||||
|
{/*<Divider />*/}
|
||||||
|
|
||||||
|
<Menu />
|
||||||
|
</Drawer>
|
||||||
|
|
||||||
|
<main className={classes.content}>
|
||||||
|
<div className={classes.appBarSpacer} />
|
||||||
|
<Container maxWidth="lg" className={classes.container}>
|
||||||
|
<Router history={history}>
|
||||||
|
<Switch>
|
||||||
|
<Route exact path="/buckets" component={Buckets} />
|
||||||
|
<Route exact path="/permissions" component={Permissions} />
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
path="/service_accounts"
|
||||||
|
component={ServiceAccounts}
|
||||||
|
/>
|
||||||
|
<Route exact path="/users" component={Users} />
|
||||||
|
<Route exact path="/dashboard" component={Dashboard} />
|
||||||
|
<Route exact path="/">
|
||||||
|
<Redirect to="/dashboard" />
|
||||||
|
</Route>
|
||||||
|
<Route component={NotFoundPage} />
|
||||||
|
</Switch>
|
||||||
|
</Router>
|
||||||
|
|
||||||
|
<Box pt={4}>
|
||||||
|
<Copyright />
|
||||||
|
</Box>
|
||||||
|
</Container>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// );
|
||||||
|
|
||||||
|
export default withRouter(connector(withStyles(styles)(Console)));
|
||||||
|
// export default withStyles(styles)(connector(Console));
|
||||||
|
// export default compose(
|
||||||
|
// withStyles(styles),
|
||||||
|
// connector
|
||||||
|
// )(withRouter(Console))
|
||||||
53
portal-ui/src/screens/Console/Dashboard/Chart.tsx
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import {useTheme} from '@material-ui/core/styles';
|
||||||
|
import {LineChart, Line, XAxis, YAxis, Label, ResponsiveContainer} from 'recharts';
|
||||||
|
import Title from "../../../common/Title";
|
||||||
|
|
||||||
|
// Generate Sales Data
|
||||||
|
function createData(time: string, amount: number) {
|
||||||
|
return {time, amount};
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = [
|
||||||
|
createData('00:00', 0),
|
||||||
|
createData('03:00', 300),
|
||||||
|
createData('06:00', 600),
|
||||||
|
createData('09:00', 800),
|
||||||
|
createData('12:00', 1500),
|
||||||
|
createData('15:00', 2000),
|
||||||
|
createData('18:00', 2400),
|
||||||
|
createData('21:00', 2400),
|
||||||
|
];
|
||||||
|
|
||||||
|
export default function Chart() {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Title>Today</Title>
|
||||||
|
<ResponsiveContainer>
|
||||||
|
<LineChart
|
||||||
|
data={data}
|
||||||
|
margin={{
|
||||||
|
top: 16,
|
||||||
|
right: 16,
|
||||||
|
bottom: 0,
|
||||||
|
left: 24,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<XAxis dataKey="time" stroke={theme.palette.text.secondary}/>
|
||||||
|
<YAxis stroke={theme.palette.text.secondary}>
|
||||||
|
<Label
|
||||||
|
angle={270}
|
||||||
|
position="left"
|
||||||
|
style={{textAnchor: 'middle', fill: theme.palette.text.primary}}
|
||||||
|
>
|
||||||
|
Sales ($)
|
||||||
|
</Label>
|
||||||
|
</YAxis>
|
||||||
|
<Line type="monotone" dataKey="amount" stroke={theme.palette.primary.main} dot={false}/>
|
||||||
|
</LineChart>
|
||||||
|
</ResponsiveContainer>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
245
portal-ui/src/screens/Console/Dashboard/Dashboard.tsx
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { makeStyles, useTheme } from "@material-ui/core/styles";
|
||||||
|
import clsx from "clsx";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import Paper from "@material-ui/core/Paper";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import {
|
||||||
|
CartesianGrid,
|
||||||
|
Line,
|
||||||
|
LineChart,
|
||||||
|
ResponsiveContainer,
|
||||||
|
Legend,
|
||||||
|
Tooltip,
|
||||||
|
XAxis,
|
||||||
|
YAxis
|
||||||
|
} from "recharts";
|
||||||
|
import NetworkCheckIcon from '@material-ui/icons/NetworkCheck';
|
||||||
|
import PieChartIcon from '@material-ui/icons/PieChart';
|
||||||
|
import ViewHeadlineIcon from '@material-ui/icons/ViewHeadline';
|
||||||
|
|
||||||
|
const useStyles = makeStyles(theme => ({
|
||||||
|
root: {
|
||||||
|
display: "flex"
|
||||||
|
},
|
||||||
|
toolbar: {
|
||||||
|
paddingRight: 24 // keep right padding when drawer closed
|
||||||
|
},
|
||||||
|
toolbarIcon: {
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "flex-end",
|
||||||
|
padding: "0 8px",
|
||||||
|
...theme.mixins.toolbar
|
||||||
|
},
|
||||||
|
appBar: {
|
||||||
|
zIndex: theme.zIndex.drawer + 1,
|
||||||
|
transition: theme.transitions.create(["width", "margin"], {
|
||||||
|
easing: theme.transitions.easing.sharp,
|
||||||
|
duration: theme.transitions.duration.leavingScreen
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
menuButton: {
|
||||||
|
marginRight: 36
|
||||||
|
},
|
||||||
|
menuButtonHidden: {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
flexGrow: 1
|
||||||
|
},
|
||||||
|
drawerPaperClose: {
|
||||||
|
overflowX: "hidden",
|
||||||
|
transition: theme.transitions.create("width", {
|
||||||
|
easing: theme.transitions.easing.sharp,
|
||||||
|
duration: theme.transitions.duration.leavingScreen
|
||||||
|
}),
|
||||||
|
width: theme.spacing(7),
|
||||||
|
[theme.breakpoints.up("sm")]: {
|
||||||
|
width: theme.spacing(9)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
appBarSpacer: theme.mixins.toolbar,
|
||||||
|
content: {
|
||||||
|
flexGrow: 1,
|
||||||
|
height: "100vh",
|
||||||
|
overflow: "auto"
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
paddingBottom: theme.spacing(4),
|
||||||
|
"& h6": {
|
||||||
|
color: "#777777",
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
"& p": {
|
||||||
|
"& span": {
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
paper: {
|
||||||
|
padding: theme.spacing(2),
|
||||||
|
display: "flex",
|
||||||
|
overflow: "auto",
|
||||||
|
flexDirection: "column"
|
||||||
|
},
|
||||||
|
fixedHeight: {
|
||||||
|
minHeight: 240,
|
||||||
|
},
|
||||||
|
consumptionValue: {
|
||||||
|
color: "#000000",
|
||||||
|
fontSize: "60px",
|
||||||
|
fontWeight: "bold",
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
marginRight: 10,
|
||||||
|
color: "#777777",
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
const theme = useTheme();
|
||||||
|
const classes = useStyles(theme);
|
||||||
|
const fixedHeightPaper = clsx(classes.paper, classes.fixedHeight);
|
||||||
|
|
||||||
|
const data = [39,31,37,29,28,31,31,34,39,40,35,40,24,25,30,20,28,38,23,28,22,39,37,37,40,28,28,28,24,31].map((usage, day ) => ({ usage, day }));
|
||||||
|
const data2 = [25,32,21,40,31,30,23,40,26,32].map((usage, day ) => ({ usage, day }));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Grid container xs={12}>
|
||||||
|
<Grid container xs={12} spacing={3} className={classes.container}>
|
||||||
|
<Grid item xs={12} md={4} lg={4}>
|
||||||
|
<Paper className={fixedHeightPaper}>
|
||||||
|
<Grid container direction="row" alignItems="center">
|
||||||
|
<Grid item className={classes.icon}>
|
||||||
|
<ViewHeadlineIcon/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item>
|
||||||
|
<Typography variant="h6">All Buckets</Typography>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Typography className={classes.consumptionValue}>238</Typography>
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} md={4} lg={4}>
|
||||||
|
<Paper className={fixedHeightPaper}>
|
||||||
|
<Grid container direction="row" alignItems="center">
|
||||||
|
<Grid item className={classes.icon}>
|
||||||
|
<PieChartIcon/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item>
|
||||||
|
<Typography variant="h6">Usage</Typography>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Typography className={classes.consumptionValue}>375<span>TB</span></Typography>
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} md={4} lg={4}>
|
||||||
|
<Paper className={fixedHeightPaper}>
|
||||||
|
<Grid container direction="row" alignItems="center">
|
||||||
|
<Grid item className={classes.icon}>
|
||||||
|
<NetworkCheckIcon/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item>
|
||||||
|
<Typography variant="h6"> Egress this Month</Typography>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Typography className={classes.consumptionValue}>1.5<span>TB</span></Typography>
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Grid container xs={12} spacing={3} className={classes.container}>
|
||||||
|
<Grid item xs={8}>
|
||||||
|
<Paper className={fixedHeightPaper}>
|
||||||
|
<Typography variant="h6">Daily Average Usage</Typography>
|
||||||
|
<ResponsiveContainer width="100%" height={400}>
|
||||||
|
<LineChart
|
||||||
|
data={data}
|
||||||
|
>
|
||||||
|
<CartesianGrid strokeDasharray="3 3" />
|
||||||
|
<XAxis
|
||||||
|
type="number"
|
||||||
|
domain={[1, 31]}
|
||||||
|
interval={0}
|
||||||
|
dataKey="day"
|
||||||
|
axisLine={false}
|
||||||
|
tickLine={false}
|
||||||
|
/>
|
||||||
|
<YAxis
|
||||||
|
dataKey="usage"
|
||||||
|
width={80}
|
||||||
|
tick={{ fill: "#737373" }}
|
||||||
|
dx={-5}
|
||||||
|
axisLine={false}
|
||||||
|
tickLine={false}
|
||||||
|
/>
|
||||||
|
<Tooltip />
|
||||||
|
<Legend />
|
||||||
|
<Line
|
||||||
|
strokeWidth={2}
|
||||||
|
yAxisId={0}
|
||||||
|
type="monotone"
|
||||||
|
dataKey="usage"
|
||||||
|
stroke="#8884d8"
|
||||||
|
activeDot={{ r: 8 }}
|
||||||
|
/>
|
||||||
|
</LineChart>
|
||||||
|
</ResponsiveContainer>
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={4}>
|
||||||
|
<Paper className={fixedHeightPaper}>
|
||||||
|
<Typography variant="h6">Daily Network Egress</Typography>
|
||||||
|
<ResponsiveContainer width="100%" height={400}>
|
||||||
|
<LineChart
|
||||||
|
data={data2}
|
||||||
|
>
|
||||||
|
<CartesianGrid strokeDasharray="3 3" />
|
||||||
|
<XAxis
|
||||||
|
type="number"
|
||||||
|
dataKey="day"
|
||||||
|
axisLine={false}
|
||||||
|
tickLine={false}
|
||||||
|
/>
|
||||||
|
<YAxis
|
||||||
|
dataKey="usage"
|
||||||
|
tick={{ fill: "#737373" }}
|
||||||
|
dx={-5}
|
||||||
|
axisLine={false}
|
||||||
|
tickLine={false}
|
||||||
|
/>
|
||||||
|
<Tooltip />
|
||||||
|
<Legend />
|
||||||
|
<Line
|
||||||
|
strokeWidth={2}
|
||||||
|
yAxisId={0}
|
||||||
|
type="monotone"
|
||||||
|
dataKey="usage"
|
||||||
|
stroke="#8884d8"
|
||||||
|
activeDot={{ r: 8 }}
|
||||||
|
/>
|
||||||
|
</LineChart>
|
||||||
|
</ResponsiveContainer>
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
}
|
||||||
35
portal-ui/src/screens/Console/Dashboard/Deposits.tsx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Link from '@material-ui/core/Link';
|
||||||
|
import {makeStyles} from '@material-ui/core/styles';
|
||||||
|
import Typography from '@material-ui/core/Typography';
|
||||||
|
import Title from "../../../common/Title";
|
||||||
|
|
||||||
|
function preventDefault(event: React.MouseEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
const useStyles = makeStyles({
|
||||||
|
depositContext: {
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default function Deposits() {
|
||||||
|
const classes = useStyles();
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Title>Recent Deposits</Title>
|
||||||
|
<Typography component="p" variant="h4">
|
||||||
|
$3,024.00
|
||||||
|
</Typography>
|
||||||
|
<Typography color="textSecondary" className={classes.depositContext}>
|
||||||
|
on 15 March, 2019
|
||||||
|
</Typography>
|
||||||
|
<div>
|
||||||
|
<Link color="primary" href="#" onClick={preventDefault}>
|
||||||
|
View balance
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
110
portal-ui/src/screens/Console/Dashboard/Orders.tsx
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
import * as React from "react";
|
||||||
|
import Link from "@material-ui/core/Link";
|
||||||
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
|
import Table from "@material-ui/core/Table";
|
||||||
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
import Title from "../../../common/Title";
|
||||||
|
|
||||||
|
// Generate Order Data
|
||||||
|
function createData(
|
||||||
|
id: number,
|
||||||
|
date: string,
|
||||||
|
name: string,
|
||||||
|
shipTo: string,
|
||||||
|
paymentMethod: string,
|
||||||
|
amount: number
|
||||||
|
) {
|
||||||
|
return { id, date, name, shipTo, paymentMethod, amount };
|
||||||
|
}
|
||||||
|
|
||||||
|
const rows = [
|
||||||
|
createData(
|
||||||
|
0,
|
||||||
|
"16 Mar, 2019",
|
||||||
|
"Elvis Presley",
|
||||||
|
"Tupelo, MS",
|
||||||
|
"VISA ⠀•••• 3719",
|
||||||
|
312.44
|
||||||
|
),
|
||||||
|
createData(
|
||||||
|
1,
|
||||||
|
"16 Mar, 2019",
|
||||||
|
"Paul McCartney",
|
||||||
|
"London, UK",
|
||||||
|
"VISA ⠀•••• 2574",
|
||||||
|
866.99
|
||||||
|
),
|
||||||
|
createData(
|
||||||
|
2,
|
||||||
|
"16 Mar, 2019",
|
||||||
|
"Tom Scholz",
|
||||||
|
"Boston, MA",
|
||||||
|
"MC ⠀•••• 1253",
|
||||||
|
100.81
|
||||||
|
),
|
||||||
|
createData(
|
||||||
|
3,
|
||||||
|
"16 Mar, 2019",
|
||||||
|
"Michael Jackson",
|
||||||
|
"Gary, IN",
|
||||||
|
"AMEX ⠀•••• 2000",
|
||||||
|
654.39
|
||||||
|
),
|
||||||
|
createData(
|
||||||
|
4,
|
||||||
|
"15 Mar, 2019",
|
||||||
|
"Bruce Springsteen",
|
||||||
|
"Long Branch, NJ",
|
||||||
|
"VISA ⠀•••• 5919",
|
||||||
|
212.79
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
function preventDefault(event: React.MouseEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
const useStyles = makeStyles(theme => ({
|
||||||
|
seeMore: {
|
||||||
|
marginTop: theme.spacing(3)
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
export default function Orders() {
|
||||||
|
const classes = useStyles();
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Title>Recent Orders</Title>
|
||||||
|
<Table size="small">
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>Date</TableCell>
|
||||||
|
<TableCell>Name</TableCell>
|
||||||
|
<TableCell>Ship To</TableCell>
|
||||||
|
<TableCell>Payment Method</TableCell>
|
||||||
|
<TableCell align="right">Sale Amount</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
{rows.map(row => (
|
||||||
|
<TableRow key={row.id}>
|
||||||
|
<TableCell>{row.date}</TableCell>
|
||||||
|
<TableCell>{row.name}</TableCell>
|
||||||
|
<TableCell>{row.shipTo}</TableCell>
|
||||||
|
<TableCell>{row.paymentMethod}</TableCell>
|
||||||
|
<TableCell align="right">{row.amount}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
))}
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
<div className={classes.seeMore}>
|
||||||
|
<Link color="primary" href="#" onClick={preventDefault}>
|
||||||
|
See more orders
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
155
portal-ui/src/screens/Console/Menu.tsx
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import ListItem from "@material-ui/core/ListItem";
|
||||||
|
import ListItemIcon from "@material-ui/core/ListItemIcon";
|
||||||
|
import ListItemText from "@material-ui/core/ListItemText";
|
||||||
|
import { NavLink } from "react-router-dom";
|
||||||
|
import { Divider, withStyles } from "@material-ui/core";
|
||||||
|
import { ExitToApp } from "@material-ui/icons";
|
||||||
|
import { AppState } from "../../store";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { userLoggedIn } from "../../actions";
|
||||||
|
import List from "@material-ui/core/List";
|
||||||
|
import storage from "local-storage-fallback";
|
||||||
|
import history from "../../history";
|
||||||
|
import logo from "../../icons/mkube_logo_temp.svg";
|
||||||
|
import {
|
||||||
|
BucketsIcon,
|
||||||
|
DashboardIcon,
|
||||||
|
PermissionIcon,
|
||||||
|
ServiceAccountIcon,
|
||||||
|
UsersIcon
|
||||||
|
} from "../../icons";
|
||||||
|
import { createStyles, Theme } from "@material-ui/core/styles";
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
logo: {
|
||||||
|
paddingTop: "42px",
|
||||||
|
marginBottom: "20px",
|
||||||
|
textAlign: "center",
|
||||||
|
"& img": {
|
||||||
|
width: "76px"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
menuList: {
|
||||||
|
"& .active": {
|
||||||
|
borderTopLeftRadius: "3px",
|
||||||
|
borderBottomLeftRadius: "3px",
|
||||||
|
color: "white",
|
||||||
|
background:
|
||||||
|
"transparent linear-gradient(90deg, #362585 0%, #362585 7%, #281B6F 39%, #1F1661 100%) 0% 0% no-repeat padding-box",
|
||||||
|
"& .MuiSvgIcon-root": {
|
||||||
|
color: "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"& .MuiListItem-root": {
|
||||||
|
marginTop: "16px"
|
||||||
|
},
|
||||||
|
paddingLeft: "30px",
|
||||||
|
"& .MuiSvgIcon-root": {
|
||||||
|
fontSize: "18px",
|
||||||
|
color: "#393939"
|
||||||
|
},
|
||||||
|
"& .MuiListItemIcon-root": {
|
||||||
|
minWidth: "40px"
|
||||||
|
},
|
||||||
|
"& .MuiTypography-root": {
|
||||||
|
fontSize: "14px"
|
||||||
|
},
|
||||||
|
"& .MuiListItem-gutters": {
|
||||||
|
paddingRight: "0px"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapState = (state: AppState) => ({
|
||||||
|
open: state.system.loggedIn
|
||||||
|
});
|
||||||
|
|
||||||
|
const connector = connect(mapState, { userLoggedIn });
|
||||||
|
|
||||||
|
interface MenuProps {
|
||||||
|
classes: any;
|
||||||
|
userLoggedIn: typeof userLoggedIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Menu extends React.Component<MenuProps> {
|
||||||
|
logout() {
|
||||||
|
storage.removeItem("token");
|
||||||
|
this.props.userLoggedIn(false);
|
||||||
|
history.push("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes } = this.props;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<div className={classes.logo}>
|
||||||
|
<img src={logo} alt="logo" />
|
||||||
|
</div>
|
||||||
|
<List className={classes.menuList}>
|
||||||
|
<ListItem button component={NavLink} to="/dashboard">
|
||||||
|
<ListItemIcon>
|
||||||
|
<DashboardIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Dashboard" />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button component={NavLink} to="/buckets">
|
||||||
|
<ListItemIcon>
|
||||||
|
<BucketsIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Buckets" />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button component={NavLink} to="/permissions">
|
||||||
|
<ListItemIcon>
|
||||||
|
<PermissionIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Permissions" />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button component={NavLink} to="/service_accounts">
|
||||||
|
<ListItemIcon>
|
||||||
|
<ServiceAccountIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Service Accounts" />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button component={NavLink} to="/users">
|
||||||
|
<ListItemIcon>
|
||||||
|
<UsersIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Users" />
|
||||||
|
</ListItem>
|
||||||
|
<Divider />
|
||||||
|
<ListItem
|
||||||
|
button
|
||||||
|
onClick={() => {
|
||||||
|
this.logout();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ListItemIcon>
|
||||||
|
<ExitToApp />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Logout" />
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default connector(withStyles(styles)(Menu));
|
||||||
609
portal-ui/src/screens/Console/Permissions/AddPermission.tsx
Normal file
@@ -0,0 +1,609 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogTitle,
|
||||||
|
FormControl,
|
||||||
|
FormControlLabel,
|
||||||
|
FormLabel,
|
||||||
|
InputLabel,
|
||||||
|
LinearProgress,
|
||||||
|
MenuItem,
|
||||||
|
Radio,
|
||||||
|
RadioGroup,
|
||||||
|
Select,
|
||||||
|
TextField
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import {
|
||||||
|
createStyles,
|
||||||
|
lighten,
|
||||||
|
makeStyles,
|
||||||
|
Theme,
|
||||||
|
withStyles
|
||||||
|
} from "@material-ui/core/styles";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
import clsx from "clsx";
|
||||||
|
import Table from "@material-ui/core/Table";
|
||||||
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
|
import TableContainer from "@material-ui/core/TableContainer";
|
||||||
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
import TablePagination from "@material-ui/core/TablePagination";
|
||||||
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
import Toolbar from "@material-ui/core/Toolbar";
|
||||||
|
import Checkbox from "@material-ui/core/Checkbox";
|
||||||
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
|
import Tooltip from "@material-ui/core/Tooltip";
|
||||||
|
import FilterListIcon from "@material-ui/icons/FilterList";
|
||||||
|
import { Bucket, BucketList } from "../Buckets/types";
|
||||||
|
import { Permission } from "./types";
|
||||||
|
|
||||||
|
const useToolbarStyles = makeStyles((theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
root: {
|
||||||
|
paddingLeft: theme.spacing(2),
|
||||||
|
paddingRight: theme.spacing(1)
|
||||||
|
},
|
||||||
|
highlight:
|
||||||
|
theme.palette.type === "light"
|
||||||
|
? {
|
||||||
|
color: theme.palette.secondary.main,
|
||||||
|
backgroundColor: lighten(theme.palette.secondary.light, 0.85)
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
backgroundColor: theme.palette.secondary.dark
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
flex: "1 1 100%"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
interface EnhancedTableToolbarProps {
|
||||||
|
numSelected: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const EnhancedTableToolbar = (props: EnhancedTableToolbarProps) => {
|
||||||
|
const classes = useToolbarStyles();
|
||||||
|
const { numSelected } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Toolbar
|
||||||
|
className={clsx(classes.root, {
|
||||||
|
[classes.highlight]: numSelected > 0
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{numSelected > 0 ? (
|
||||||
|
<Typography
|
||||||
|
className={classes.title}
|
||||||
|
color="inherit"
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
{numSelected} selected
|
||||||
|
</Typography>
|
||||||
|
) : (
|
||||||
|
<Typography className={classes.title} variant="h6" id="tableTitle">
|
||||||
|
Buckets
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
{numSelected > 0 ? (
|
||||||
|
<span />
|
||||||
|
) : (
|
||||||
|
<Tooltip title="Filter list">
|
||||||
|
<IconButton aria-label="filter list">
|
||||||
|
<FilterListIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
</Toolbar>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IAddPermissionContentProps {
|
||||||
|
classes: any;
|
||||||
|
open: boolean;
|
||||||
|
closeModalAndRefresh: () => void;
|
||||||
|
selectedPermission: Permission | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IAddPermissionContentState {
|
||||||
|
addLoading: boolean;
|
||||||
|
addError: string;
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
effect: string;
|
||||||
|
action: string;
|
||||||
|
rowsPerPage: number;
|
||||||
|
page: number;
|
||||||
|
resources: string[];
|
||||||
|
buckets: Bucket[];
|
||||||
|
bucketsError: string;
|
||||||
|
loadingBuckets: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddPermissionContent extends React.Component<
|
||||||
|
IAddPermissionContentProps,
|
||||||
|
IAddPermissionContentState
|
||||||
|
> {
|
||||||
|
state: IAddPermissionContentState = {
|
||||||
|
addLoading: false,
|
||||||
|
addError: "",
|
||||||
|
name: "",
|
||||||
|
description: "",
|
||||||
|
effect: "Allow",
|
||||||
|
action: "readwrite",
|
||||||
|
rowsPerPage: 5,
|
||||||
|
page: 0,
|
||||||
|
resources: [],
|
||||||
|
buckets: [],
|
||||||
|
bucketsError: "",
|
||||||
|
loadingBuckets: false
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
// load a list of buckets
|
||||||
|
this.setState({ loadingBuckets: true }, () => {
|
||||||
|
api
|
||||||
|
.invoke("GET", `/api/v1/buckets`)
|
||||||
|
.then((res: BucketList) => {
|
||||||
|
this.setState({
|
||||||
|
loadingBuckets: false,
|
||||||
|
buckets: res.buckets,
|
||||||
|
bucketsError: ""
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({ loadingBuckets: false, bucketsError: err });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const { selectedPermission } = this.props;
|
||||||
|
if (selectedPermission !== null) {
|
||||||
|
this.setState({
|
||||||
|
name: selectedPermission.name,
|
||||||
|
description: selectedPermission.description,
|
||||||
|
effect: selectedPermission.effect,
|
||||||
|
resources: selectedPermission.resources.map(r => r.bucket_name),
|
||||||
|
action: selectedPermission.actions[0].type
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
saveRecord(event: React.FormEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
const {
|
||||||
|
name,
|
||||||
|
addLoading,
|
||||||
|
resources,
|
||||||
|
description,
|
||||||
|
effect,
|
||||||
|
action
|
||||||
|
} = this.state;
|
||||||
|
const { selectedPermission } = this.props;
|
||||||
|
if (addLoading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ addLoading: true }, () => {
|
||||||
|
if (selectedPermission !== null) {
|
||||||
|
api
|
||||||
|
.invoke("PUT", `/api/v1/permissions/${selectedPermission.id}`, {
|
||||||
|
id: selectedPermission.id,
|
||||||
|
name: name,
|
||||||
|
description: description,
|
||||||
|
effect: effect,
|
||||||
|
resources: resources,
|
||||||
|
actions: [action]
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
addLoading: false,
|
||||||
|
addError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeModalAndRefresh();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
addLoading: false,
|
||||||
|
addError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
api
|
||||||
|
.invoke("POST", "/api/v1/permissions", {
|
||||||
|
name: name,
|
||||||
|
description: description,
|
||||||
|
effect: effect,
|
||||||
|
resources: resources,
|
||||||
|
actions: [action]
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
addLoading: false,
|
||||||
|
addError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeModalAndRefresh();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
addLoading: false,
|
||||||
|
addError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes, selectedPermission, open } = this.props;
|
||||||
|
const {
|
||||||
|
addLoading,
|
||||||
|
addError,
|
||||||
|
resources,
|
||||||
|
page,
|
||||||
|
rowsPerPage,
|
||||||
|
buckets,
|
||||||
|
name,
|
||||||
|
description,
|
||||||
|
effect,
|
||||||
|
action
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
const handleSelectAllClick = (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
if (event.target.checked) {
|
||||||
|
const newSelecteds = buckets.map(n => n.name);
|
||||||
|
this.setState({ resources: newSelecteds });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ resources: [] });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleClick = (event: React.MouseEvent<unknown>, name: string) => {
|
||||||
|
const selectedIndex = resources.indexOf(name);
|
||||||
|
let newSelected: string[] = [];
|
||||||
|
|
||||||
|
if (selectedIndex === -1) {
|
||||||
|
newSelected = newSelected.concat(resources, name);
|
||||||
|
} else if (selectedIndex === 0) {
|
||||||
|
newSelected = newSelected.concat(resources.slice(1));
|
||||||
|
} else if (selectedIndex === resources.length - 1) {
|
||||||
|
newSelected = newSelected.concat(resources.slice(0, -1));
|
||||||
|
} else if (selectedIndex > 0) {
|
||||||
|
newSelected = newSelected.concat(
|
||||||
|
resources.slice(0, selectedIndex),
|
||||||
|
resources.slice(selectedIndex + 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({ resources: newSelected });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangePage = (event: unknown, newPage: number) => {
|
||||||
|
this.setState({ page: newPage });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangeRowsPerPage = (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
this.setState({ page: 0, rowsPerPage: parseInt(event.target.value, 10) });
|
||||||
|
};
|
||||||
|
|
||||||
|
const isSelected = (name: string) => resources.indexOf(name) !== -1;
|
||||||
|
|
||||||
|
const emptyRows =
|
||||||
|
rowsPerPage - Math.min(rowsPerPage, buckets.length - page * rowsPerPage);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({ addError: "" }, () => {
|
||||||
|
this.props.closeModalAndRefresh();
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<DialogTitle id="alert-dialog-title">
|
||||||
|
{selectedPermission !== null ? (
|
||||||
|
<span>Edit Permission</span>
|
||||||
|
) : (
|
||||||
|
<span>Create Permission</span>
|
||||||
|
)}
|
||||||
|
</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
<form
|
||||||
|
noValidate
|
||||||
|
autoComplete="off"
|
||||||
|
onSubmit={(e: React.FormEvent<HTMLFormElement>) => {
|
||||||
|
this.saveRecord(e);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Grid container>
|
||||||
|
{addError !== "" && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
variant="body1"
|
||||||
|
className={classes.errorBlock}
|
||||||
|
>
|
||||||
|
{addError}
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<TextField
|
||||||
|
id="standard-basic"
|
||||||
|
fullWidth
|
||||||
|
label="Name"
|
||||||
|
value={name}
|
||||||
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
this.setState({ name: e.target.value });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<TextField
|
||||||
|
id="standard-multiline-static"
|
||||||
|
label="Description"
|
||||||
|
fullWidth
|
||||||
|
multiline
|
||||||
|
rows="4"
|
||||||
|
value={description}
|
||||||
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
this.setState({ description: e.target.value });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<FormControl className={classes.formControl} fullWidth>
|
||||||
|
<InputLabel id="select-effect">Effect</InputLabel>
|
||||||
|
<Select
|
||||||
|
labelId="select-effect"
|
||||||
|
id="select-effect"
|
||||||
|
value={effect}
|
||||||
|
onChange={(e: React.ChangeEvent<{ value: unknown }>) => {
|
||||||
|
this.setState({ effect: e.target.value as string });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MenuItem value="Allow">Allow</MenuItem>
|
||||||
|
<MenuItem value="Deny">Deny</MenuItem>
|
||||||
|
</Select>
|
||||||
|
</FormControl>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<div className={classes.root}>
|
||||||
|
<EnhancedTableToolbar numSelected={resources.length} />
|
||||||
|
<TableContainer>
|
||||||
|
<Table
|
||||||
|
className={classes.table}
|
||||||
|
aria-labelledby="tableTitle"
|
||||||
|
size={"small"}
|
||||||
|
aria-label="enhanced table"
|
||||||
|
>
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell padding="checkbox">
|
||||||
|
<Checkbox
|
||||||
|
indeterminate={
|
||||||
|
resources.length > 0 &&
|
||||||
|
resources.length < buckets.length
|
||||||
|
}
|
||||||
|
checked={
|
||||||
|
buckets.length > 0 &&
|
||||||
|
resources.length === buckets.length
|
||||||
|
}
|
||||||
|
onChange={handleSelectAllClick}
|
||||||
|
inputProps={{
|
||||||
|
"aria-label": "select all desserts"
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>Name</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
{buckets
|
||||||
|
.slice(
|
||||||
|
page * rowsPerPage,
|
||||||
|
page * rowsPerPage + rowsPerPage
|
||||||
|
)
|
||||||
|
.map((row, index) => {
|
||||||
|
const isItemSelected = isSelected(row.name);
|
||||||
|
const labelId = `enhanced-table-checkbox-${index}`;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TableRow
|
||||||
|
hover
|
||||||
|
onClick={event => handleClick(event, row.name)}
|
||||||
|
role="checkbox"
|
||||||
|
aria-checked={isItemSelected}
|
||||||
|
tabIndex={-1}
|
||||||
|
key={row.name}
|
||||||
|
selected={isItemSelected}
|
||||||
|
>
|
||||||
|
<TableCell padding="checkbox">
|
||||||
|
<Checkbox
|
||||||
|
checked={isItemSelected}
|
||||||
|
inputProps={{ "aria-labelledby": labelId }}
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell id={labelId}>{row.name}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
{emptyRows > 0 && (
|
||||||
|
<TableRow style={{ height: 33 * emptyRows }}>
|
||||||
|
<TableCell colSpan={6} />
|
||||||
|
</TableRow>
|
||||||
|
)}
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
|
<TablePagination
|
||||||
|
rowsPerPageOptions={[5, 10, 25]}
|
||||||
|
component="div"
|
||||||
|
count={buckets.length}
|
||||||
|
rowsPerPage={rowsPerPage}
|
||||||
|
page={page}
|
||||||
|
labelRowsPerPage={null}
|
||||||
|
onChangePage={handleChangePage}
|
||||||
|
onChangeRowsPerPage={handleChangeRowsPerPage}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<FormControl
|
||||||
|
component="fieldset"
|
||||||
|
className={classes.formControl}
|
||||||
|
>
|
||||||
|
<FormLabel component="legend">Action</FormLabel>
|
||||||
|
<RadioGroup
|
||||||
|
aria-label="action"
|
||||||
|
name="action"
|
||||||
|
value={action}
|
||||||
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
this.setState({
|
||||||
|
action: (event.target as HTMLInputElement).value
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<FormControlLabel
|
||||||
|
value="readwrite"
|
||||||
|
control={<Radio />}
|
||||||
|
label="All Actions"
|
||||||
|
/>
|
||||||
|
<FormControlLabel
|
||||||
|
value="read"
|
||||||
|
control={<Radio />}
|
||||||
|
label="Read Only"
|
||||||
|
/>
|
||||||
|
<FormControlLabel
|
||||||
|
value="write"
|
||||||
|
control={<Radio />}
|
||||||
|
label="Write Only"
|
||||||
|
/>
|
||||||
|
<FormControlLabel
|
||||||
|
value="trace"
|
||||||
|
control={<Radio />}
|
||||||
|
label="Trace"
|
||||||
|
/>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormControl>
|
||||||
|
</Grid>
|
||||||
|
{action === 'trace' && (
|
||||||
|
<React.Fragment>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
variant="body1"
|
||||||
|
className={classes.errorBlock}
|
||||||
|
>
|
||||||
|
Trace displays tracing information for all buckets.
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
</React.Fragment>
|
||||||
|
)}
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
fullWidth
|
||||||
|
disabled={addLoading}
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
{addLoading && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<LinearProgress />
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
</Grid>
|
||||||
|
</form>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddPermissionWrapper = withStyles(styles)(AddPermissionContent);
|
||||||
|
|
||||||
|
interface IAddPermissionProps {
|
||||||
|
open: boolean;
|
||||||
|
closeModalAndRefresh: () => void;
|
||||||
|
selectedPermission: Permission | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IAddPermissionState {}
|
||||||
|
|
||||||
|
class AddPermission extends React.Component<
|
||||||
|
IAddPermissionProps,
|
||||||
|
IAddPermissionState
|
||||||
|
> {
|
||||||
|
state: IAddPermissionState = {};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { open } = this.props;
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({ addError: "" }, () => {
|
||||||
|
this.props.closeModalAndRefresh();
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<AddPermissionWrapper {...this.props} />
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AddPermission;
|
||||||
159
portal-ui/src/screens/Console/Permissions/DeletePermission.tsx
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogActions,
|
||||||
|
DialogContent,
|
||||||
|
DialogContentText,
|
||||||
|
DialogTitle,
|
||||||
|
LinearProgress
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
import { Permission, PermissionList } from "./types";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IDeletePermissionProps {
|
||||||
|
classes: any;
|
||||||
|
closeDeleteModalAndRefresh: (refresh: boolean) => void;
|
||||||
|
deleteOpen: boolean;
|
||||||
|
selectedPermission: Permission | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IDeletePermissionState {
|
||||||
|
deleteLoading: boolean;
|
||||||
|
deleteError: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeletePermission extends React.Component<
|
||||||
|
IDeletePermissionProps,
|
||||||
|
IDeletePermissionState
|
||||||
|
> {
|
||||||
|
state: IDeletePermissionState = {
|
||||||
|
deleteLoading: false,
|
||||||
|
deleteError: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
removeRecord() {
|
||||||
|
const { deleteLoading } = this.state;
|
||||||
|
const { selectedPermission } = this.props;
|
||||||
|
if (deleteLoading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (selectedPermission == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ deleteLoading: true }, () => {
|
||||||
|
api
|
||||||
|
.invoke("DELETE", `/api/v1/permissions/${selectedPermission.id}`, {
|
||||||
|
id: selectedPermission.id
|
||||||
|
})
|
||||||
|
.then((res: PermissionList) => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
deleteLoading: false,
|
||||||
|
deleteError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeDeleteModalAndRefresh(true);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
deleteLoading: false,
|
||||||
|
deleteError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes, deleteOpen, selectedPermission } = this.props;
|
||||||
|
const { deleteLoading, deleteError } = this.state;
|
||||||
|
|
||||||
|
if (selectedPermission === null) {
|
||||||
|
return <div />;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
open={deleteOpen}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({ deleteError: "" }, () => {
|
||||||
|
this.props.closeDeleteModalAndRefresh(false);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<DialogTitle id="alert-dialog-title">Delete Permission</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
{deleteLoading && <LinearProgress />}
|
||||||
|
<DialogContentText id="alert-dialog-description">
|
||||||
|
Are you sure you want to delete permission{" "}<b>{selectedPermission.name}</b>?
|
||||||
|
{deleteError !== "" && (
|
||||||
|
<React.Fragment>
|
||||||
|
<br />
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
variant="body1"
|
||||||
|
className={classes.errorBlock}
|
||||||
|
>
|
||||||
|
{deleteError}
|
||||||
|
</Typography>
|
||||||
|
</React.Fragment>
|
||||||
|
)}
|
||||||
|
</DialogContentText>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
this.setState({ deleteError: "" }, () => {
|
||||||
|
this.props.closeDeleteModalAndRefresh(false);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
color="primary"
|
||||||
|
disabled={deleteLoading}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
this.removeRecord();
|
||||||
|
}}
|
||||||
|
color="secondary"
|
||||||
|
autoFocus
|
||||||
|
>
|
||||||
|
Delete
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withStyles(styles)(DeletePermission);
|
||||||
401
portal-ui/src/screens/Console/Permissions/Permissions.tsx
Normal file
@@ -0,0 +1,401 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
||||||
|
import Table from "@material-ui/core/Table";
|
||||||
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
import Paper from "@material-ui/core/Paper";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
IconButton,
|
||||||
|
LinearProgress,
|
||||||
|
TableFooter,
|
||||||
|
TablePagination
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import DeleteIcon from "@material-ui/icons/Delete";
|
||||||
|
import { Permission, PermissionList } from "./types";
|
||||||
|
import AddPermission from "./AddPermission";
|
||||||
|
import DeletePermission from "./DeletePermission";
|
||||||
|
import { MinTablePaginationActions } from "../../../common/MinTablePaginationActions";
|
||||||
|
import EditIcon from "@material-ui/icons/Edit";
|
||||||
|
import Checkbox from "@material-ui/core/Checkbox";
|
||||||
|
import { CreateIcon } from "../../../icons";
|
||||||
|
import TextField from '@material-ui/core/TextField';
|
||||||
|
import InputBase from '@material-ui/core/InputBase';
|
||||||
|
import SearchIcon from '@material-ui/icons/Search';
|
||||||
|
import InputAdornment from '@material-ui/core/InputAdornment';
|
||||||
|
import PlayArrowRoundedIcon from "@material-ui/icons/PlayArrowRounded";
|
||||||
|
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
seeMore: {
|
||||||
|
marginTop: theme.spacing(3)
|
||||||
|
},
|
||||||
|
paper: {
|
||||||
|
display: "flex",
|
||||||
|
overflow: "auto",
|
||||||
|
flexDirection: "column"
|
||||||
|
},
|
||||||
|
addSideBar: {
|
||||||
|
width: "320px",
|
||||||
|
padding: "20px"
|
||||||
|
},
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
},
|
||||||
|
tableToolbar: {
|
||||||
|
paddingLeft: theme.spacing(2),
|
||||||
|
paddingRight: theme.spacing(0)
|
||||||
|
},
|
||||||
|
wrapCell: {
|
||||||
|
maxWidth: "200px",
|
||||||
|
whiteSpace: "normal",
|
||||||
|
wordWrap: "break-word"
|
||||||
|
},
|
||||||
|
minTableHeader: {
|
||||||
|
color: "#393939",
|
||||||
|
"& tr": {
|
||||||
|
"& th": {
|
||||||
|
fontWeight: "bold"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actionsTray: {
|
||||||
|
textAlign: "right",
|
||||||
|
"& button": {
|
||||||
|
marginLeft: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
searchField: {
|
||||||
|
background: "#FFFFFF",
|
||||||
|
padding: 12,
|
||||||
|
borderRadius: 5,
|
||||||
|
boxShadow: "0px 3px 6px #00000012",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IPermissionsProps {
|
||||||
|
classes: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IPermissionsState {
|
||||||
|
records: Permission[];
|
||||||
|
totalRecords: number;
|
||||||
|
loading: boolean;
|
||||||
|
error: string;
|
||||||
|
deleteError: string;
|
||||||
|
addScreenOpen: boolean;
|
||||||
|
page: number;
|
||||||
|
rowsPerPage: number;
|
||||||
|
deleteOpen: boolean;
|
||||||
|
selectedPermission: Permission | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Permissions extends React.Component<
|
||||||
|
IPermissionsProps,
|
||||||
|
IPermissionsState
|
||||||
|
> {
|
||||||
|
state: IPermissionsState = {
|
||||||
|
records: [],
|
||||||
|
totalRecords: 0,
|
||||||
|
loading: false,
|
||||||
|
error: "",
|
||||||
|
deleteError: "",
|
||||||
|
addScreenOpen: false,
|
||||||
|
page: 0,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
deleteOpen: false,
|
||||||
|
selectedPermission: null
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchRecords() {
|
||||||
|
this.setState({ loading: true }, () => {
|
||||||
|
const { page, rowsPerPage } = this.state;
|
||||||
|
const offset = page * rowsPerPage;
|
||||||
|
api
|
||||||
|
.invoke(
|
||||||
|
"GET",
|
||||||
|
`/api/v1/permissions?offset=${offset}&limit=${rowsPerPage}`
|
||||||
|
)
|
||||||
|
.then((res: PermissionList) => {
|
||||||
|
this.setState({
|
||||||
|
loading: false,
|
||||||
|
records: res.permissions,
|
||||||
|
totalRecords: res.total,
|
||||||
|
error: ""
|
||||||
|
});
|
||||||
|
// if we get 0 results, and page > 0 , go down 1 page
|
||||||
|
if (
|
||||||
|
(res.permissions === undefined ||
|
||||||
|
res.permissions == null ||
|
||||||
|
res.permissions.length === 0) &&
|
||||||
|
page > 0
|
||||||
|
) {
|
||||||
|
const newPage = page - 1;
|
||||||
|
this.setState({ page: newPage }, () => {
|
||||||
|
this.fetchRecords();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({ loading: false, error: err });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
closeAddModalAndRefresh() {
|
||||||
|
this.setState({ addScreenOpen: false, selectedPermission: null }, () => {
|
||||||
|
this.fetchRecords();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
closeDeleteModalAndRefresh(refresh: boolean) {
|
||||||
|
this.setState({ deleteOpen: false }, () => {
|
||||||
|
if (refresh) {
|
||||||
|
this.fetchRecords();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
this.fetchRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes } = this.props;
|
||||||
|
const {
|
||||||
|
records,
|
||||||
|
totalRecords,
|
||||||
|
addScreenOpen,
|
||||||
|
loading,
|
||||||
|
page,
|
||||||
|
rowsPerPage,
|
||||||
|
deleteOpen,
|
||||||
|
selectedPermission
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
const handleChangePage = (event: unknown, newPage: number) => {
|
||||||
|
this.setState({ page: newPage }, () => {
|
||||||
|
this.fetchRecords();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangeRowsPerPage = (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
const rPP = parseInt(event.target.value, 10);
|
||||||
|
this.setState({ page: 0, rowsPerPage: rPP }, () => {
|
||||||
|
this.fetchRecords();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const confirmDeletePermission = (selectedPermission: Permission) => {
|
||||||
|
this.setState({
|
||||||
|
deleteOpen: true,
|
||||||
|
selectedPermission: selectedPermission
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const editPermission = (selectedPermission: Permission) => {
|
||||||
|
this.setState({
|
||||||
|
addScreenOpen: true,
|
||||||
|
selectedPermission: selectedPermission
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const actionLabel = (action: string) => {
|
||||||
|
switch (action) {
|
||||||
|
case "readwrite":
|
||||||
|
return "All Actions";
|
||||||
|
case "read":
|
||||||
|
return "Read Only";
|
||||||
|
case "write":
|
||||||
|
return "Write Only";
|
||||||
|
case "trace":
|
||||||
|
return "Tracing";
|
||||||
|
default:
|
||||||
|
return "n/a";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
|
||||||
|
<AddPermission
|
||||||
|
open={addScreenOpen}
|
||||||
|
selectedPermission={selectedPermission}
|
||||||
|
closeModalAndRefresh={() => {
|
||||||
|
this.closeAddModalAndRefresh();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Grid container>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography variant="h6">Permissions</Typography>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} className={classes.actionsTray}>
|
||||||
|
<TextField
|
||||||
|
placeholder="Search Permissions"
|
||||||
|
className={classes.searchField}
|
||||||
|
id="search-resource"
|
||||||
|
label=""
|
||||||
|
InputProps={{
|
||||||
|
disableUnderline: true,
|
||||||
|
startAdornment: (
|
||||||
|
<InputAdornment position="start">
|
||||||
|
<SearchIcon />
|
||||||
|
</InputAdornment>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
startIcon={<CreateIcon />}
|
||||||
|
onClick={() => {
|
||||||
|
this.setState({
|
||||||
|
addScreenOpen: true,
|
||||||
|
selectedPermission: null
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Create Permission
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
startIcon={<PlayArrowRoundedIcon />}
|
||||||
|
onClick={() => {
|
||||||
|
this.setState({
|
||||||
|
addScreenOpen: true
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Assign Permissions
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Paper className={classes.paper}>
|
||||||
|
{loading && <LinearProgress />}
|
||||||
|
{records != null && records.length > 0 ? (
|
||||||
|
<Table size="medium">
|
||||||
|
<TableHead className={classes.minTableHeader}>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>Select</TableCell>
|
||||||
|
<TableCell>Name</TableCell>
|
||||||
|
<TableCell>Description</TableCell>
|
||||||
|
<TableCell>Effect</TableCell>
|
||||||
|
<TableCell>Resources</TableCell>
|
||||||
|
<TableCell>Action</TableCell>
|
||||||
|
<TableCell align="right"></TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
{records.map(row => (
|
||||||
|
<TableRow key={row.name}>
|
||||||
|
<TableCell padding="checkbox">
|
||||||
|
<Checkbox
|
||||||
|
value="secondary"
|
||||||
|
color="primary"
|
||||||
|
inputProps={{ 'aria-label': 'secondary checkbox' }}
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className={classes.wrapCell}>
|
||||||
|
{row.name}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className={classes.wrapCell}>
|
||||||
|
{row.description}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>{row.effect}</TableCell>
|
||||||
|
<TableCell className={classes.wrapCell}>
|
||||||
|
{row.resources.map(r => r.bucket_name).join(", ")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{actionLabel(row.actions[0].type)}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell align="right">
|
||||||
|
<IconButton
|
||||||
|
aria-label="edit"
|
||||||
|
onClick={() => {
|
||||||
|
editPermission(row);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<EditIcon />
|
||||||
|
</IconButton>
|
||||||
|
<IconButton
|
||||||
|
aria-label="delete"
|
||||||
|
onClick={() => {
|
||||||
|
confirmDeletePermission(row);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DeleteIcon />
|
||||||
|
</IconButton>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
))}
|
||||||
|
</TableBody>
|
||||||
|
<TableFooter>
|
||||||
|
<TableRow>
|
||||||
|
<TablePagination
|
||||||
|
rowsPerPageOptions={[5, 10, 25]}
|
||||||
|
colSpan={6}
|
||||||
|
count={totalRecords}
|
||||||
|
rowsPerPage={rowsPerPage}
|
||||||
|
page={page}
|
||||||
|
SelectProps={{
|
||||||
|
inputProps: { "aria-label": "rows per page" },
|
||||||
|
native: true
|
||||||
|
}}
|
||||||
|
onChangePage={handleChangePage}
|
||||||
|
onChangeRowsPerPage={handleChangeRowsPerPage}
|
||||||
|
ActionsComponent={MinTablePaginationActions}
|
||||||
|
/>
|
||||||
|
</TableRow>
|
||||||
|
</TableFooter>
|
||||||
|
</Table>
|
||||||
|
) : (
|
||||||
|
<div>No Permissions</div>
|
||||||
|
)}
|
||||||
|
</Paper>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<DeletePermission
|
||||||
|
deleteOpen={deleteOpen}
|
||||||
|
selectedPermission={selectedPermission}
|
||||||
|
closeDeleteModalAndRefresh={(refresh: boolean) => {
|
||||||
|
this.closeDeleteModalAndRefresh(refresh);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withStyles(styles)(Permissions);
|
||||||
30
portal-ui/src/screens/Console/Permissions/types.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
export interface Permission {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
slug: string;
|
||||||
|
description: string;
|
||||||
|
effect: string;
|
||||||
|
resources: any[];
|
||||||
|
actions: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PermissionList {
|
||||||
|
permissions: Permission[];
|
||||||
|
total:number;
|
||||||
|
}
|
||||||
@@ -0,0 +1,555 @@
|
|||||||
|
// This file is part of MinIO Kubernetes Cloud
|
||||||
|
// Copyright (c) 2019 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/>.
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogTitle,
|
||||||
|
FormControlLabel,
|
||||||
|
LinearProgress,
|
||||||
|
TextField
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import {
|
||||||
|
createStyles,
|
||||||
|
lighten,
|
||||||
|
makeStyles,
|
||||||
|
Theme,
|
||||||
|
withStyles
|
||||||
|
} from "@material-ui/core/styles";
|
||||||
|
import api from "../../../common/api";
|
||||||
|
import clsx from "clsx";
|
||||||
|
import Table from "@material-ui/core/Table";
|
||||||
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
|
import TableContainer from "@material-ui/core/TableContainer";
|
||||||
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
import TablePagination from "@material-ui/core/TablePagination";
|
||||||
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
import Toolbar from "@material-ui/core/Toolbar";
|
||||||
|
import Checkbox from "@material-ui/core/Checkbox";
|
||||||
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
|
import Tooltip from "@material-ui/core/Tooltip";
|
||||||
|
import FilterListIcon from "@material-ui/icons/FilterList";
|
||||||
|
import { Permission, PermissionList } from "../Permissions/types";
|
||||||
|
import {
|
||||||
|
NewServiceAccount,
|
||||||
|
ServiceAccount,
|
||||||
|
ServiceAccountDetails
|
||||||
|
} from "./types";
|
||||||
|
import Switch from "@material-ui/core/Switch";
|
||||||
|
|
||||||
|
const useToolbarStyles = makeStyles((theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
root: {
|
||||||
|
paddingLeft: theme.spacing(2),
|
||||||
|
paddingRight: theme.spacing(1)
|
||||||
|
},
|
||||||
|
highlight:
|
||||||
|
theme.palette.type === "light"
|
||||||
|
? {
|
||||||
|
color: theme.palette.secondary.main,
|
||||||
|
backgroundColor: lighten(theme.palette.secondary.light, 0.85)
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
backgroundColor: theme.palette.secondary.dark
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
flex: "1 1 100%"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
interface EnhancedTableToolbarProps {
|
||||||
|
numSelected: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const EnhancedTableToolbar = (props: EnhancedTableToolbarProps) => {
|
||||||
|
const classes = useToolbarStyles();
|
||||||
|
const { numSelected } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Toolbar
|
||||||
|
className={clsx(classes.root, {
|
||||||
|
[classes.highlight]: numSelected > 0
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{numSelected > 0 ? (
|
||||||
|
<Typography
|
||||||
|
className={classes.title}
|
||||||
|
color="inherit"
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
{numSelected} selected
|
||||||
|
</Typography>
|
||||||
|
) : (
|
||||||
|
<Typography className={classes.title} variant="h6" id="tableTitle">
|
||||||
|
Permissions
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
{numSelected > 0 ? (
|
||||||
|
<span />
|
||||||
|
) : (
|
||||||
|
<Tooltip title="Filter list">
|
||||||
|
<IconButton aria-label="filter list">
|
||||||
|
<FilterListIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
</Toolbar>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = (theme: Theme) =>
|
||||||
|
createStyles({
|
||||||
|
errorBlock: {
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interface IAddServiceAccountContentProps {
|
||||||
|
classes: any;
|
||||||
|
open: boolean;
|
||||||
|
closeModalAndRefresh: (res: NewServiceAccount | null) => void;
|
||||||
|
selectedServiceAccount: ServiceAccount | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IAddServiceAccountContentState {
|
||||||
|
addLoading: boolean;
|
||||||
|
addError: string;
|
||||||
|
name: string;
|
||||||
|
enabled: boolean;
|
||||||
|
selectedPermissions: Permission[];
|
||||||
|
rowsPerPage: number;
|
||||||
|
page: number;
|
||||||
|
permissions: Permission[];
|
||||||
|
permissionsError: string;
|
||||||
|
loadingPermissions: boolean;
|
||||||
|
loadingServiceAccount: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddServiceAccountContent extends React.Component<
|
||||||
|
IAddServiceAccountContentProps,
|
||||||
|
IAddServiceAccountContentState
|
||||||
|
> {
|
||||||
|
state: IAddServiceAccountContentState = {
|
||||||
|
addLoading: false,
|
||||||
|
addError: "",
|
||||||
|
name: "",
|
||||||
|
enabled: true,
|
||||||
|
selectedPermissions: [],
|
||||||
|
rowsPerPage: 5,
|
||||||
|
page: 0,
|
||||||
|
permissions: [],
|
||||||
|
permissionsError: "",
|
||||||
|
loadingPermissions: false,
|
||||||
|
loadingServiceAccount: false
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
// load a list of permissions
|
||||||
|
this.setState({ loadingPermissions: true }, () => {
|
||||||
|
api
|
||||||
|
.invoke("GET", `/api/v1/permissions?limit=1000`)
|
||||||
|
.then((res: PermissionList) => {
|
||||||
|
this.setState({
|
||||||
|
loadingPermissions: false,
|
||||||
|
permissions: res.permissions,
|
||||||
|
permissionsError: ""
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({ loadingPermissions: false, permissionsError: err });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const { selectedServiceAccount } = this.props;
|
||||||
|
if (selectedServiceAccount !== null) {
|
||||||
|
this.setState({ loadingServiceAccount: true }, () => {
|
||||||
|
api
|
||||||
|
.invoke(
|
||||||
|
"GET",
|
||||||
|
`/api/v1/service_accounts/${selectedServiceAccount.id}`
|
||||||
|
)
|
||||||
|
.then((res: ServiceAccountDetails) => {
|
||||||
|
console.log(res);
|
||||||
|
this.setState({
|
||||||
|
loadingServiceAccount: false,
|
||||||
|
name: selectedServiceAccount.name,
|
||||||
|
enabled: selectedServiceAccount.enabled,
|
||||||
|
selectedPermissions:
|
||||||
|
res.permissions === undefined || res.permissions === null
|
||||||
|
? []
|
||||||
|
: res.permissions
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({ loadingServiceAccount: false });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
saveRecord(event: React.FormEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
const { name, addLoading, selectedPermissions,enabled } = this.state;
|
||||||
|
const { selectedServiceAccount } = this.props;
|
||||||
|
if (addLoading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ addLoading: true }, () => {
|
||||||
|
if (selectedServiceAccount !== null) {
|
||||||
|
api
|
||||||
|
.invoke(
|
||||||
|
"PUT",
|
||||||
|
`/api/v1/service_accounts/${selectedServiceAccount.id}`,
|
||||||
|
{
|
||||||
|
id: selectedServiceAccount.id,
|
||||||
|
name: name,
|
||||||
|
enabled: enabled,
|
||||||
|
permission_ids: selectedPermissions.map(p => p.id)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(res => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
addLoading: false,
|
||||||
|
addError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeModalAndRefresh(null);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
addLoading: false,
|
||||||
|
addError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
api
|
||||||
|
.invoke("POST", "/api/v1/service_accounts", {
|
||||||
|
name: name,
|
||||||
|
permission_ids: selectedPermissions.map(p => p.id)
|
||||||
|
})
|
||||||
|
.then((res: NewServiceAccount) => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
addLoading: false,
|
||||||
|
addError: ""
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.props.closeModalAndRefresh(res);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.setState({
|
||||||
|
addLoading: false,
|
||||||
|
addError: err
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { classes, selectedServiceAccount } = this.props;
|
||||||
|
const {
|
||||||
|
addLoading,
|
||||||
|
addError,
|
||||||
|
page,
|
||||||
|
rowsPerPage,
|
||||||
|
permissions,
|
||||||
|
selectedPermissions,
|
||||||
|
name,
|
||||||
|
loadingServiceAccount
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
const handleSelectAllClick = (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
if (event.target.checked) {
|
||||||
|
// const newSelecteds = permissions.map(n => n.name);
|
||||||
|
const newSelecteds = [...permissions];
|
||||||
|
this.setState({ selectedPermissions: newSelecteds });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ selectedPermissions: [] });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleClick = (
|
||||||
|
event: React.MouseEvent<unknown>,
|
||||||
|
perm: Permission
|
||||||
|
) => {
|
||||||
|
let newSelected: Permission[] = [...selectedPermissions];
|
||||||
|
if (newSelected.filter(p => p.id === perm.id).length === 0) {
|
||||||
|
newSelected.push(perm);
|
||||||
|
} else {
|
||||||
|
let selectedIndex = -1;
|
||||||
|
for (let i = 0; i < newSelected.length; i++) {
|
||||||
|
if (newSelected[i].id === perm.id) {
|
||||||
|
selectedIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (selectedIndex >= 0) {
|
||||||
|
newSelected = [
|
||||||
|
...newSelected.slice(0, selectedIndex),
|
||||||
|
...newSelected.slice(selectedIndex + 1)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({ selectedPermissions: newSelected });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangePage = (event: unknown, newPage: number) => {
|
||||||
|
this.setState({ page: newPage });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangeRowsPerPage = (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
this.setState({ page: 0, rowsPerPage: parseInt(event.target.value, 10) });
|
||||||
|
};
|
||||||
|
|
||||||
|
const isSelected = (perm: Permission) =>
|
||||||
|
selectedPermissions.filter(p => p.id === perm.id).length > 0;
|
||||||
|
|
||||||
|
const emptyRows =
|
||||||
|
rowsPerPage -
|
||||||
|
Math.min(rowsPerPage, permissions.length - page * rowsPerPage);
|
||||||
|
|
||||||
|
const handleChange = (name: string) => (
|
||||||
|
event: React.ChangeEvent<HTMLInputElement>
|
||||||
|
) => {
|
||||||
|
this.setState({enabled:event.target.checked})
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<DialogTitle id="alert-dialog-title">
|
||||||
|
{selectedServiceAccount !== null ? (
|
||||||
|
<span>Edit Service Account</span>
|
||||||
|
) : (
|
||||||
|
<span>Create Service Account</span>
|
||||||
|
)}
|
||||||
|
</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
<form
|
||||||
|
noValidate
|
||||||
|
autoComplete="off"
|
||||||
|
onSubmit={(e: React.FormEvent<HTMLFormElement>) => {
|
||||||
|
this.saveRecord(e);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Grid container>
|
||||||
|
{loadingServiceAccount && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<LinearProgress />
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
{addError !== "" && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography
|
||||||
|
component="p"
|
||||||
|
variant="body1"
|
||||||
|
className={classes.errorBlock}
|
||||||
|
>
|
||||||
|
{addError}
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<TextField
|
||||||
|
id="standard-basic"
|
||||||
|
fullWidth
|
||||||
|
label="Name"
|
||||||
|
value={name}
|
||||||
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
this.setState({ name: e.target.value });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<div className={classes.root}>
|
||||||
|
<EnhancedTableToolbar
|
||||||
|
numSelected={selectedPermissions.length}
|
||||||
|
/>
|
||||||
|
<TableContainer>
|
||||||
|
<Table
|
||||||
|
className={classes.table}
|
||||||
|
aria-labelledby="tableTitle"
|
||||||
|
size={"small"}
|
||||||
|
aria-label="enhanced table"
|
||||||
|
>
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell padding="checkbox">
|
||||||
|
<Checkbox
|
||||||
|
indeterminate={
|
||||||
|
selectedPermissions.length > 0 &&
|
||||||
|
selectedPermissions.length < permissions.length
|
||||||
|
}
|
||||||
|
checked={
|
||||||
|
selectedPermissions.length > 0 &&
|
||||||
|
selectedPermissions.length ===
|
||||||
|
permissions.length
|
||||||
|
}
|
||||||
|
onChange={handleSelectAllClick}
|
||||||
|
inputProps={{
|
||||||
|
"aria-label": "select all desserts"
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>Permission</TableCell>
|
||||||
|
<TableCell>Description</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
{permissions
|
||||||
|
.slice(
|
||||||
|
page * rowsPerPage,
|
||||||
|
page * rowsPerPage + rowsPerPage
|
||||||
|
)
|
||||||
|
.map((row, index) => {
|
||||||
|
const isItemSelected = isSelected(row);
|
||||||
|
const labelId = `enhanced-table-checkbox-${index}`;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TableRow
|
||||||
|
hover
|
||||||
|
onClick={event => handleClick(event, row)}
|
||||||
|
role="checkbox"
|
||||||
|
aria-checked={isItemSelected}
|
||||||
|
tabIndex={-1}
|
||||||
|
key={row.name}
|
||||||
|
selected={isItemSelected}
|
||||||
|
>
|
||||||
|
<TableCell padding="checkbox">
|
||||||
|
<Checkbox
|
||||||
|
checked={isItemSelected}
|
||||||
|
inputProps={{ "aria-labelledby": labelId }}
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell id={labelId}>{row.name}</TableCell>
|
||||||
|
<TableCell>{row.description}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
{emptyRows > 0 && (
|
||||||
|
<TableRow style={{ height: 33 * emptyRows }}>
|
||||||
|
<TableCell colSpan={6} />
|
||||||
|
</TableRow>
|
||||||
|
)}
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
|
<TablePagination
|
||||||
|
rowsPerPageOptions={[5, 10, 25]}
|
||||||
|
component="div"
|
||||||
|
count={permissions.length}
|
||||||
|
rowsPerPage={rowsPerPage}
|
||||||
|
page={page}
|
||||||
|
labelRowsPerPage={null}
|
||||||
|
onChangePage={handleChangePage}
|
||||||
|
onChangeRowsPerPage={handleChangeRowsPerPage}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<FormControlLabel
|
||||||
|
control={
|
||||||
|
<Switch
|
||||||
|
onChange={handleChange("enabled")}
|
||||||
|
value="checkedA"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
label="Enabled"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<br />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
disabled={addLoading}
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
{addLoading && (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<LinearProgress />
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
</Grid>
|
||||||
|
</form>
|
||||||
|
</DialogContent>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddServiceAccountWrapper = withStyles(styles)(AddServiceAccountContent);
|
||||||
|
|
||||||
|
interface IAddServiceAccountProps {
|
||||||
|
open: boolean;
|
||||||
|
closeModalAndRefresh: (res: NewServiceAccount | null) => void;
|
||||||
|
selectedServiceAccount: ServiceAccount | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IAddServiceAccountState {}
|
||||||
|
|
||||||
|
class AddServiceAccount extends React.Component<
|
||||||
|
IAddServiceAccountProps,
|
||||||
|
IAddServiceAccountState
|
||||||
|
> {
|
||||||
|
state: IAddServiceAccountState = {};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { open } = this.props;
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({ addError: "" }, () => {
|
||||||
|
this.props.closeModalAndRefresh(null);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
aria-labelledby="alert-dialog-title"
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<AddServiceAccountWrapper {...this.props} />
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AddServiceAccount;
|
||||||