From f316d9892628b05fec4b34f27a98e93f1b1edab4 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Mon, 1 Jun 2020 00:57:45 +0300 Subject: [PATCH 01/16] update deps --- src/go.mod | 23 ++++++++++-------- src/go.sum | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 10 deletions(-) diff --git a/src/go.mod b/src/go.mod index b799658..36825b7 100644 --- a/src/go.mod +++ b/src/go.mod @@ -8,6 +8,7 @@ require ( github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/go-check/check v0.0.0-20200227125254-8fa46927fb4f // indirect github.com/golang/protobuf v1.4.2 // indirect + github.com/google/go-cmp v0.4.1 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/gorilla/securecookie v1.1.1 @@ -19,17 +20,17 @@ require ( github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect github.com/kataras/golog v0.0.15 // indirect github.com/kataras/iris/v12 v12.1.8 - github.com/klauspost/compress v1.10.5 // indirect + github.com/klauspost/compress v1.10.6 // indirect github.com/kr/text v0.2.0 // indirect - github.com/markbates/goth v1.64.0 + github.com/markbates/goth v1.64.1 github.com/mattn/go-colorable v0.1.6 // indirect - github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c - github.com/minio/minio-go/v6 v6.0.55 + github.com/minio/hdfs/v3 v3.0.1 // indirect + github.com/minio/minio v0.0.0-20200530205631-8befedef14d7 + github.com/minio/minio-go/v6 v6.0.56 github.com/montanaflynn/stats v0.6.3 // indirect github.com/moul/http2curl v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/onsi/ginkgo v1.12.0 // indirect - github.com/onsi/gomega v1.10.0 // indirect + github.com/onsi/ginkgo v1.12.2 // indirect github.com/prometheus/client_golang v1.6.0 github.com/prometheus/common v0.10.0 // indirect github.com/rzrbld/goth-provider-wso2 v0.0.0-20200321130802-e588ec0a9128 @@ -39,7 +40,8 @@ require ( github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/smartystreets/assertions v1.1.0 // indirect github.com/smartystreets/goconvey v1.6.4 // indirect - github.com/valyala/fasthttp v1.12.0 // indirect + github.com/stretchr/testify v1.6.0 // indirect + github.com/valyala/fasthttp v1.13.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect @@ -47,11 +49,12 @@ require ( github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect - golang.org/x/net v0.0.0-20200513185701-a91f0712d120 // indirect - golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 // indirect + golang.org/x/net v0.0.0-20200528225125-3c3fba18258b // indirect + golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect google.golang.org/appengine v1.6.6 // indirect + google.golang.org/protobuf v1.24.0 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect - gopkg.in/ini.v1 v1.56.0 // indirect + gopkg.in/ini.v1 v1.57.0 // indirect gopkg.in/yaml.v2 v2.3.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 // indirect ) diff --git a/src/go.sum b/src/go.sum index d6bfff9..2d8545e 100644 --- a/src/go.sum +++ b/src/go.sum @@ -20,6 +20,7 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398 h1:WDC6ySpJzbxGWFh4aMxFFC28wwGp5pEuoTtvA4q/qQ4= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.24.1/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU= @@ -33,6 +34,8 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= +github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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= @@ -50,6 +53,9 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r 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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -58,6 +64,7 @@ github.com/cheggaaa/pb v1.0.28/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXH 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/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= github.com/coredns/coredns v1.4.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -77,6 +84,7 @@ github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6ps 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/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -88,6 +96,8 @@ github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7j github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:DddqAaWDpywytcG8w/qoQ5sAN8X12d3Z3koB0C3Rxsc= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= @@ -140,18 +150,22 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/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/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -197,6 +211,7 @@ github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 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= @@ -236,6 +251,7 @@ github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da h1:FjHUJJ7oBW4G/9 github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da/go.mod h1:ks+b9deReOc7jgqp+e7LuFiCBH6Rm5hL32cLcEAArb4= github.com/jarcoal/httpmock v1.0.5 h1:cHtVEcTxRSX4J0je7mWPfc9BpDpqzXSJ5HbymZmyHck= github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -278,6 +294,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.10.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.10.5 h1:7q6vHIqubShURwQz8cQK6yIe/xC3IF0Vm7TGfqjewrc= github.com/klauspost/compress v1.10.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.10.6 h1:SP6zavvTG3YjOosWePXFDlExpKIWMTO4SE/Y8MZB2vI= +github.com/klauspost/compress v1.10.6/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -301,9 +319,12 @@ github.com/markbates/goth v1.62.0 h1:8gyLomXU/bbVcee1zbHmV+S2ieh4sFssPuydNVYmPmg github.com/markbates/goth v1.62.0/go.mod h1:qh2QfwZoWRucQ+DR5KVKC6dUGkNCToWh4vS45GIzFsY= github.com/markbates/goth v1.64.0 h1:TXmIGRrY3Rf/a5qbx8MIGnz1rD9SkIn0UzRoDqHyJLs= github.com/markbates/goth v1.64.0/go.mod h1:qh2QfwZoWRucQ+DR5KVKC6dUGkNCToWh4vS45GIzFsY= +github.com/markbates/goth v1.64.1 h1:hHtHjx/QJKblyqUtqL1z3eWSyYmZO4YXGKRdUwk1yvQ= +github.com/markbates/goth v1.64.1/go.mod h1:qh2QfwZoWRucQ+DR5KVKC6dUGkNCToWh4vS45GIzFsY= 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/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -312,6 +333,7 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx 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/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -333,11 +355,15 @@ github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9 h1:dFEqJyuuwQ+VeUm9pJ0 github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA= github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c h1:D1oiteaehouuJUb6xEw7+dBiHFF+iKZp+nzGN7BEFXw= github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA= +github.com/minio/minio v0.0.0-20200530205631-8befedef14d7 h1:0FHbyD5mLmdF/+DBtxQjW1Yk5xWJTV+G6ERaxVkBFxU= +github.com/minio/minio v0.0.0-20200530205631-8befedef14d7/go.mod h1:hW3OqYRO05rdeeuHHTif+B7WYxtDB3/hZb7eKfHXy1Y= github.com/minio/minio-go/v6 v6.0.53 h1:8jzpwiOzZ5Iz7/goFWqNZRICbyWYShbb5rARjrnSCNI= github.com/minio/minio-go/v6 v6.0.53/go.mod h1:DIvC/IApeHX8q1BAMVCXSXwpmrmM+I+iBvhvztQorfI= github.com/minio/minio-go/v6 v6.0.55-0.20200425081427-89eebdef2af0/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= github.com/minio/minio-go/v6 v6.0.55 h1:Hqm41952DdRNKXM+6hCnPXCsHCYSgLf03iuYoxJG2Wk= github.com/minio/minio-go/v6 v6.0.55/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= +github.com/minio/minio-go/v6 v6.0.56 h1:H4+v6UFV1V7VkEf1HjL15W9OvTL1Gy8EbMmjQZHqEbg= +github.com/minio/minio-go/v6 v6.0.56/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61/go.mod h1:4trzEJ7N1nBTd5Tt7OCZT5SEin+WiAXpdJ/WgPkESA8= 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= @@ -387,13 +413,21 @@ github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.12.2 h1:Ke9m3h2Hu0wsZ45yewCqhYr3Z+emcNTuLY2nMWCkrSI= +github.com/onsi/ginkgo v1.12.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.0 h1:Gwkk+PTu/nfOwNMtUB/mRUv0X7ewW5dO4AERT1ThVKo= github.com/onsi/gomega v1.10.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -410,6 +444,7 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP 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_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= @@ -423,9 +458,11 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCb github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 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/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -436,11 +473,13 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R 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/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 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/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= @@ -482,6 +521,7 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -499,6 +539,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy 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/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= +github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -513,6 +555,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.12.0 h1:TsB9qkSeiMXB40ELWWSRMjlsE+8IkqXHcs01y2d9aw0= github.com/valyala/fasthttp v1.12.0/go.mod h1:229t1eWu9UXTPmoUkbpN/fctKPBY4IJoFXQnxHGXy6E= +github.com/valyala/fasthttp v1.13.1 h1:Z7kVhKP9NZz+tCSY7AVhCMPPAk7b+e5fq0l/BfdTlFc= +github.com/valyala/fasthttp v1.13.1/go.mod h1:ol1PCaL0dX20wC0htZ7sYCsvCYmrouYra0zHzaclZhE= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= @@ -544,6 +588,7 @@ go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKY go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= +golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -592,6 +637,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7 golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120 h1:EZ3cVSzKOlJxAd8e8YAJ7no8nNypTxexh/YE/xW3ZEY= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200528225125-3c3fba18258b h1:IYiJPiJfzktmDAO1HQiwjMjwjlYKHAL7KzeD544RJPs= +golang.org/x/net v0.0.0-20200528225125-3c3fba18258b/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -623,6 +671,7 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA= @@ -638,6 +687,9 @@ golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c h1:kISX68E8gSkNYAFRFiDU8rl5R golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 h1:YTzHMGlqJu67/uEo1lBv0n3wBXhXNeUbB1XfN2vmTm0= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zrpzXdb/voyeOuVKS46o= +golang.org/x/sys v0.0.0-20200523222454-059865788121/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= @@ -661,7 +713,9 @@ golang.org/x/tools v0.0.0-20190914235951-31e00f45c22e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200428211428-0c9eba77bc32/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -681,17 +735,25 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn 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/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 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/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -712,10 +774,13 @@ gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0 h1:DPMeDvGTM54DXbPkVIZsp19fp/I2K7zwA/itHYHKo8Y= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/ldap.v3 v3.0.3/go.mod h1:oxD7NyBuxchC+SgJDE1Q5Od05eGt29SDQVBmV+HYbzw= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= @@ -731,14 +796,17 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2 h1:XZx7nhd5GMaZpmDaEHFVafUZC7ya0fuo7cSJ3UCKYmM= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 h1:OfFoIUYv/me30yv7XlMy4F9RJw8DEm8WQ6QG1Ph4bH0= gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 52663c0c23abecc6f02f02826defae6032439e63 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Mon, 1 Jun 2020 00:57:56 +0300 Subject: [PATCH 02/16] add tags list --- src/handlers/buckets.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index b2b787b..bb65575 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -29,8 +29,15 @@ var BuckListExtended = func(ctx iris.Context) { log.Print("Error while getting bucket notification", err) } bq, _ := madmClnt.GetBucketQuota(context.Background(), bucket.Name) + bt, bterr := minioClnt.GetBucketTagging(bucket.Name) - br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq} + btMap := map[string]string{} + + if bterr == nil { + btMap = bt.ToMap() + } + + br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap} allBuckets = append(allBuckets, br) } @@ -168,9 +175,10 @@ var BuckSetQuota = func(ctx iris.Context) { var quotaType = madmin.QuotaType(strings.ToLower(ctx.FormValue("quotaType"))) var quotaStr = ctx.FormValue("quotaValue") var quota, _ = strconv.ParseUint(quotaStr, 10, 64) + bucketQuota := &madmin.BucketQuota{Quota: quota, Type: quotaType} if resph.CheckAuthBeforeRequest(ctx) != false { - err = madmClnt.SetBucketQuota(context.Background(), bucket, quota, quotaType) + err = madmClnt.SetBucketQuota(context.Background(), bucket, bucketQuota) var res = resph.DefaultResHandler(ctx, err) ctx.JSON(res) } else { @@ -192,9 +200,11 @@ var BuckGetQuota = func(ctx iris.Context) { var BuckRemoveQuota = func(ctx iris.Context) { var bucket = ctx.FormValue("bucketName") + var quota, _ = strconv.ParseUint("0", 10, 64) + bucketQuota := &madmin.BucketQuota{Quota: quota} if resph.CheckAuthBeforeRequest(ctx) != false { - err := madmClnt.RemoveBucketQuota(context.Background(), bucket) + err = madmClnt.SetBucketQuota(context.Background(), bucket, bucketQuota) var res = resph.DefaultResHandler(ctx, err) ctx.JSON(res) } else { From 28899e94a8c6f4a0413a49c77a04b598bd62b5ba Mon Sep 17 00:00:00 2001 From: rzrbld Date: Fri, 12 Jun 2020 01:44:39 +0300 Subject: [PATCH 03/16] add setTag method --- src/go.mod | 28 ++++++++++++++++------------ src/go.sum | 39 +++++++++++++++++++++++++++++++++++++++ src/handlers/buckets.go | 22 +++++++++++++++++++++- src/main.go | 1 + 4 files changed, 77 insertions(+), 13 deletions(-) diff --git a/src/go.mod b/src/go.mod index 36825b7..a2b2871 100644 --- a/src/go.mod +++ b/src/go.mod @@ -17,44 +17,48 @@ require ( github.com/iris-contrib/jade v1.1.4 // indirect github.com/iris-contrib/middleware/cors v0.0.0-20191219204441-78279b78a367 github.com/iris-contrib/middleware/prometheus v0.0.0-20191219204441-78279b78a367 + github.com/json-iterator/go v1.1.10 // indirect github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect - github.com/kataras/golog v0.0.15 // indirect + github.com/kataras/golog v0.0.18 // indirect github.com/kataras/iris/v12 v12.1.8 - github.com/klauspost/compress v1.10.6 // indirect + github.com/klauspost/compress v1.10.8 // indirect + github.com/klauspost/cpuid v1.3.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/markbates/goth v1.64.1 github.com/mattn/go-colorable v0.1.6 // indirect github.com/minio/hdfs/v3 v3.0.1 // indirect - github.com/minio/minio v0.0.0-20200530205631-8befedef14d7 - github.com/minio/minio-go/v6 v6.0.56 + github.com/minio/lsync v1.0.1 // indirect + github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe + github.com/minio/minio-go/v6 v6.0.57 github.com/montanaflynn/stats v0.6.3 // indirect github.com/moul/http2curl v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/onsi/ginkgo v1.12.2 // indirect + github.com/onsi/ginkgo v1.12.3 // indirect github.com/prometheus/client_golang v1.6.0 github.com/prometheus/common v0.10.0 // indirect + github.com/prometheus/procfs v0.1.1 // indirect github.com/rzrbld/goth-provider-wso2 v0.0.0-20200321130802-e588ec0a9128 github.com/secure-io/sio-go v0.3.1 // indirect github.com/sergi/go-diff v1.1.0 // indirect - github.com/shirou/gopsutil v2.20.4+incompatible // indirect + github.com/shirou/gopsutil v2.20.5+incompatible // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/smartystreets/assertions v1.1.0 // indirect github.com/smartystreets/goconvey v1.6.4 // indirect - github.com/stretchr/testify v1.6.0 // indirect - github.com/valyala/fasthttp v1.13.1 // indirect + github.com/stretchr/testify v1.6.1 // indirect + github.com/valyala/fasthttp v1.14.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect - golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect - golang.org/x/net v0.0.0-20200528225125-3c3fba18258b // indirect - golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect + golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 // indirect + golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect + golang.org/x/sys v0.0.0-20200610111108-226ff32320da // indirect google.golang.org/appengine v1.6.6 // indirect google.golang.org/protobuf v1.24.0 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/ini.v1 v1.57.0 // indirect gopkg.in/yaml.v2 v2.3.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 // indirect + gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c // indirect ) diff --git a/src/go.sum b/src/go.sum index 2d8545e..db6361e 100644 --- a/src/go.sum +++ b/src/go.sum @@ -129,6 +129,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V 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-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -259,6 +260,8 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/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= @@ -271,6 +274,8 @@ github.com/kataras/golog v0.0.13 h1:zWzk56eWBkdV4kPq3Koh8PS4pUfNQUfHuLc3YACpM7c= github.com/kataras/golog v0.0.13/go.mod h1:lMz0gaBYitlMKvVn2Ykw0WpRoqHrq1kjWId/iLrH67I= github.com/kataras/golog v0.0.15 h1:NPpVJt7Usc741IahumyieIj6j4q0WbwCq+YaLcBWTqc= github.com/kataras/golog v0.0.15/go.mod h1:lMz0gaBYitlMKvVn2Ykw0WpRoqHrq1kjWId/iLrH67I= +github.com/kataras/golog v0.0.18 h1:Td7hcKN25yzqB/0SO5iohOsMk5Mq5V9kDtM5apaJLY0= +github.com/kataras/golog v0.0.18/go.mod h1:jRYl7dFYqP8aQj9VkwdBUXYZSfUktm+YYg1arJILfyw= github.com/kataras/iris/v12 v12.1.2/go.mod h1:x8XU9FcsqdBvFyDA9brryw7Px8UZ8lquXwVaYKRzBBc= github.com/kataras/iris/v12 v12.1.8 h1:O3gJasjm7ZxpxwTH8tApZsvf274scSGQAUpNe47c37U= github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= @@ -280,6 +285,8 @@ github.com/kataras/pio v0.0.2 h1:6NAi+uPJ/Zuid6mrAKlgpbI11/zK/lV4B2rxWaJN98Y= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/pio v0.0.6 h1:Fk21upgXuB6VKHuH/sY13g6fzA5Gn+rKjV0ReXST484= github.com/kataras/pio v0.0.6/go.mod h1:NFfMp2kVP1rmV4N6gH6qgWpuoDKlrOeYi3VrAIWCGsE= +github.com/kataras/pio v0.0.8 h1:6pX6nHJk7DAV3x1dEimibQF2CmJLlo0jWVmM9yE9KY8= +github.com/kataras/pio v0.0.8/go.mod h1:NFfMp2kVP1rmV4N6gH6qgWpuoDKlrOeYi3VrAIWCGsE= github.com/kataras/sitemap v0.0.5 h1:4HCONX5RLgVy6G4RkYOV3vKNcma9p236LdGOipJsaFE= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -296,11 +303,18 @@ github.com/klauspost/compress v1.10.5 h1:7q6vHIqubShURwQz8cQK6yIe/xC3IF0Vm7TGfqj github.com/klauspost/compress v1.10.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.10.6 h1:SP6zavvTG3YjOosWePXFDlExpKIWMTO4SE/Y8MZB2vI= github.com/klauspost/compress v1.10.6/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.10.8 h1:eLeJ3dr/Y9+XRfJT4l+8ZjmtB5RPJhucH2HeCV5+IZY= +github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.4 h1:EBfaK0SWSwk+fgk6efYFWdzl8MwRWoOO1gkmiaTXPW4= github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.3.0 h1:2JqaNE1hGdABW2YbA3TenkO7RiPFRvSWnEnGqWh9sHE= +github.com/klauspost/cpuid v1.3.0/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/readahead v1.3.1/go.mod h1:AH9juHzNH7xqdqFHrMRSHeH2Ps+vFf+kblDqzPFiLJg= github.com/klauspost/reedsolomon v1.9.7/go.mod h1:+8WD025Xpby8/kG5h/HDPIFhiiuGEtZOKw+5Y4drAD8= +github.com/klauspost/reedsolomon v1.9.9/go.mod h1:O7yFFHiQwDR6b2t63KPUpccPtNdp5ADgh1gg4fd12wo= github.com/konsorten/go-windows-terminal-sequences v1.0.1/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= @@ -351,12 +365,16 @@ github.com/minio/gokrb5/v7 v7.2.5/go.mod h1:z6fE6twrvMN004M+KRTHnmtfpxsBIztP0PVs github.com/minio/hdfs/v3 v3.0.1/go.mod h1:6ALh9HsAwG9xAXdpdrZJcSY0vR6z3K+9XIz6Y9pQG/c= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/lsync v1.0.1/go.mod h1:tCFzfo0dlvdGl70IT4IAK/5Wtgb0/BrTmo/jE8pArKA= +github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= +github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9 h1:dFEqJyuuwQ+VeUm9pJ0w1UoxyrcQMxrLgyKRaZwk3FI= github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA= github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c h1:D1oiteaehouuJUb6xEw7+dBiHFF+iKZp+nzGN7BEFXw= github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA= github.com/minio/minio v0.0.0-20200530205631-8befedef14d7 h1:0FHbyD5mLmdF/+DBtxQjW1Yk5xWJTV+G6ERaxVkBFxU= github.com/minio/minio v0.0.0-20200530205631-8befedef14d7/go.mod h1:hW3OqYRO05rdeeuHHTif+B7WYxtDB3/hZb7eKfHXy1Y= +github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe h1:6jSIJV6Ka6LwwWWQWn+TbnV/v2+eAiSG61dXrHBW6so= +github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe/go.mod h1:OX6B136BRlGIj0NDOMvOwBTnASnbnYADvf8Mr129mfg= github.com/minio/minio-go/v6 v6.0.53 h1:8jzpwiOzZ5Iz7/goFWqNZRICbyWYShbb5rARjrnSCNI= github.com/minio/minio-go/v6 v6.0.53/go.mod h1:DIvC/IApeHX8q1BAMVCXSXwpmrmM+I+iBvhvztQorfI= github.com/minio/minio-go/v6 v6.0.55-0.20200425081427-89eebdef2af0/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= @@ -364,6 +382,8 @@ github.com/minio/minio-go/v6 v6.0.55 h1:Hqm41952DdRNKXM+6hCnPXCsHCYSgLf03iuYoxJG github.com/minio/minio-go/v6 v6.0.55/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= github.com/minio/minio-go/v6 v6.0.56 h1:H4+v6UFV1V7VkEf1HjL15W9OvTL1Gy8EbMmjQZHqEbg= github.com/minio/minio-go/v6 v6.0.56/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= +github.com/minio/minio-go/v6 v6.0.57 h1:ixPkbKkyD7IhnluRgQpGSpHdpvNVaW6OD5R9IAO/9Tw= +github.com/minio/minio-go/v6 v6.0.57/go.mod h1:5+R/nM9Pwrh0vqF+HbYYDQ84wdUFPyXHkrdT4AIkifM= github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61/go.mod h1:4trzEJ7N1nBTd5Tt7OCZT5SEin+WiAXpdJ/WgPkESA8= 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= @@ -423,6 +443,8 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.12.2 h1:Ke9m3h2Hu0wsZ45yewCqhYr3Z+emcNTuLY2nMWCkrSI= github.com/onsi/ginkgo v1.12.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.12.3 h1:+RYp9QczoWz9zfUyLP/5SLXQVhfr6gZOoKGfQqHuLZQ= +github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.0 h1:Gwkk+PTu/nfOwNMtUB/mRUv0X7ewW5dO4AERT1ThVKo= github.com/onsi/gomega v1.10.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= @@ -479,6 +501,8 @@ github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQl github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.1 h1:/ZKcW+ixpq2dOl4yeH4qvACNXnkiDCp5e/F5Tq07X7o= +github.com/prometheus/procfs v0.1.1/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 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/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -486,6 +510,7 @@ github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= @@ -505,6 +530,8 @@ github.com/shirou/gopsutil v2.20.3-0.20200314133625-53cec6b37e6a+incompatible h1 github.com/shirou/gopsutil v2.20.3-0.20200314133625-53cec6b37e6a+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.4+incompatible h1:cMT4rxS55zx9NVUnCkrmXCsEB/RNfG9SwHY9evtX8Ng= github.com/shirou/gopsutil v2.20.4+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= +github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -541,6 +568,8 @@ github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -557,6 +586,8 @@ github.com/valyala/fasthttp v1.12.0 h1:TsB9qkSeiMXB40ELWWSRMjlsE+8IkqXHcs01y2d9a github.com/valyala/fasthttp v1.12.0/go.mod h1:229t1eWu9UXTPmoUkbpN/fctKPBY4IJoFXQnxHGXy6E= github.com/valyala/fasthttp v1.13.1 h1:Z7kVhKP9NZz+tCSY7AVhCMPPAk7b+e5fq0l/BfdTlFc= github.com/valyala/fasthttp v1.13.1/go.mod h1:ol1PCaL0dX20wC0htZ7sYCsvCYmrouYra0zHzaclZhE= +github.com/valyala/fasthttp v1.14.0 h1:67bfuW9azCMwW/Jlq/C+VeihNpAuJMWkYPBig1gdi3A= +github.com/valyala/fasthttp v1.14.0/go.mod h1:ol1PCaL0dX20wC0htZ7sYCsvCYmrouYra0zHzaclZhE= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= @@ -606,6 +637,8 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= +golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/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= @@ -640,6 +673,8 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200528225125-3c3fba18258b h1:IYiJPiJfzktmDAO1HQiwjMjwjlYKHAL7KzeD544RJPs= golang.org/x/net v0.0.0-20200528225125-3c3fba18258b/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -690,6 +725,8 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zrpzXdb/voyeOuVKS46o= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200610111108-226ff32320da h1:bGb80FudwxpeucJUjPYJXuJ8Hk91vNtfvrymzwiei38= +golang.org/x/sys v0.0.0-20200610111108-226ff32320da/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= @@ -804,6 +841,8 @@ gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 h1:OfFoIUYv/me30yv7XlMy4F9RJw8DEm8WQ6QG1Ph4bH0= gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index bb65575..19a26a0 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -9,6 +9,7 @@ import ( iris "github.com/kataras/iris/v12" minio "github.com/minio/minio-go/v6" + "github.com/minio/minio-go/v6/pkg/tags" madmin "github.com/minio/minio/pkg/madmin" cnf "github.com/rzrbld/adminio-api/config" resph "github.com/rzrbld/adminio-api/response" @@ -29,7 +30,7 @@ var BuckListExtended = func(ctx iris.Context) { log.Print("Error while getting bucket notification", err) } bq, _ := madmClnt.GetBucketQuota(context.Background(), bucket.Name) - bt, bterr := minioClnt.GetBucketTagging(bucket.Name) + bt, bterr := minioClnt.GetBucketTaggingWithContext(context.Background(), bucket.Name) btMap := map[string]string{} @@ -45,6 +46,25 @@ var BuckListExtended = func(ctx iris.Context) { ctx.JSON(res) } +var BuckSetTags = func(ctx iris.Context) { + var bucketName = ctx.FormValue("bucketName") + var tagsString = ctx.FormValue("bucketTags") + + bucketTags, err := tags.Parse(tagsString, true) + + if err != nil { + log.Print("Error while getting bucket notification", err) + } + + if resph.CheckAuthBeforeRequest(ctx) != false { + err := minioClnt.SetBucketTaggingWithContext(context.Background(), bucketName, bucketTags) + var res = resph.DefaultResHandler(ctx, err) + ctx.JSON(res) + } else { + ctx.JSON(resph.DefaultAuthError()) + } +} + var BuckMake = func(ctx iris.Context) { var newBucket = ctx.FormValue("newBucket") var newBucketRegion = ctx.FormValue("newBucketRegion") diff --git a/src/main.go b/src/main.go index afc726e..739ad79 100644 --- a/src/main.go +++ b/src/main.go @@ -93,6 +93,7 @@ func main() { v2.Post("/bucket/set-quota", hdl.BuckSetQuota) v2.Post("/bucket/get-quota", hdl.BuckGetQuota) v2.Post("/bucket/remove-quota", hdl.BuckRemoveQuota) + v2.Post("/bucket/set-tags", hdl.BuckSetTags) v2.Get("/users/list", hdl.UsrList) v2.Post("/user/set-status", hdl.UsrSetStats) From 0bb367572edf9660da224210c59e044b05a20d7b Mon Sep 17 00:00:00 2001 From: rzrbld Date: Sun, 14 Jun 2020 21:44:32 +0300 Subject: [PATCH 04/16] add get-tags bucket method --- openAPI/openapi_v3.yaml | 67 +++++++++++++++++++++++++++++++++++++++-- src/handlers/buckets.go | 22 +++++++++++++- src/main.go | 1 + 3 files changed, 87 insertions(+), 3 deletions(-) diff --git a/openAPI/openapi_v3.yaml b/openAPI/openapi_v3.yaml index c516013..e8e96e7 100644 --- a/openAPI/openapi_v3.yaml +++ b/openAPI/openapi_v3.yaml @@ -1,7 +1,7 @@ openapi: "3.0.0" info: description: "Adminio API" - version: "2.0.0" + version: "2.3.0" title: "Adminio API" contact: name: "rzrbld at github.com" @@ -353,6 +353,66 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /bucket/set-tags: + post: + summary: Set bucket tags + operationId: setBucketTags + tags: + - bucket + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + bucketName: + type: string + format: string + bucketTags: + description: comma separated list of tags. e.g. `tag1=value1&tag2=value2` + type: string + format: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/Success" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /bucket/get-tags: + post: + summary: Get bucket tags + operationId: getBucketTags + tags: + - bucket + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + bucketName: + type: string + format: string + responses: + '200': + description: bucket quota + content: + application/json: + schema: + $ref: "#/components/schemas/BucketTags" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /users/list: get: summary: List all users @@ -1029,6 +1089,8 @@ components: type: integer quotatype: type: string + BucketTags: + type: object BucketInfo: type: object properties: @@ -1051,6 +1113,8 @@ components: $ref: "#/components/schemas/BucketInfo" quota: $ref: "#/components/schemas/BucketQuota" + tags: + $ref: "#/components/schemas/BucketTags" BucketLifecycle: type: string Error: @@ -1068,4 +1132,3 @@ components: properties: Success: type: string - diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 19a26a0..182e742 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -53,7 +53,7 @@ var BuckSetTags = func(ctx iris.Context) { bucketTags, err := tags.Parse(tagsString, true) if err != nil { - log.Print("Error while getting bucket notification", err) + log.Print("Error while parse bucket tags", err) } if resph.CheckAuthBeforeRequest(ctx) != false { @@ -65,6 +65,26 @@ var BuckSetTags = func(ctx iris.Context) { } } +var BuckGetTags = func(ctx iris.Context) { + var bucketName = ctx.FormValue("bucketName") + + if resph.CheckAuthBeforeRequest(ctx) != false { + bt, bterr := minioClnt.GetBucketTaggingWithContext(context.Background(), bucketName) + + btMap := map[string]string{} + + if bterr == nil { + btMap = bt.ToMap() + } + + var res = resph.BodyResHandler(ctx, err, btMap) + ctx.JSON(res) + + } else { + ctx.JSON(resph.DefaultAuthError()) + } +} + var BuckMake = func(ctx iris.Context) { var newBucket = ctx.FormValue("newBucket") var newBucketRegion = ctx.FormValue("newBucketRegion") diff --git a/src/main.go b/src/main.go index 739ad79..31d1bb6 100644 --- a/src/main.go +++ b/src/main.go @@ -94,6 +94,7 @@ func main() { v2.Post("/bucket/get-quota", hdl.BuckGetQuota) v2.Post("/bucket/remove-quota", hdl.BuckRemoveQuota) v2.Post("/bucket/set-tags", hdl.BuckSetTags) + v2.Post("/bucket/get-tags", hdl.BuckGetTags) v2.Get("/users/list", hdl.UsrList) v2.Post("/user/set-status", hdl.UsrSetStats) From 68f8ed0d5b8f362c35a9fe70683fb05e3c6d4c60 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Sun, 14 Jun 2020 21:45:29 +0300 Subject: [PATCH 05/16] deps update --- src/go.mod | 11 ++++++----- src/go.sum | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/go.mod b/src/go.mod index a2b2871..262bc4d 100644 --- a/src/go.mod +++ b/src/go.mod @@ -26,23 +26,24 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/markbates/goth v1.64.1 github.com/mattn/go-colorable v0.1.6 // indirect + github.com/microcosm-cc/bluemonday v1.0.3 // indirect github.com/minio/hdfs/v3 v3.0.1 // indirect github.com/minio/lsync v1.0.1 // indirect - github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe - github.com/minio/minio-go/v6 v6.0.57 + github.com/minio/minio v0.0.0-20200614184039-41a793874879 + github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec github.com/montanaflynn/stats v0.6.3 // indirect github.com/moul/http2curl v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/onsi/ginkgo v1.12.3 // indirect + github.com/onsi/ginkgo v1.13.0 // indirect github.com/prometheus/client_golang v1.6.0 github.com/prometheus/common v0.10.0 // indirect - github.com/prometheus/procfs v0.1.1 // indirect + github.com/prometheus/procfs v0.1.3 // indirect github.com/rzrbld/goth-provider-wso2 v0.0.0-20200321130802-e588ec0a9128 github.com/secure-io/sio-go v0.3.1 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shirou/gopsutil v2.20.5+incompatible // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect - github.com/smartystreets/assertions v1.1.0 // indirect + github.com/smartystreets/assertions v1.1.1 // indirect github.com/smartystreets/goconvey v1.6.4 // indirect github.com/stretchr/testify v1.6.1 // indirect github.com/valyala/fasthttp v1.14.0 // indirect diff --git a/src/go.sum b/src/go.sum index db6361e..ccc1487 100644 --- a/src/go.sum +++ b/src/go.sum @@ -41,6 +41,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV 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/aws/aws-sdk-go v1.20.21/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible h1:Ppm0npCCsmuR9oQaBtRuZcmILVE74aXE+AmrJj8L2ns= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bcicen/jstream v0.0.0-20190220045926-16c1f8af81c2/go.mod h1:RDu/qcrnpEdJC/p8tx34+YBFqqX71lB7dOX9QE+ZC4M= @@ -61,6 +63,8 @@ github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tj 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/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chris-ramon/douceur v0.2.0 h1:IDMEdxlEUUBYBKE4z/mJnFyVXox+MjuEVDJNN27glkU= +github.com/chris-ramon/douceur v0.2.0/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE= 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= @@ -181,6 +185,8 @@ github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f/go.mod h1:wJfORR github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -359,6 +365,8 @@ github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQ github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/microcosm-cc/bluemonday v1.0.3 h1:EjVH7OqbU219kdm8acbveoclh2zZFqPJTJw6VUlTLAQ= +github.com/microcosm-cc/bluemonday v1.0.3/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w= github.com/miekg/dns v1.1.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY= github.com/minio/gokrb5/v7 v7.2.5/go.mod h1:z6fE6twrvMN004M+KRTHnmtfpxsBIztP0PVsak0/4f8= @@ -375,6 +383,8 @@ github.com/minio/minio v0.0.0-20200530205631-8befedef14d7 h1:0FHbyD5mLmdF/+DBtxQ github.com/minio/minio v0.0.0-20200530205631-8befedef14d7/go.mod h1:hW3OqYRO05rdeeuHHTif+B7WYxtDB3/hZb7eKfHXy1Y= github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe h1:6jSIJV6Ka6LwwWWQWn+TbnV/v2+eAiSG61dXrHBW6so= github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe/go.mod h1:OX6B136BRlGIj0NDOMvOwBTnASnbnYADvf8Mr129mfg= +github.com/minio/minio v0.0.0-20200614184039-41a793874879 h1:E32j1mqi6//QDIlf6OoWptVCNCDiYofTk5HSivPsVhU= +github.com/minio/minio v0.0.0-20200614184039-41a793874879/go.mod h1:JLeFiP5xG3ILwLY/A+v1zRA9Z25BCC900jt0VnEbYcc= github.com/minio/minio-go/v6 v6.0.53 h1:8jzpwiOzZ5Iz7/goFWqNZRICbyWYShbb5rARjrnSCNI= github.com/minio/minio-go/v6 v6.0.53/go.mod h1:DIvC/IApeHX8q1BAMVCXSXwpmrmM+I+iBvhvztQorfI= github.com/minio/minio-go/v6 v6.0.55-0.20200425081427-89eebdef2af0/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= @@ -384,6 +394,8 @@ github.com/minio/minio-go/v6 v6.0.56 h1:H4+v6UFV1V7VkEf1HjL15W9OvTL1Gy8EbMmjQZHq github.com/minio/minio-go/v6 v6.0.56/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= github.com/minio/minio-go/v6 v6.0.57 h1:ixPkbKkyD7IhnluRgQpGSpHdpvNVaW6OD5R9IAO/9Tw= github.com/minio/minio-go/v6 v6.0.57/go.mod h1:5+R/nM9Pwrh0vqF+HbYYDQ84wdUFPyXHkrdT4AIkifM= +github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec h1:my1ShPzUyV5BSteRVdm/YoEhd4ycLImlN4xDX17pd8A= +github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec/go.mod h1:5+R/nM9Pwrh0vqF+HbYYDQ84wdUFPyXHkrdT4AIkifM= github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61/go.mod h1:4trzEJ7N1nBTd5Tt7OCZT5SEin+WiAXpdJ/WgPkESA8= 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= @@ -445,6 +457,8 @@ github.com/onsi/ginkgo v1.12.2 h1:Ke9m3h2Hu0wsZ45yewCqhYr3Z+emcNTuLY2nMWCkrSI= github.com/onsi/ginkgo v1.12.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.12.3 h1:+RYp9QczoWz9zfUyLP/5SLXQVhfr6gZOoKGfQqHuLZQ= github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.0 h1:Gwkk+PTu/nfOwNMtUB/mRUv0X7ewW5dO4AERT1ThVKo= github.com/onsi/gomega v1.10.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= @@ -503,6 +517,8 @@ github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.1 h1:/ZKcW+ixpq2dOl4yeH4qvACNXnkiDCp5e/F5Tq07X7o= github.com/prometheus/procfs v0.1.1/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 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/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -520,6 +536,7 @@ github.com/rzrbld/goth-provider-wso2 v0.0.0-20200321130802-e588ec0a9128 h1:n7seL github.com/rzrbld/goth-provider-wso2 v0.0.0-20200321130802-e588ec0a9128/go.mod h1:08qch4PIgDe6P5BnaHEoE/91ZXCg4bDoHDw9v7gUyUg= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= 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/secure-io/sio-go v0.3.1 h1:dNvY9awjabXTYGsTF1PiCySl9Ltofk9GA3VdWlo7rRc= @@ -542,6 +559,8 @@ github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3 h1:hBSHah github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0 h1:MkTeG1DMwsrdH7QtLXy5W+fUxWq+vmb6cLmyJ7aRtF0= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= +github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= +github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= 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= From 927acd4ce851dcfa04b39437f828caaa53f70d98 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Sun, 14 Jun 2020 21:46:03 +0300 Subject: [PATCH 06/16] go fmt --- src/handlers/buckets.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 182e742..553225b 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -46,7 +46,7 @@ var BuckListExtended = func(ctx iris.Context) { ctx.JSON(res) } -var BuckSetTags = func(ctx iris.Context) { +var BuckSetTags = func(ctx iris.Context) { var bucketName = ctx.FormValue("bucketName") var tagsString = ctx.FormValue("bucketTags") @@ -65,7 +65,7 @@ var BuckSetTags = func(ctx iris.Context) { } } -var BuckGetTags = func(ctx iris.Context) { +var BuckGetTags = func(ctx iris.Context) { var bucketName = ctx.FormValue("bucketName") if resph.CheckAuthBeforeRequest(ctx) != false { From d0a8b9465d8a8cfa671e09214c7e5644b51cc4fc Mon Sep 17 00:00:00 2001 From: rzrbld Date: Sun, 14 Jun 2020 22:12:42 +0300 Subject: [PATCH 07/16] add get-policy method --- openAPI/openapi_v3.yaml | 35 ++++++++++++++++++++++++++++++++++- src/handlers/buckets.go | 13 +++++++++++++ src/main.go | 1 + 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/openAPI/openapi_v3.yaml b/openAPI/openapi_v3.yaml index e8e96e7..274e7be 100644 --- a/openAPI/openapi_v3.yaml +++ b/openAPI/openapi_v3.yaml @@ -402,7 +402,7 @@ paths: format: string responses: '200': - description: bucket quota + description: bucket tags content: application/json: schema: @@ -413,6 +413,34 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /bucket/get-policy: + post: + summary: Get bucket policy + operationId: getBucketPolicy + tags: + - bucket + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + bucketName: + type: string + format: string + responses: + '200': + description: bucket policy + content: + application/json: + schema: + $ref: "#/components/schemas/BucketPolicy" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /users/list: get: summary: List all users @@ -1091,6 +1119,11 @@ components: type: string BucketTags: type: object + BucketPolicy: + type: object + properties: + policy: + type: string BucketInfo: type: object properties: diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 553225b..42593fb 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -251,3 +251,16 @@ var BuckRemoveQuota = func(ctx iris.Context) { ctx.JSON(resph.DefaultAuthError()) } } + +var BuckGetPolicy = func(ctx iris.Context) { + var bucketName = ctx.FormValue("bucketName") + + if resph.CheckAuthBeforeRequest(ctx) != false { + bp, err := minioClnt.GetBucketPolicyWithContext(context.Background(), bucketName) + respBp := iris.Map{"policy": bp} + var res = resph.BodyResHandler(ctx, err, respBp) + ctx.JSON(res) + } else { + ctx.JSON(resph.DefaultAuthError()) + } +} diff --git a/src/main.go b/src/main.go index 31d1bb6..e1bdfda 100644 --- a/src/main.go +++ b/src/main.go @@ -95,6 +95,7 @@ func main() { v2.Post("/bucket/remove-quota", hdl.BuckRemoveQuota) v2.Post("/bucket/set-tags", hdl.BuckSetTags) v2.Post("/bucket/get-tags", hdl.BuckGetTags) + v2.Post("/bucket/get-policy", hdl.BuckGetPolicy) v2.Get("/users/list", hdl.UsrList) v2.Post("/user/set-status", hdl.UsrSetStats) From e2d88db5dea85f1af0a25cd9de39b956fac6057a Mon Sep 17 00:00:00 2001 From: rzrbld Date: Sun, 28 Jun 2020 22:31:22 +0300 Subject: [PATCH 08/16] add bucket setPolicy --- openAPI/openapi_v3.yaml | 33 +++++++++++++++++++++++++++++++++ src/handlers/buckets.go | 14 ++++++++++++++ src/main.go | 1 + src/response/response.go | 2 +- 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/openAPI/openapi_v3.yaml b/openAPI/openapi_v3.yaml index 274e7be..2ca7e46 100644 --- a/openAPI/openapi_v3.yaml +++ b/openAPI/openapi_v3.yaml @@ -441,6 +441,38 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /bucket/set-policy: + post: + summary: Set bucket policy + operationId: setBucketPolicy + tags: + - bucket + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + bucketName: + type: string + format: string + bucketPolicy: + description: predefined values none, upload, download, public or custom json string + type: string + format: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/Success" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /users/list: get: summary: List all users @@ -1165,3 +1197,4 @@ components: properties: Success: type: string + diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 42593fb..744a617 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -264,3 +264,17 @@ var BuckGetPolicy = func(ctx iris.Context) { ctx.JSON(resph.DefaultAuthError()) } } + +var BuckSetPolicy = func(ctx iris.Context) { + + var bucket = ctx.FormValue("bucketName") + var policy = ctx.FormValue("bucketPolicy") + + if resph.CheckAuthBeforeRequest(ctx) != false { + err = minioClnt.SetBucketPolicyWithContext(context.Background(), bucket, policy) + var res = resph.DefaultResHandler(ctx, err) + ctx.JSON(res) + } else { + ctx.JSON(resph.DefaultAuthError()) + } +} diff --git a/src/main.go b/src/main.go index e1bdfda..59720f9 100644 --- a/src/main.go +++ b/src/main.go @@ -96,6 +96,7 @@ func main() { v2.Post("/bucket/set-tags", hdl.BuckSetTags) v2.Post("/bucket/get-tags", hdl.BuckGetTags) v2.Post("/bucket/get-policy", hdl.BuckGetPolicy) + v2.Post("/bucket/set-policy", hdl.BuckSetPolicy) v2.Get("/users/list", hdl.UsrList) v2.Post("/user/set-status", hdl.UsrSetStats) diff --git a/src/response/response.go b/src/response/response.go index ad60f4d..422fd60 100644 --- a/src/response/response.go +++ b/src/response/response.go @@ -1,4 +1,4 @@ -package handlers +package handlers ///???? import ( iris "github.com/kataras/iris/v12" From 64d0b7ac6f676f859ba00e2b314774348bd381ef Mon Sep 17 00:00:00 2001 From: rzrbld Date: Mon, 29 Jun 2020 01:16:29 +0300 Subject: [PATCH 09/16] add ability to set basic bucket policies upload, download and etc --- src/go.mod | 21 +++++++++---------- src/go.sum | 27 +++++++++++++++++++++++++ src/handlers/buckets.go | 45 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 80 insertions(+), 13 deletions(-) diff --git a/src/go.mod b/src/go.mod index 262bc4d..dcd0f09 100644 --- a/src/go.mod +++ b/src/go.mod @@ -8,7 +8,6 @@ require ( github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/go-check/check v0.0.0-20200227125254-8fa46927fb4f // indirect github.com/golang/protobuf v1.4.2 // indirect - github.com/google/go-cmp v0.4.1 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/gorilla/securecookie v1.1.1 @@ -21,21 +20,21 @@ require ( github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect github.com/kataras/golog v0.0.18 // indirect github.com/kataras/iris/v12 v12.1.8 - github.com/klauspost/compress v1.10.8 // indirect + github.com/klauspost/compress v1.10.10 // indirect github.com/klauspost/cpuid v1.3.0 // indirect github.com/kr/text v0.2.0 // indirect - github.com/markbates/goth v1.64.1 - github.com/mattn/go-colorable v0.1.6 // indirect + github.com/markbates/goth v1.64.2 + github.com/mattn/go-colorable v0.1.7 // indirect github.com/microcosm-cc/bluemonday v1.0.3 // indirect github.com/minio/hdfs/v3 v3.0.1 // indirect github.com/minio/lsync v1.0.1 // indirect - github.com/minio/minio v0.0.0-20200614184039-41a793874879 + github.com/minio/minio v0.0.0-20200628185605-8c5f0597c059 github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec github.com/montanaflynn/stats v0.6.3 // indirect github.com/moul/http2curl v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/onsi/ginkgo v1.13.0 // indirect - github.com/prometheus/client_golang v1.6.0 + github.com/prometheus/client_golang v1.7.1 github.com/prometheus/common v0.10.0 // indirect github.com/prometheus/procfs v0.1.3 // indirect github.com/rzrbld/goth-provider-wso2 v0.0.0-20200321130802-e588ec0a9128 @@ -53,13 +52,13 @@ require ( github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect - golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 // indirect - golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect - golang.org/x/sys v0.0.0-20200610111108-226ff32320da // indirect + golang.org/x/net v0.0.0-20200625001655-4c5254603344 // indirect + golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect + golang.org/x/text v0.3.3 // indirect google.golang.org/appengine v1.6.6 // indirect - google.golang.org/protobuf v1.24.0 // indirect + google.golang.org/protobuf v1.25.0 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/ini.v1 v1.57.0 // indirect gopkg.in/yaml.v2 v2.3.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c // indirect + gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) diff --git a/src/go.sum b/src/go.sum index ccc1487..71d6e8a 100644 --- a/src/go.sum +++ b/src/go.sum @@ -171,6 +171,8 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -188,8 +190,10 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51 github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= @@ -311,6 +315,8 @@ github.com/klauspost/compress v1.10.6 h1:SP6zavvTG3YjOosWePXFDlExpKIWMTO4SE/Y8MZ github.com/klauspost/compress v1.10.6/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.10.8 h1:eLeJ3dr/Y9+XRfJT4l+8ZjmtB5RPJhucH2HeCV5+IZY= github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.10.10 h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd/0B3I= +github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.4 h1:EBfaK0SWSwk+fgk6efYFWdzl8MwRWoOO1gkmiaTXPW4= @@ -341,12 +347,16 @@ github.com/markbates/goth v1.64.0 h1:TXmIGRrY3Rf/a5qbx8MIGnz1rD9SkIn0UzRoDqHyJLs github.com/markbates/goth v1.64.0/go.mod h1:qh2QfwZoWRucQ+DR5KVKC6dUGkNCToWh4vS45GIzFsY= github.com/markbates/goth v1.64.1 h1:hHtHjx/QJKblyqUtqL1z3eWSyYmZO4YXGKRdUwk1yvQ= github.com/markbates/goth v1.64.1/go.mod h1:qh2QfwZoWRucQ+DR5KVKC6dUGkNCToWh4vS45GIzFsY= +github.com/markbates/goth v1.64.2 h1:HDFwyuB6/ATU1USTvd/Rb3C9XE0VAxeuciSz+aUZHHA= +github.com/markbates/goth v1.64.2/go.mod h1:hSFJFfH56BfFCX4+hBIxyd3o5VzuH5rNwKVRsFr/JPk= 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/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -385,6 +395,8 @@ github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe h1:6jSIJV6Ka6LwwWWQWn+ github.com/minio/minio v0.0.0-20200611211130-96ed0991b5fe/go.mod h1:OX6B136BRlGIj0NDOMvOwBTnASnbnYADvf8Mr129mfg= github.com/minio/minio v0.0.0-20200614184039-41a793874879 h1:E32j1mqi6//QDIlf6OoWptVCNCDiYofTk5HSivPsVhU= github.com/minio/minio v0.0.0-20200614184039-41a793874879/go.mod h1:JLeFiP5xG3ILwLY/A+v1zRA9Z25BCC900jt0VnEbYcc= +github.com/minio/minio v0.0.0-20200628185605-8c5f0597c059 h1:gtJc+gt4c015m0+pHHQBxtrN77KLzKCNg2NDtyBpi5U= +github.com/minio/minio v0.0.0-20200628185605-8c5f0597c059/go.mod h1:ctbP/g2mJMMBab+326+uNrSdm7Ucs0qfLDpGww43duw= github.com/minio/minio-go/v6 v6.0.53 h1:8jzpwiOzZ5Iz7/goFWqNZRICbyWYShbb5rARjrnSCNI= github.com/minio/minio-go/v6 v6.0.53/go.mod h1:DIvC/IApeHX8q1BAMVCXSXwpmrmM+I+iBvhvztQorfI= github.com/minio/minio-go/v6 v6.0.55-0.20200425081427-89eebdef2af0/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= @@ -486,6 +498,8 @@ github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvls github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 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= @@ -658,6 +672,8 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10 golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/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= @@ -694,6 +710,8 @@ golang.org/x/net v0.0.0-20200528225125-3c3fba18258b h1:IYiJPiJfzktmDAO1HQiwjMjwj golang.org/x/net v0.0.0-20200528225125-3c3fba18258b/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -746,11 +764,16 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zr golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200610111108-226ff32320da h1:bGb80FudwxpeucJUjPYJXuJ8Hk91vNtfvrymzwiei38= golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/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/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -810,6 +833,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -862,6 +887,8 @@ gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 h1:OfFoIUYv/me30yv7XlMy4F9RJ gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 744a617..1f0a133 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -6,6 +6,7 @@ import ( log "log" "strconv" "strings" + "encoding/json" iris "github.com/kataras/iris/v12" minio "github.com/minio/minio-go/v6" @@ -13,8 +14,11 @@ import ( madmin "github.com/minio/minio/pkg/madmin" cnf "github.com/rzrbld/adminio-api/config" resph "github.com/rzrbld/adminio-api/response" + policy "github.com/minio/minio-go/v6/pkg/policy" ) +type accessPerms string + var BuckList = func(ctx iris.Context) { lb, err := minioClnt.ListBuckets() var res = resph.BodyResHandler(ctx, err, lb) @@ -265,13 +269,50 @@ var BuckGetPolicy = func(ctx iris.Context) { } } +func stringToPolicy(strPolicy string) string { + policy := "" + switch strPolicy { + case "none": + policy = "none" + case "download": + policy = "readonly" + case "upload": + policy = "writeonly" + case "public": + policy = "readwrite" + case "custom": + policy = "custom" + } + return policy +} + +func isJSON(s string) bool { + var js map[string]interface{} + return json.Unmarshal([]byte(s), &js) == nil +} + var BuckSetPolicy = func(ctx iris.Context) { var bucket = ctx.FormValue("bucketName") - var policy = ctx.FormValue("bucketPolicy") + var policyStr = ctx.FormValue("bucketPolicy") + + if !isJSON(policyStr){ + if policyStr == "none" { + policyStr = "" + } else { + bucketPolicy := stringToPolicy(policyStr) + var p = policy.BucketAccessPolicy{Version: "2012-10-17"} + p.Statements = policy.SetPolicy(p.Statements, policy.BucketPolicy(bucketPolicy), bucket, "") + policyJSON, err := json.Marshal(p) + if err != nil { + fmt.Println("Error marshal json", err, string(policyJSON)) + } + policyStr = string(policyJSON) + } + } if resph.CheckAuthBeforeRequest(ctx) != false { - err = minioClnt.SetBucketPolicyWithContext(context.Background(), bucket, policy) + err = minioClnt.SetBucketPolicyWithContext(context.Background(), bucket, policyStr) var res = resph.DefaultResHandler(ctx, err) ctx.JSON(res) } else { From 6831273ffb5005e2d6a7a9c09fb434c23d80bbba Mon Sep 17 00:00:00 2001 From: rzrbld Date: Mon, 29 Jun 2020 02:21:00 +0300 Subject: [PATCH 10/16] add get bucket policy with short name, add bucket policy to list-extended --- openAPI/openapi_v3.yaml | 4 ++++ src/handlers/buckets.go | 43 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/openAPI/openapi_v3.yaml b/openAPI/openapi_v3.yaml index 2ca7e46..6ff3fc0 100644 --- a/openAPI/openapi_v3.yaml +++ b/openAPI/openapi_v3.yaml @@ -1156,6 +1156,8 @@ components: properties: policy: type: string + name: + type: string BucketInfo: type: object properties: @@ -1180,6 +1182,8 @@ components: $ref: "#/components/schemas/BucketQuota" tags: $ref: "#/components/schemas/BucketTags" + policy-name: + type: string BucketLifecycle: type: string Error: diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 1f0a133..9bfba7a 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -36,13 +36,15 @@ var BuckListExtended = func(ctx iris.Context) { bq, _ := madmClnt.GetBucketQuota(context.Background(), bucket.Name) bt, bterr := minioClnt.GetBucketTaggingWithContext(context.Background(), bucket.Name) + pName, _, _ := getPolicyWithName(bucket.Name) + btMap := map[string]string{} if bterr == nil { btMap = bt.ToMap() } - br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap} + br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap, "policy-name": pName} allBuckets = append(allBuckets, br) } @@ -260,8 +262,10 @@ var BuckGetPolicy = func(ctx iris.Context) { var bucketName = ctx.FormValue("bucketName") if resph.CheckAuthBeforeRequest(ctx) != false { - bp, err := minioClnt.GetBucketPolicyWithContext(context.Background(), bucketName) - respBp := iris.Map{"policy": bp} + pName, bp, err := getPolicyWithName(bucketName) + + fmt.Println("POLICY GET", pName) + respBp := iris.Map{"policy":bp, "name":pName} var res = resph.BodyResHandler(ctx, err, respBp) ctx.JSON(res) } else { @@ -269,6 +273,39 @@ var BuckGetPolicy = func(ctx iris.Context) { } } +func getPolicyWithName(bucketName string) (string, string, error) { + var p policy.BucketAccessPolicy + + bp, err := minioClnt.GetBucketPolicyWithContext(context.Background(), bucketName) + if err = json.Unmarshal([]byte(bp), &p); err != nil { + fmt.Println("Error Unmarshal policy") + } + pName := string(policy.GetPolicy(p.Statements, bucketName, "")) + if pName == string(policy.BucketPolicyNone) && bp != "" { + pName = "custom" + } + var policyShort = policyToString(pName) + + return policyShort, bp, err +} + +func policyToString(policyName string) string { + name := "" + switch policyName { + case "none": + name = "none" + case "readonly": + name = "download" + case "writeonly": + name = "upload" + case "readwrite": + name = "public" + case "custom": + name = "custom" + } + return name +} + func stringToPolicy(strPolicy string) string { policy := "" switch strPolicy { From 9aea003704df6c04f6c75da71ee3e94f098ad3ff Mon Sep 17 00:00:00 2001 From: rzrbld Date: Mon, 29 Jun 2020 02:36:58 +0300 Subject: [PATCH 11/16] rename policy field in list-extended --- openAPI/openapi_v3.yaml | 2 +- src/handlers/buckets.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openAPI/openapi_v3.yaml b/openAPI/openapi_v3.yaml index 6ff3fc0..4992295 100644 --- a/openAPI/openapi_v3.yaml +++ b/openAPI/openapi_v3.yaml @@ -1182,7 +1182,7 @@ components: $ref: "#/components/schemas/BucketQuota" tags: $ref: "#/components/schemas/BucketTags" - policy-name: + policy: type: string BucketLifecycle: type: string diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 9bfba7a..31e18bf 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -44,7 +44,7 @@ var BuckListExtended = func(ctx iris.Context) { btMap = bt.ToMap() } - br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap, "policy-name": pName} + br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap, "policy": pName} allBuckets = append(allBuckets, br) } From f0116521e9a40e27cb68105a13c4296e46a0422f Mon Sep 17 00:00:00 2001 From: rzrbld Date: Mon, 29 Jun 2020 02:42:25 +0300 Subject: [PATCH 12/16] minor fix --- src/handlers/buckets.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 31e18bf..d9965aa 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -277,14 +277,17 @@ func getPolicyWithName(bucketName string) (string, string, error) { var p policy.BucketAccessPolicy bp, err := minioClnt.GetBucketPolicyWithContext(context.Background(), bucketName) - if err = json.Unmarshal([]byte(bp), &p); err != nil { - fmt.Println("Error Unmarshal policy") - } - pName := string(policy.GetPolicy(p.Statements, bucketName, "")) - if pName == string(policy.BucketPolicyNone) && bp != "" { - pName = "custom" + policyShort := "none" + if bp != "" { + if err = json.Unmarshal([]byte(bp), &p); err != nil { + fmt.Println("Error Unmarshal policy") + } + pName := string(policy.GetPolicy(p.Statements, bucketName, "")) + if pName == string(policy.BucketPolicyNone) && bp != "" { + pName = "custom" + } + policyShort = policyToString(pName) } - var policyShort = policyToString(pName) return policyShort, bp, err } From 2102f29e949a7803bcc7e0d416771c65215e4a7c Mon Sep 17 00:00:00 2001 From: rzrbld Date: Wed, 1 Jul 2020 15:26:44 +0300 Subject: [PATCH 13/16] policy refactoring --- src/handlers/buckets.go | 117 ++++++++++++++++++++-------------------- src/main.go | 2 +- 2 files changed, 59 insertions(+), 60 deletions(-) diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index d9965aa..172308e 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -17,7 +17,64 @@ import ( policy "github.com/minio/minio-go/v6/pkg/policy" ) -type accessPerms string +func getPolicyWithName(bucketName string) (string, string, error) { + var p policy.BucketAccessPolicy + + bp, err := minioClnt.GetBucketPolicyWithContext(context.Background(), bucketName) + policyShort := "none" + if bp != "" { + if err = json.Unmarshal([]byte(bp), &p); err != nil { + fmt.Println("Error Unmarshal policy") + } + pName := string(policy.GetPolicy(p.Statements, bucketName, "")) + if pName == string(policy.BucketPolicyNone) && bp != "" { + pName = "custom" + } + policyShort = policyToString(pName) + } + + return policyShort, bp, err +} + +func policyToString(policyName string) string { + name := "" + switch policyName { + case "none": + name = "none" + case "readonly": + name = "download" + case "writeonly": + name = "upload" + case "readwrite": + name = "public" + case "custom": + name = "custom" + } + return name +} + +func stringToPolicy(strPolicy string) string { + policy := "" + switch strPolicy { + case "none": + policy = "none" + case "download": + policy = "readonly" + case "upload": + policy = "writeonly" + case "public": + policy = "readwrite" + case "custom": + policy = "custom" + } + return policy +} + +func isJSON(s string) bool { + var js map[string]interface{} + return json.Unmarshal([]byte(s), &js) == nil +} + var BuckList = func(ctx iris.Context) { lb, err := minioClnt.ListBuckets() @@ -273,64 +330,6 @@ var BuckGetPolicy = func(ctx iris.Context) { } } -func getPolicyWithName(bucketName string) (string, string, error) { - var p policy.BucketAccessPolicy - - bp, err := minioClnt.GetBucketPolicyWithContext(context.Background(), bucketName) - policyShort := "none" - if bp != "" { - if err = json.Unmarshal([]byte(bp), &p); err != nil { - fmt.Println("Error Unmarshal policy") - } - pName := string(policy.GetPolicy(p.Statements, bucketName, "")) - if pName == string(policy.BucketPolicyNone) && bp != "" { - pName = "custom" - } - policyShort = policyToString(pName) - } - - return policyShort, bp, err -} - -func policyToString(policyName string) string { - name := "" - switch policyName { - case "none": - name = "none" - case "readonly": - name = "download" - case "writeonly": - name = "upload" - case "readwrite": - name = "public" - case "custom": - name = "custom" - } - return name -} - -func stringToPolicy(strPolicy string) string { - policy := "" - switch strPolicy { - case "none": - policy = "none" - case "download": - policy = "readonly" - case "upload": - policy = "writeonly" - case "public": - policy = "readwrite" - case "custom": - policy = "custom" - } - return policy -} - -func isJSON(s string) bool { - var js map[string]interface{} - return json.Unmarshal([]byte(s), &js) == nil -} - var BuckSetPolicy = func(ctx iris.Context) { var bucket = ctx.FormValue("bucketName") diff --git a/src/main.go b/src/main.go index 59720f9..9df264d 100644 --- a/src/main.go +++ b/src/main.go @@ -45,7 +45,7 @@ func main() { fmt.Println("\033[31m\r\n ________ ________ _____ ______ ___ ________ ___ ________ \r\n|\\ __ \\ |\\ ___ \\ |\\ _ \\ _ \\ |\\ \\ |\\ ___ \\ |\\ \\ |\\ __ \\ \r\n\\ \\ \\|\\ \\\\ \\ \\_|\\ \\\\ \\ \\\\\\__\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\|\\ \\ \r\n \\ \\ __ \\\\ \\ \\ \\\\ \\\\ \\ \\\\|__| \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\ \r\n \\ \\ \\ \\ \\\\ \\ \\_\\\\ \\\\ \\ \\ \\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\ \r\n \\ \\__\\ \\__\\\\ \\_______\\\\ \\__\\ \\ \\__\\\\ \\__\\\\ \\__\\\\ \\__\\\\ \\__\\\\ \\_______\\\r\n \\|__|\\|__| \\|_______| \\|__| \\|__| \\|__| \\|__| \\|__| \\|__| \\|_______|\r\n \r\n \r\n \033[m") fmt.Println("\033[33mAdmin REST API for http://min.io (minio) s3 server") - fmt.Println("Version : 1.0") + fmt.Println("Version : 1.1") fmt.Println("Authors : rzrbld, 0x003e") fmt.Println("License : MIT") fmt.Println("GitHub : https://github.com/rzrbld/adminio-api") From 2f03a9a5be888ef7d86802d917867bfbd7548f98 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Wed, 1 Jul 2020 16:36:46 +0300 Subject: [PATCH 14/16] speedup bucket-list --- src/handlers/buckets.go | 51 ++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/handlers/buckets.go b/src/handlers/buckets.go index 172308e..da76a6f 100644 --- a/src/handlers/buckets.go +++ b/src/handlers/buckets.go @@ -7,6 +7,7 @@ import ( "strconv" "strings" "encoding/json" + "sync" iris "github.com/kataras/iris/v12" minio "github.com/minio/minio-go/v6" @@ -82,31 +83,40 @@ var BuckList = func(ctx iris.Context) { ctx.JSON(res) } -var BuckListExtended = func(ctx iris.Context) { - lb, err := minioClnt.ListBuckets() - allBuckets := []interface{}{} - for _, bucket := range lb { - bn, err := minioClnt.GetBucketNotification(bucket.Name) - if err != nil { - log.Print("Error while getting bucket notification", err) - } - bq, _ := madmClnt.GetBucketQuota(context.Background(), bucket.Name) - bt, bterr := minioClnt.GetBucketTaggingWithContext(context.Background(), bucket.Name) +var BuckListExtended = func(ctx iris.Context) { - pName, _, _ := getPolicyWithName(bucket.Name) + var wg sync.WaitGroup - btMap := map[string]string{} + lb, err := minioClnt.ListBuckets() + allBuckets := make([]iris.Map, len(lb)) - if bterr == nil { - btMap = bt.ToMap() - } + wg.Add(len(lb)) + for i := 0; i < len(lb); i++ { + go func(i int) { + bucket := lb[i] + bn, err := minioClnt.GetBucketNotification(bucket.Name) + if err != nil { + log.Print("Error while getting bucket notification", err) + } + bq, _ := madmClnt.GetBucketQuota(context.Background(), bucket.Name) + bt, bterr := minioClnt.GetBucketTaggingWithContext(context.Background(), bucket.Name) - br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap, "policy": pName} - allBuckets = append(allBuckets, br) - } + pName, _, _ := getPolicyWithName(bucket.Name) - var res = resph.BodyResHandler(ctx, err, allBuckets) - ctx.JSON(res) + btMap := map[string]string{} + + if bterr == nil { + btMap = bt.ToMap() + } + + br := iris.Map{"name": bucket.Name, "info": bucket, "events": bn, "quota": bq, "tags": btMap, "policy": pName} + allBuckets[i] = br + wg.Done() + }(i) + } + wg.Wait() + var res = resph.BodyResHandler(ctx, err, allBuckets) + ctx.JSON(res) } var BuckSetTags = func(ctx iris.Context) { @@ -321,7 +331,6 @@ var BuckGetPolicy = func(ctx iris.Context) { if resph.CheckAuthBeforeRequest(ctx) != false { pName, bp, err := getPolicyWithName(bucketName) - fmt.Println("POLICY GET", pName) respBp := iris.Map{"policy":bp, "name":pName} var res = resph.BodyResHandler(ctx, err, respBp) ctx.JSON(res) From 07428537132003bf5befc52584ab3e977d3cc58a Mon Sep 17 00:00:00 2001 From: rzrbld Date: Wed, 1 Jul 2020 17:03:15 +0300 Subject: [PATCH 15/16] Update openapi.html --- openAPI/openapi.html | 54 ++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/openAPI/openapi.html b/openAPI/openapi.html index 99e9b04..a80767b 100644 --- a/openAPI/openapi.html +++ b/openAPI/openapi.html @@ -280,7 +280,7 @@ -

Adminio API (2.0.0)

Download OpenAPI specification:Download

Adminio API

+ " fill="currentColor">

Adminio API (2.3.0)

Download OpenAPI specification:Download

Adminio API

bucket

List all buckets

Responses

200

List all buckets

default

unexpected error

get/buckets/list
http://localhost:8080/api/v2/buckets/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
[
  • {
    }
]

List all buckets with ARN's and Quota's

Responses

200

List all buckets plus ARN and Quota

default

unexpected error

-
get/buckets/list-extended
http://localhost:8080/api/v2/buckets/list-extended

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
[
  • {
    }
]

Create a bucket

Request Body schema: multipart/form-data
newBucket
string <string>
newBucketRegion
string <string>

Responses

200

Success

+
get/buckets/list-extended
http://localhost:8080/api/v2/buckets/list-extended

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
[
  • {
    }
]

Create a bucket

Request Body schema: multipart/form-data
newBucket
string <string>
newBucketRegion
string <string>

Responses

200

Success

default

unexpected error

post/bucket/create
http://localhost:8080/api/v2/bucket/create

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Delete bucket

Request Body schema: multipart/form-data
bucketName
string <string>

Responses

200

Success

default

unexpected error

@@ -325,51 +325,61 @@
default

unexpected error

post/bucket/get-quota
http://localhost:8080/api/v2/bucket/get-quota

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quota": 0,
  • "quotatype": "string"
}

Remove bucket quota

Request Body schema: multipart/form-data
bucketName
string <string>

Responses

200

Success

default

unexpected error

-
post/bucket/remove-quota
http://localhost:8080/api/v2/bucket/remove-quota

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

user

List all users

Responses

200

List all users

+
post/bucket/remove-quota
http://localhost:8080/api/v2/bucket/remove-quota

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Set bucket tags

Request Body schema: multipart/form-data
bucketName
string <string>
bucketTags
string <string>

comma separated list of tags. e.g. tag1=value1&tag2=value2

+

Responses

200

Success

+
default

unexpected error

+
post/bucket/set-tags
http://localhost:8080/api/v2/bucket/set-tags

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Get bucket tags

Request Body schema: multipart/form-data
bucketName
string <string>

Responses

200

bucket tags

+
default

unexpected error

+
post/bucket/get-tags
http://localhost:8080/api/v2/bucket/get-tags

Response samples

Content type
application/json
Copy
Expand all Collapse all
{ }

Get bucket policy

Request Body schema: multipart/form-data
bucketName
string <string>

Responses

200

bucket policy

+
default

unexpected error

+
post/bucket/get-policy
http://localhost:8080/api/v2/bucket/get-policy

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "policy": "string",
  • "name": "string"
}

Set bucket policy

Request Body schema: multipart/form-data
bucketName
string <string>
bucketPolicy
string <string>

predefined values none, upload, download, public or custom json string

+

Responses

200

Success

+
default

unexpected error

+
post/bucket/set-policy
http://localhost:8080/api/v2/bucket/set-policy

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

user

List all users

Responses

200

List all users

default

unexpected error

-
get/users/list
http://localhost:8080/api/v2/users/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "name":
    {
    }
}

Set User status

Request Body schema: multipart/form-data
accessKey
string <string>
status
string <string>
Enum: "enabled" "disabled"

Responses

200

Success

+
get/users/list
http://localhost:8080/api/v2/users/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "name":
    {
    }
}

Set User status

Request Body schema: multipart/form-data
accessKey
string <string>
status
string <string>
Enum: "enabled" "disabled"

Responses

200

Success

default

unexpected error

-
post/user/set-status
http://localhost:8080/api/v2/user/set-status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Delete User

Request Body schema: multipart/form-data
accessKey
string <string>

Responses

200

Success

+
post/user/set-status
http://localhost:8080/api/v2/user/set-status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Delete User

Request Body schema: multipart/form-data
accessKey
string <string>

Responses

200

Success

default

unexpected error

-
post/user/delete
http://localhost:8080/api/v2/user/delete

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Create User

Request Body schema: multipart/form-data
accessKey
string <string>
secretKey
string <string>

Responses

200

Success

+
post/user/delete
http://localhost:8080/api/v2/user/delete

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Create User

Request Body schema: multipart/form-data
accessKey
string <string>
secretKey
string <string>

Responses

200

Success

default

unexpected error

-
post/user/create
http://localhost:8080/api/v2/user/create

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Create User with bounded policy

Request Body schema: multipart/form-data
accessKey
string <string>
secretKey
string <string>
policyName
string <string>

Responses

200

Success

+
post/user/create
http://localhost:8080/api/v2/user/create

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Create User with bounded policy

Request Body schema: multipart/form-data
accessKey
string <string>
secretKey
string <string>
policyName
string <string>

Responses

200

Success

default

unexpected error

-
post/user/create-extended
http://localhost:8080/api/v2/user/create-extended

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Update User - change policy or status

Request Body schema: multipart/form-data
accessKey
string <string>
secretKey
string <string>
policyName
string <string>
status
string <string>
Enum: "enabled" "disabled"

Responses

200

Success

+
post/user/create-extended
http://localhost:8080/api/v2/user/create-extended

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Update User - change policy or status

Request Body schema: multipart/form-data
accessKey
string <string>
secretKey
string <string>
policyName
string <string>
status
string <string>
Enum: "enabled" "disabled"

Responses

200

Success

default

unexpected error

-
post/user/update
http://localhost:8080/api/v2/user/update

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

policy

List all policies

Responses

200

List all policies

+
post/user/update
http://localhost:8080/api/v2/user/update

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

policy

List all policies

Responses

200

List all policies

default

unexpected error

-
get/policies/list
http://localhost:8080/api/v2/policies/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "name":
    {
    }
}

Create policy

Request Body schema: multipart/form-data
policyName
string <string>
policyString
string <string>

Responses

200

Success

+
get/policies/list
http://localhost:8080/api/v2/policies/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "name":
    {
    }
}

Create policy

Request Body schema: multipart/form-data
policyName
string <string>
policyString
string <string>

Responses

200

Success

default

unexpected error

-
post/policy/create
http://localhost:8080/api/v2/policy/create

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Delete policy

Request Body schema: multipart/form-data
policyName
string <string>

Responses

200

Success

+
post/policy/create
http://localhost:8080/api/v2/policy/create

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Delete policy

Request Body schema: multipart/form-data
policyName
string <string>

Responses

200

Success

default

unexpected error

-
post/policy/delete
http://localhost:8080/api/v2/policy/delete

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Bound policy to user or group

Request Body schema: multipart/form-data
policyName
string <string>

Ploicy Name

+
post/policy/delete
http://localhost:8080/api/v2/policy/delete

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Bound policy to user or group

Request Body schema: multipart/form-data
policyName
string <string>

Ploicy Name

entityName
string <string>

Group or User name

isGroup
boolean <boolean>
Enum: true false

Responses

200

Success

default

unexpected error

-
post/policy/update
http://localhost:8080/api/v2/policy/update

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

group

Group set status

Request Body schema: multipart/form-data
group
string <string>

Group Name

+
post/policy/update
http://localhost:8080/api/v2/policy/update

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

group

Group set status

Request Body schema: multipart/form-data
group
string <string>

Group Name

status
boolean <boolean>
Enum: "enabled" "disabled"

Responses

200

Success

default

unexpected error

-
post/group/set-status
http://localhost:8080/api/v2/group/set-status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Group get description

Request Body schema: multipart/form-data
group
string <string>

Group Name

+
post/group/set-status
http://localhost:8080/api/v2/group/set-status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

Group get description

Request Body schema: multipart/form-data
group
string <string>

Group Name

Responses

200

Success

default

unexpected error

-
post/group/get-description
http://localhost:8080/api/v2/group/get-description

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "status": "string",
  • "members":
    [
    ],
  • "policy": "string"
}

Update Group members

Request Body schema: multipart/form-data
group
string <string>

Group Name

+
post/group/get-description
http://localhost:8080/api/v2/group/get-description

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "status": "string",
  • "members":
    [
    ],
  • "policy": "string"
}

Update Group members

Request Body schema: multipart/form-data
group
string <string>

Group Name

members
string <string>

multiple usernames with comma delimiter

IsRemove
boolean <boolean>
Enum: true false

set false if you need remove members from group

Responses

200

Success

default

unexpected error

-
post/group/update-members
http://localhost:8080/api/v2/group/update-members

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

List all groups

Responses

200

List all groups

+
post/group/update-members
http://localhost:8080/api/v2/group/update-members

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "Success": "OK"
}

List all groups

Responses

200

List all groups

default

unexpected error

-
get/groups/list
http://localhost:8080/api/v2/groups/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
[
  • "string"
]

server

Server basic info

Responses

200

Server Info

+
get/groups/list
http://localhost:8080/api/v2/groups/list

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
[
  • "string"
]

server

Server basic info

Responses

200

Server Info

default

unexpected error

-
get/server/common-info
http://localhost:8080/api/v2/server/common-info

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "mode": "string",
  • "sqsARN":
    [
    ],
  • "deploymentID": "string",
  • "buckets":
    {
    },
  • "objects":
    {
    },
  • "usage":
    {
    },
  • "services":
    {
    },
  • "backend":
    {
    },
  • "servers":
    [
    ]
}

Server disk info

Responses

200

Server Disk Info

+
get/server/common-info
http://localhost:8080/api/v2/server/common-info

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "mode": "string",
  • "sqsARN":
    [
    ],
  • "deploymentID": "string",
  • "buckets":
    {
    },
  • "objects":
    {
    },
  • "usage":
    {
    },
  • "services":
    {
    },
  • "backend":
    {
    },
  • "servers":
    [
    ]
}

Server disk info

Responses

200

Server Disk Info

default

unexpected error

-
get/server/disk-info
http://localhost:8080/api/v2/server/disk-info

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "lastUpdate": "string",
  • "objectsCount": 0,
  • "objectsTotalSize": 0,
  • "objectsSizesHistogram":
    {
    },
  • "bucketsCount": 0,
  • "bucketsSizes": { }
}

kv

get value by key

Request Body schema: multipart/form-data
keyString
string <string>

Group Name

+
get/server/disk-info
http://localhost:8080/api/v2/server/disk-info

Response samples

Content type
application/json; charset=UTF-8
Copy
Expand all Collapse all
{
  • "lastUpdate": "string",
  • "objectsCount": 0,
  • "objectsTotalSize": 0,
  • "objectsSizesHistogram":
    {
    },
  • "bucketsCount": 0,
  • "bucketsSizes": { }
}

kv

get value by key

Request Body schema: multipart/form-data
keyString
string <string>

Group Name

Responses

200

base64 string

default

unexpected error

-
post/kv/get
http://localhost:8080/api/v2/kv/get

Response samples

Content type
application/json
Copy
Expand all Collapse all
"string"
+
post/kv/get
http://localhost:8080/api/v2/kv/get

Response samples

Content type
application/json
Copy
Expand all Collapse all
"string"