From f14a39342e21169174414e6deb9020f1f2cee46e Mon Sep 17 00:00:00 2001 From: Andres Martinez Gotor Date: Thu, 4 Nov 2021 15:50:46 +0100 Subject: [PATCH 1/4] remove backend code --- .drone.yml | 28 +- .eslintrc | 28 ++ .prettierrc.js | 4 +- go.mod | 14 +- go.sum | 527 -------------------------- package.json | 11 +- pkg/awsds/sessions.go | 243 ------------ pkg/awsds/sessions_test.go | 222 ----------- pkg/awsds/settings.go | 127 ------- pkg/awsds/settings_test.go | 32 -- pkg/awsds/types.go | 14 - pkg/sigv4/sigv4.go | 226 ----------- pkg/sql/api/api.go | 90 ----- pkg/sql/api/api_test.go | 113 ------ pkg/sql/datasource/datasource.go | 170 --------- pkg/sql/datasource/datasource_test.go | 287 -------------- pkg/sql/datasource/utils.go | 21 - pkg/sql/datasource/utils_test.go | 15 - pkg/sql/driver/driver.go | 16 - pkg/sql/models/models.go | 15 - pkg/sql/routes/routes.go | 76 ---- pkg/sql/routes/routes_test.go | 122 ------ yarn.lock | 31 +- 23 files changed, 86 insertions(+), 2346 deletions(-) create mode 100644 .eslintrc delete mode 100644 pkg/awsds/sessions.go delete mode 100644 pkg/awsds/sessions_test.go delete mode 100644 pkg/awsds/settings.go delete mode 100644 pkg/awsds/settings_test.go delete mode 100644 pkg/awsds/types.go delete mode 100644 pkg/sigv4/sigv4.go delete mode 100644 pkg/sql/api/api.go delete mode 100644 pkg/sql/api/api_test.go delete mode 100644 pkg/sql/datasource/datasource.go delete mode 100644 pkg/sql/datasource/datasource_test.go delete mode 100644 pkg/sql/datasource/utils.go delete mode 100644 pkg/sql/datasource/utils_test.go delete mode 100644 pkg/sql/driver/driver.go delete mode 100644 pkg/sql/models/models.go delete mode 100644 pkg/sql/routes/routes.go delete mode 100644 pkg/sql/routes/routes_test.go diff --git a/.drone.yml b/.drone.yml index 918f8be..06fa074 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,23 +10,27 @@ platform: arch: amd64 steps: - - name: build - image: grafana/grafana-plugin-ci:1.2.1-alpine + - name: initialize + image: grafana/grafana-plugin-ci:1.1.0-alpine commands: - - mage -v build + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.27/grabpl + - chmod +x bin/grabpl + - mkdir ci + - yarn install --frozen-lockfile --no-progress + - rm -rf node_modules/@grafana/data/node_modules - - name: lint - image: grafana/grafana-plugin-ci:1.2.1-alpine + - name: build-and-test-frontend + image: grafana/grafana-plugin-ci:1.1.0-alpine commands: - - mage -v lint - - - name: test - image: grafana/grafana-plugin-ci:1.2.1-alpine - commands: - - mage -v test + - yarn eslint ./src --ext .js,.jsx,.ts,.tsx + - yarn build + - yarn test-ci + depends_on: + - initialize --- kind: signature -hmac: b980986bcf4841da3d58e4adb04bd532480c15b1a719570cece295970e5d7265 +hmac: 032b0b1724c1fe669af7ae31ca652e90ce525e561c9c248fb44d72ffd1c2cb0f ... diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..56189b5 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,28 @@ +{ + "extends": ["@grafana/eslint-config"], + "root": true, + "plugins": ["no-only-tests", "@emotion", "lodash"], + "rules": { + "no-only-tests/no-only-tests": "error", + "react/prop-types": "off", + "@emotion/jsx-import": "error", + "lodash/import-scope": [2, "member"] + }, + "overrides": [ + { + "files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"], + "rules": { + "react-hooks/rules-of-hooks": "off", + "react-hooks/exhaustive-deps": "off" + } + }, + { + "files": ["packages/grafana-ui/src/components/ThemeDemos/**/*.{ts,tsx}"], + "rules": { + "@emotion/jsx-import": "off", + "react/jsx-uses-react": "off", + "react/react-in-jsx-scope": "off" + } + } + ] +} diff --git a/.prettierrc.js b/.prettierrc.js index a4df736..c14684b 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,5 +1,3 @@ module.exports = { - trailingComma: 'es5', - singleQuote: true, - printWidth: 120, + ...require('@grafana/toolkit/src/config/prettier.plugin.config.json'), }; diff --git a/go.mod b/go.mod index 6ed729d..e749e78 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,5 @@ -module github.com/grafana/grafana-aws-sdk +module github.com/grafana/grafana-aws-sdk-react -go 1.14 +go 1.17 -require ( - github.com/aws/aws-sdk-go v1.35.30 - github.com/google/go-cmp v0.5.6 - github.com/grafana/grafana-plugin-sdk-go v0.94.0 - github.com/grafana/sqlds/v2 v2.3.2 - github.com/jpillora/backoff v1.0.0 - github.com/magefile/mage v1.11.0 - github.com/stretchr/testify v1.7.0 -) +require github.com/magefile/mage v1.11.0 diff --git a/go.sum b/go.sum index 0c267e7..edf273b 100644 --- a/go.sum +++ b/go.sum @@ -1,529 +1,2 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= -github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -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/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/apache/arrow/go/arrow v0.0.0-20210223225224-5bea62493d91 h1:rbe942bXzd2vnds4y9fYQL8X4yFltXoZsKW7KtG+TFM= -github.com/apache/arrow/go/arrow v0.0.0-20210223225224-5bea62493d91/go.mod h1:c9sxoIT3YgLxH4UhLOCKaBlEojuMhVYpk4Ntv3opUTQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.35.30 h1:ZT+70Tw1ar5U2bL81ZyIvcLorxlD1UoxoIgjsEkismY= -github.com/aws/aws-sdk-go v1.35.30/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= -github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -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/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1 h1:jAbXjIeW2ZSW2AwFxlGTDoc2CjI2XujLkV3ArsZFCvc= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -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/flatbuffers v1.11.0 h1:O7CEyB8Cb3/DmtxODGtLHcEvpr81Jm5qLg/hsHnxA2A= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -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/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grafana/grafana-plugin-sdk-go v0.94.0 h1:S5Jk3QFzH2XXbVze9RDStwf/AjwpeDRUayVgC4LuczY= -github.com/grafana/grafana-plugin-sdk-go v0.94.0/go.mod h1:3VXz4nCv6wH5SfgB3mlW39s+c+LetqSCjFj7xxPC5+M= -github.com/grafana/sqlds/v2 v2.3.2 h1:HiMPTn/g4CXPXjWYLc22KwKSK5yR2DyG0wr95M7giZM= -github.com/grafana/sqlds/v2 v2.3.2/go.mod h1:34uyqPBWsEvg4V/xxh6V4uIqwu1qLfOfsmScll/ukrk= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd h1:rNuUHR+CvK1IS89MMtcF0EpcVMZtjKfPRp4MEmt/aTs= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.2.2 h1:mgDpq0PkoK5gck2w4ivaMpWRHv/matdOR4xmeScmf/w= -github.com/hashicorp/go-plugin v1.2.2/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -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.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.11.0 h1:C/55Ywp9BpgVVclD3lRnSYCwXTYxmSppIgLeDYlNuls= github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/mattetti/filebuffer v1.0.1 h1:gG7pyfnSIZCxdoKq+cPa8T0hhYtD9NxCdI4D7PTjRLM= -github.com/mattetti/filebuffer v1.0.1/go.mod h1:YdMURNDOttIiruleeVr6f56OrMc+MydEnTcXwtkxNVs= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= -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/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/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.2.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/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.23.0 h1:GXWvPYuTUenIa+BhOq/x+L/QZzCqASkVRny5KTlPDGM= -github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -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/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -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= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -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/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -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= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/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/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -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-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/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-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f h1:Yv4xsIx7HZOoyUGSJ2ksDyWE2qIBXROsZKt2ny3hCGM= -google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200910201057-6591123024b3/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -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/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/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.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-20200313102051-9f266ea9e77c/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-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/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= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/package.json b/package.json index 60e96f4..2bc2c2b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "clean": "rimraf ./dist ./compiled", "typecheck": "tsc --noEmit", "publish": "npm publish --access=public --scope=grafana", - "test": "jest --notify --watch" + "test": "jest --notify --watch", + "test-ci": "grafana-toolkit plugin:test" }, "files": [ "index.js", @@ -21,13 +22,14 @@ "license": "Apache-2.0", "dependencies": {}, "devDependencies": { - "@grafana/data": "^7.5.0", - "@grafana/ui": "^7.5.0", "@babel/preset-env": "^7.13.12", "@babel/preset-react": "^7.13.13", "@babel/preset-typescript": "^7.13.0", + "@emotion/eslint-plugin": "^11.5.0", + "@grafana/data": "^7.5.0", "@grafana/toolkit": "^7.5.1", "@grafana/tsconfig": "^1.0.0-rc1", + "@grafana/ui": "^7.5.0", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "4.0.3", "@rollup/plugin-node-resolve": "7.1.1", @@ -45,6 +47,9 @@ "@types/rollup-plugin-visualizer": "2.6.0", "@types/sinon": "^7.5.2", "babel-jest": "^26.6.3", + "eslint-plugin": "^1.0.1", + "eslint-plugin-lodash": "^7.3.0", + "eslint-plugin-no-only-tests": "^2.6.0", "jest": "^26.6.3", "pretty-format": "25.1.0", "react-test-renderer": "^17.0.2", diff --git a/pkg/awsds/sessions.go b/pkg/awsds/sessions.go deleted file mode 100644 index ddbbd0c..0000000 --- a/pkg/awsds/sessions.go +++ /dev/null @@ -1,243 +0,0 @@ -package awsds - -import ( - "fmt" - "os" - "strconv" - "strings" - "sync" - "time" - - "github.com/grafana/grafana-plugin-sdk-go/backend" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" - "github.com/aws/aws-sdk-go/aws/credentials/stscreds" - "github.com/aws/aws-sdk-go/aws/ec2metadata" - "github.com/aws/aws-sdk-go/aws/session" -) - -var plog = backend.Logger - -type envelope struct { - session *session.Session - expiration time.Time -} - -// SessionCache cache sessions for a while -type SessionCache struct { - sessCache map[string]envelope - sessCacheLock sync.RWMutex - authSettings *AuthSettings -} - -// NewSessionCache creates a new session cache using the default settings loaded from environment variables -func NewSessionCache() *SessionCache { - return &SessionCache{ - sessCache: map[string]envelope{}, - authSettings: ReadAuthSettingsFromEnvironmentVariables(), - } -} - -// AllowedAuthProvidersEnvVarKeyName is the string literal for the aws allowed auth providers environment variable key name -const AllowedAuthProvidersEnvVarKeyName = "AWS_AUTH_AllowedAuthProviders" - -// AssumeRoleEnabledEnvVarKeyName is the string literal for the aws assume role enabled environment variable key name -const AssumeRoleEnabledEnvVarKeyName = "AWS_AUTH_AssumeRoleEnabled" - -func ReadAuthSettingsFromEnvironmentVariables() *AuthSettings { - allowedAuthProviders := []string{} - providers := os.Getenv(AllowedAuthProvidersEnvVarKeyName) - for _, authProvider := range strings.Split(providers, ",") { - authProvider = strings.TrimSpace(authProvider) - if authProvider != "" { - allowedAuthProviders = append(allowedAuthProviders, authProvider) - } - } - - if len(allowedAuthProviders) == 0 { - allowedAuthProviders = []string{"default", "keys", "credentials"} - plog.Warn("could not find allowed auth providers. falling back to 'default, keys, credentials'") - } - - assumeRoleEnabledString := os.Getenv(AssumeRoleEnabledEnvVarKeyName) - if len(assumeRoleEnabledString) == 0 { - plog.Warn("environment variable '%s' missing. falling back to enable assume role", AssumeRoleEnabledEnvVarKeyName) - assumeRoleEnabledString = "true" - } - - assumeRoleEnabled, err := strconv.ParseBool(assumeRoleEnabledString) - if err != nil { - plog.Error("could not parse env variable '%s'", AssumeRoleEnabledEnvVarKeyName) - assumeRoleEnabled = true - } - - return &AuthSettings{ - AllowedAuthProviders: allowedAuthProviders, - AssumeRoleEnabled: assumeRoleEnabled, - } -} - -// Session factory. -// Stubbable by tests. -//nolint:gocritic -var newSession = func(cfgs ...*aws.Config) (*session.Session, error) { - return session.NewSession(cfgs...) -} - -// STS credentials factory. -// Stubbable by tests. -//nolint:gocritic -var newSTSCredentials = stscreds.NewCredentials - -// EC2Metadata service factory. -// Stubbable by tests. -//nolint:gocritic -var newEC2Metadata = ec2metadata.New - -// EC2 role credentials factory. -// Stubbable by tests. -var newEC2RoleCredentials = func(sess *session.Session) *credentials.Credentials { - return credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{Client: ec2metadata.New(sess), ExpiryWindow: stscreds.DefaultDuration}) -} - -// GetSession returns a session from the config and possible region overrides -- implements AmazonSessionProvider -func (sc *SessionCache) GetSession(region string, s AWSDatasourceSettings) (*session.Session, error) { - if region == "" || region == defaultRegion { - region = s.Region - } - - authTypeAllowed := false - for _, provider := range sc.authSettings.AllowedAuthProviders { - if provider == s.AuthType.String() { - authTypeAllowed = true - break - } - } - if !authTypeAllowed { - return nil, fmt.Errorf("attempting to use an auth type that is not allowed: %q", s.AuthType.String()) - } - - if s.AssumeRoleARN != "" && !sc.authSettings.AssumeRoleEnabled { - return nil, fmt.Errorf("attempting to use assume role (ARN) which is disabled in grafana.ini") - } - - bldr := strings.Builder{} - for i, s := range []string{ - s.AuthType.String(), s.AccessKey, s.Profile, s.AssumeRoleARN, region, s.Endpoint, - } { - if i != 0 { - bldr.WriteString(":") - } - bldr.WriteString(strings.ReplaceAll(s, ":", `\:`)) - } - cacheKey := bldr.String() - - sc.sessCacheLock.RLock() - if env, ok := sc.sessCache[cacheKey]; ok { - if env.expiration.After(time.Now().UTC()) { - sc.sessCacheLock.RUnlock() - return env.session, nil - } - } - sc.sessCacheLock.RUnlock() - - cfgs := []*aws.Config{ - { - CredentialsChainVerboseErrors: aws.Bool(true), - }, - } - - var regionCfg *aws.Config - if region == defaultRegion { - plog.Warn("Region is set to \"default\", which is unsupported") - region = "" - } - if region != "" { - regionCfg = &aws.Config{Region: aws.String(region)} - cfgs = append(cfgs, regionCfg) - } - - if s.Endpoint != "" { - cfgs = append(cfgs, &aws.Config{Endpoint: aws.String(s.Endpoint)}) - } - - switch s.AuthType { - case AuthTypeSharedCreds: - plog.Debug("Authenticating towards AWS with shared credentials", "profile", s.Profile, - "region", region) - cfgs = append(cfgs, &aws.Config{ - Credentials: credentials.NewSharedCredentials("", s.Profile), - }) - case AuthTypeKeys: - plog.Debug("Authenticating towards AWS with an access key pair", "region", region) - cfgs = append(cfgs, &aws.Config{ - Credentials: credentials.NewStaticCredentials(s.AccessKey, s.SecretKey, s.SessionToken), - }) - case AuthTypeDefault: - plog.Debug("Authenticating towards AWS with default SDK method", "region", region) - case AuthTypeEC2IAMRole: - plog.Debug("Authenticating towards AWS with IAM Role", "region", region) - sess, err := newSession(cfgs...) - if err != nil { - return nil, err - } - cfgs = append(cfgs, &aws.Config{Credentials: newEC2RoleCredentials(sess)}) - default: - panic(fmt.Sprintf("Unrecognized authType: %d", s.AuthType)) - } - sess, err := newSession(cfgs...) - if err != nil { - return nil, err - } - - duration := stscreds.DefaultDuration - expiration := time.Now().UTC().Add(duration) - if s.AssumeRoleARN != "" && sc.authSettings.AssumeRoleEnabled { - // We should assume a role in AWS - plog.Debug("Trying to assume role in AWS", "arn", s.AssumeRoleARN) - - cfgs := []*aws.Config{ - { - CredentialsChainVerboseErrors: aws.Bool(true), - }, - { - Credentials: newSTSCredentials(sess, s.AssumeRoleARN, func(p *stscreds.AssumeRoleProvider) { - // Not sure if this is necessary, overlaps with p.Duration and is undocumented - p.Expiry.SetExpiration(expiration, 0) - p.Duration = duration - if s.ExternalID != "" { - p.ExternalID = aws.String(s.ExternalID) - } - }), - }, - } - if regionCfg != nil { - cfgs = append(cfgs, regionCfg) - } - sess, err = newSession(cfgs...) - if err != nil { - return nil, err - } - } - - plog.Debug("Successfully created AWS session") - - sc.sessCacheLock.Lock() - sc.sessCache[cacheKey] = envelope{ - session: sess, - expiration: expiration, - } - sc.sessCacheLock.Unlock() - - return sess, nil -} - -func GetSessionWithDefaultRegion(sessionCache *SessionCache, settings AWSDatasourceSettings) (*session.Session, error) { - region := settings.DefaultRegion - if settings.Region != "" { - region = settings.Region - } - return sessionCache.GetSession(region, settings) -} diff --git a/pkg/awsds/sessions_test.go b/pkg/awsds/sessions_test.go deleted file mode 100644 index 1b63ea2..0000000 --- a/pkg/awsds/sessions_test.go +++ /dev/null @@ -1,222 +0,0 @@ -package awsds - -import ( - "os" - "reflect" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" - "github.com/aws/aws-sdk-go/aws/credentials/stscreds" - "github.com/aws/aws-sdk-go/aws/ec2metadata" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -// Test cloudWatchExecutor.newSession with assumption of IAM role. -func TestNewSession_AssumeRole(t *testing.T) { - origNewSession := newSession - origNewSTSCredentials := newSTSCredentials - origNewEC2Metadata := newEC2Metadata - t.Cleanup(func() { - newSession = origNewSession - newSTSCredentials = origNewSTSCredentials - newEC2Metadata = origNewEC2Metadata - }) - newSession = func(cfgs ...*aws.Config) (*session.Session, error) { - cfg := aws.Config{} - cfg.MergeIn(cfgs...) - return &session.Session{ - Config: &cfg, - }, nil - } - newSTSCredentials = func(c client.ConfigProvider, roleARN string, - options ...func(*stscreds.AssumeRoleProvider)) *credentials.Credentials { - p := &stscreds.AssumeRoleProvider{ - RoleARN: roleARN, - } - for _, o := range options { - o(p) - } - - return credentials.NewCredentials(p) - } - newEC2Metadata = func(p client.ConfigProvider, cfgs ...*aws.Config) *ec2metadata.EC2Metadata { - return nil - } - duration := stscreds.DefaultDuration - - t.Run("Without external ID", func(t *testing.T) { - resetEnvironmentVariables() - const roleARN = "test" - settings := AWSDatasourceSettings{ - AssumeRoleARN: roleARN, - } - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "default") - os.Setenv(AssumeRoleEnabledEnvVarKeyName, "true") - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.NoError(t, err) - require.NotNil(t, sess) - expCreds := credentials.NewCredentials(&stscreds.AssumeRoleProvider{ - RoleARN: roleARN, - Duration: duration, - }) - diff := cmp.Diff(expCreds, sess.Config.Credentials, cmp.Exporter(func(_ reflect.Type) bool { - return true - }), cmpopts.IgnoreFields(stscreds.AssumeRoleProvider{}, "Expiry")) - assert.Empty(t, diff) - }) - - t.Run("With external ID", func(t *testing.T) { - resetEnvironmentVariables() - const roleARN = "test" - const externalID = "external" - settings := AWSDatasourceSettings{ - AssumeRoleARN: roleARN, - ExternalID: externalID, - } - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "default") - os.Setenv(AssumeRoleEnabledEnvVarKeyName, "true") - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.NoError(t, err) - require.NotNil(t, sess) - expCreds := credentials.NewCredentials(&stscreds.AssumeRoleProvider{ - RoleARN: roleARN, - ExternalID: aws.String(externalID), - Duration: duration, - }) - diff := cmp.Diff(expCreds, sess.Config.Credentials, cmp.Exporter(func(_ reflect.Type) bool { - return true - }), cmpopts.IgnoreFields(stscreds.AssumeRoleProvider{}, "Expiry")) - assert.Empty(t, diff) - }) - - t.Run("Assume role not enabled", func(t *testing.T) { - resetEnvironmentVariables() - const roleARN = "test" - settings := AWSDatasourceSettings{ - AssumeRoleARN: roleARN, - } - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "default") - os.Setenv(AssumeRoleEnabledEnvVarKeyName, "false") - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.Error(t, err) - require.Nil(t, sess) - expectedError := "attempting to use assume role (ARN) which is disabled in grafana.ini" - assert.Equal(t, expectedError, err.Error()) - }) - - t.Run("Assume role is enabled when AssumeRoleEnabled env var is missing", func(t *testing.T) { - resetEnvironmentVariables() - const roleARN = "test" - settings := AWSDatasourceSettings{ - AssumeRoleARN: roleARN, - } - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "default") - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.NoError(t, err) - require.NotNil(t, sess) - expCreds := credentials.NewCredentials(&stscreds.AssumeRoleProvider{ - RoleARN: roleARN, - Duration: duration, - }) - diff := cmp.Diff(expCreds, sess.Config.Credentials, cmp.Exporter(func(_ reflect.Type) bool { - return true - }), cmpopts.IgnoreFields(stscreds.AssumeRoleProvider{}, "Expiry")) - assert.Empty(t, diff) - }) -} - -func TestNewSession_AllowedAuthProviders(t *testing.T) { - t.Run("Not allowed auth type is used", func(t *testing.T) { - resetEnvironmentVariables() - settings := AWSDatasourceSettings{ - AuthType: AuthTypeDefault, - } - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "keys") - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.Error(t, err) - require.Nil(t, sess) - assert.Equal(t, `attempting to use an auth type that is not allowed: "default"`, err.Error()) - }) - - t.Run("Allowed auth type is used", func(t *testing.T) { - resetEnvironmentVariables() - settings := AWSDatasourceSettings{ - AuthType: AuthTypeKeys, - } - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "keys") - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.NoError(t, err) - require.NotNil(t, sess) - }) - - t.Run("Fallback is used when AllowedAuthProviders env var is missing", func(t *testing.T) { - defaultAuthProviders := []AuthType{AuthTypeDefault, AuthTypeKeys, AuthTypeSharedCreds} - for _, provider := range defaultAuthProviders { - resetEnvironmentVariables() - settings := AWSDatasourceSettings{ - AuthType: provider, - } - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.NoError(t, err) - require.NotNil(t, sess) - } - }) -} - -func TestNewSession_EC2IAMRole(t *testing.T) { - newSession = func(cfgs ...*aws.Config) (*session.Session, error) { - cfg := aws.Config{} - cfg.MergeIn(cfgs...) - return &session.Session{ - Config: &cfg, - }, nil - } - newEC2Metadata = func(p client.ConfigProvider, cfgs ...*aws.Config) *ec2metadata.EC2Metadata { - return nil - } - newEC2RoleCredentials = func(sess *session.Session) *credentials.Credentials { - return credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{Client: newEC2Metadata(nil), ExpiryWindow: stscreds.DefaultDuration}) - } - - t.Run("Credentials are created", func(t *testing.T) { - settings := AWSDatasourceSettings{ - AuthType: AuthTypeEC2IAMRole, - } - - os.Setenv(AllowedAuthProvidersEnvVarKeyName, "ec2_iam_role") - os.Setenv(AssumeRoleEnabledEnvVarKeyName, "true") - - cache := NewSessionCache() - sess, err := cache.GetSession(defaultRegion, settings) - require.NoError(t, err) - require.NotNil(t, sess) - - expCreds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{ - Client: newEC2Metadata(nil), ExpiryWindow: stscreds.DefaultDuration, - }) - - diff := cmp.Diff(expCreds, sess.Config.Credentials, cmp.Exporter(func(_ reflect.Type) bool { - return true - }), cmpopts.IgnoreFields(stscreds.AssumeRoleProvider{}, "Expiry")) - assert.Empty(t, diff) - }) -} - -func resetEnvironmentVariables() { - os.Unsetenv(AllowedAuthProvidersEnvVarKeyName) - os.Unsetenv(AssumeRoleEnabledEnvVarKeyName) -} diff --git a/pkg/awsds/settings.go b/pkg/awsds/settings.go deleted file mode 100644 index 11cbb65..0000000 --- a/pkg/awsds/settings.go +++ /dev/null @@ -1,127 +0,0 @@ -package awsds - -import ( - "bytes" - "encoding/json" - "fmt" - - "github.com/grafana/grafana-plugin-sdk-go/backend" -) - -const defaultRegion = "default" - -type AuthType int - -const ( - AuthTypeDefault AuthType = iota - AuthTypeSharedCreds - AuthTypeKeys - AuthTypeEC2IAMRole -) - -func (at AuthType) String() string { - switch at { - case AuthTypeDefault: - return "default" - case AuthTypeSharedCreds: - return "credentials" - case AuthTypeKeys: - return "keys" - case AuthTypeEC2IAMRole: - return "ec2_iam_role" - default: - panic(fmt.Sprintf("Unrecognized auth type %d", at)) - } -} - -func ToAuthType(authType string) AuthType { - switch authType { - case "credentials", "sharedCreds": - return AuthTypeSharedCreds - case "keys": - return AuthTypeKeys - case "default": - return AuthTypeDefault - case "ec2_iam_role": - return AuthTypeEC2IAMRole - case "arn": - return AuthTypeDefault - default: - panic(fmt.Sprintf("Unrecognized auth type %s", authType)) - } -} - -// MarshalJSON marshals the enum as a quoted json string -func (at *AuthType) MarshalJSON() ([]byte, error) { - buffer := bytes.NewBufferString(`"`) - buffer.WriteString(at.String()) - buffer.WriteString(`"`) - return buffer.Bytes(), nil -} - -// UnmarshalJSON unmashals a quoted json string to the enum value -func (at *AuthType) UnmarshalJSON(b []byte) error { - var j string - err := json.Unmarshal(b, &j) - if err != nil { - return err - } - switch j { - case "credentials": // Old name - fallthrough - case "sharedCreds": - *at = AuthTypeSharedCreds - case "keys": - *at = AuthTypeKeys - case "ec2_iam_role": - *at = AuthTypeEC2IAMRole - case "default": - fallthrough - default: - *at = AuthTypeDefault // For old 'arn' option - } - return nil -} - -// DatasourceSettings holds basic connection info -type AWSDatasourceSettings struct { - Profile string `json:"profile"` - Region string `json:"region"` - AuthType AuthType `json:"authType"` - AssumeRoleARN string `json:"assumeRoleARN"` - ExternalID string `json:"externalId"` - - // Override the client endpoint - Endpoint string `json:"endpoint"` - - //go:deprecated Use Region instead - DefaultRegion string `json:"defaultRegion"` - - // Loaded from DecryptedSecureJSONData (not the json object) - AccessKey string `json:"-"` - SecretKey string `json:"-"` - SessionToken string `json:"-"` -} - -// LoadSettings will read and validate Settings from the DataSourceConfg -func (s *AWSDatasourceSettings) Load(config backend.DataSourceInstanceSettings) error { - if config.JSONData != nil && len(config.JSONData) > 1 { - if err := json.Unmarshal(config.JSONData, s); err != nil { - return fmt.Errorf("could not unmarshal DatasourceSettings json: %w", err) - } - } - - if s.Region == defaultRegion || s.Region == "" { - s.Region = s.DefaultRegion - } - - if s.Profile == "" { - s.Profile = config.Database // legacy support (only for cloudwatch?) - } - - s.AccessKey = config.DecryptedSecureJSONData["accessKey"] - s.SecretKey = config.DecryptedSecureJSONData["secretKey"] - s.SessionToken = config.DecryptedSecureJSONData["sessionToken"] - - return nil -} diff --git a/pkg/awsds/settings_test.go b/pkg/awsds/settings_test.go deleted file mode 100644 index b2f9895..0000000 --- a/pkg/awsds/settings_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package awsds - -import ( - "encoding/json" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/grafana/grafana-plugin-sdk-go/backend" - "github.com/stretchr/testify/assert" -) - -// Test load settings from json -func TestLoadSettings(t *testing.T) { - settings := &AWSDatasourceSettings{ - AuthType: AuthTypeKeys, - DefaultRegion: "aaaa", - } - - bytes, _ := json.Marshal(settings) - copy := &AWSDatasourceSettings{} - config := backend.DataSourceInstanceSettings{ - DecryptedSecureJSONData: map[string]string{}, - JSONData: bytes, - } - err := copy.Load(config) - if err != nil { - t.Fatalf("error reading config: %v", err) - } - - assert.Empty(t, cmp.Diff(settings.AuthType, copy.AuthType)) - assert.Empty(t, cmp.Diff(settings.DefaultRegion, copy.DefaultRegion)) -} diff --git a/pkg/awsds/types.go b/pkg/awsds/types.go deleted file mode 100644 index 8f8fb9b..0000000 --- a/pkg/awsds/types.go +++ /dev/null @@ -1,14 +0,0 @@ -package awsds - -import ( - "github.com/aws/aws-sdk-go/aws/session" -) - -// AmazonSessionProvider will return a session (perhaps cached) for given region and settings -type AmazonSessionProvider func(region string, s AWSDatasourceSettings) (*session.Session, error) - -// AuthSettings defines whether certain auth types and provider can be used or not -type AuthSettings struct { - AllowedAuthProviders []string - AssumeRoleEnabled bool -} diff --git a/pkg/sigv4/sigv4.go b/pkg/sigv4/sigv4.go deleted file mode 100644 index fede51b..0000000 --- a/pkg/sigv4/sigv4.go +++ /dev/null @@ -1,226 +0,0 @@ -package sigv4 - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" - "github.com/aws/aws-sdk-go/aws/credentials/stscreds" - "github.com/aws/aws-sdk-go/aws/ec2metadata" - "github.com/aws/aws-sdk-go/aws/session" - v4 "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/rest" - "github.com/grafana/grafana-aws-sdk/pkg/awsds" -) - -// Host header is likely not necessary here -// (see https://github.com/golang/go/blob/cad6d1fef5147d31e94ee83934c8609d3ad150b7/src/net/http/request.go#L92) -// but adding for completeness -var permittedHeaders = map[string]struct{}{ - "Host": {}, - "Uber-Trace-Id": {}, - "User-Agent": {}, - "Accept": {}, - "Accept-Encoding": {}, - "Content-Type": {}, - "Content-Length": {}, - "securitytenant": {}, - "sgtenant": {}, - "kbn-xsrf": {}, -} - -var ( - authSettings *awsds.AuthSettings = nil -) - -type middleware struct { - config *Config - next http.RoundTripper -} - -type Config struct { - AuthType string - - Profile string - - Service string - - AccessKey string - SecretKey string - SessionToken string - - AssumeRoleARN string - ExternalID string - Region string -} - -// The RoundTripperFunc type is an adapter to allow the use of ordinary -// functions as RoundTrippers. If f is a function with the appropriate -// signature, RoundTripperFunc(f) is a RoundTripper that calls f. -type RoundTripperFunc func(req *http.Request) (*http.Response, error) - -// RoundTrip implements the RoundTripper interface. -func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { - return rt(r) -} - -// New instantiates a new signing middleware with an optional succeeding -// middleware. The http.DefaultTransport will be used if nil -func New(config *Config, next http.RoundTripper) http.RoundTripper { - // Need to delay fetching auth settings until env vars have had a chance to propagate - if authSettings == nil { - authSettings = awsds.ReadAuthSettingsFromEnvironmentVariables() - } - - return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { - if next == nil { - next = http.DefaultTransport - } - return (&middleware{ - config: config, - next: next, - }).exec(r) - }) -} - -func (m *middleware) exec(req *http.Request) (*http.Response, error) { - _, err := m.signRequest(req) - if err != nil { - return nil, err - } - - return m.next.RoundTrip(req) -} - -func (m *middleware) signRequest(req *http.Request) (http.Header, error) { - signer, err := m.signer() - if err != nil { - return nil, err - } - - body, err := replaceBody(req) - if err != nil { - return nil, err - } - - if strings.Contains(req.URL.RawPath, "%2C") { - req.URL.RawPath = rest.EscapePath(req.URL.RawPath, false) - } - - stripHeaders(req) - - return signer.Sign(req, bytes.NewReader(body), m.config.Service, m.config.Region, time.Now().UTC()) -} - -func (m *middleware) signer() (*v4.Signer, error) { - authType := awsds.ToAuthType(m.config.AuthType) - - authTypeAllowed := false - for _, provider := range authSettings.AllowedAuthProviders { - if provider == authType.String() { - authTypeAllowed = true - break - } - } - - if !authTypeAllowed { - return nil, fmt.Errorf("attempting to use an auth type for SigV4 that is not allowed: %q", authType.String()) - } - - if m.config.AssumeRoleARN != "" && !authSettings.AssumeRoleEnabled { - return nil, fmt.Errorf("attempting to use assume role (ARN) for SigV4 which is not enabled") - } - - var c *credentials.Credentials - switch authType { - case awsds.AuthTypeKeys: - c = credentials.NewStaticCredentials(m.config.AccessKey, m.config.SecretKey, m.config.SessionToken) - case awsds.AuthTypeSharedCreds: - c = credentials.NewSharedCredentials("", m.config.Profile) - case awsds.AuthTypeEC2IAMRole: - s, err := session.NewSession(&aws.Config{ - Region: aws.String(m.config.Region), - }) - if err != nil { - return nil, err - } - c = credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{Client: ec2metadata.New(s), ExpiryWindow: stscreds.DefaultDuration}) - - if m.config.AssumeRoleARN != "" { - s, err = session.NewSession(&aws.Config{ - CredentialsChainVerboseErrors: aws.Bool(true), - Region: aws.String(m.config.Region), - Credentials: c, - }) - if err != nil { - return nil, err - } - c = stscreds.NewCredentials(s, m.config.AssumeRoleARN) - } - - return v4.NewSigner(c), nil - case awsds.AuthTypeDefault: - s, err := session.NewSession(&aws.Config{ - Region: aws.String(m.config.Region), - }) - if err != nil { - return nil, err - } - - if m.config.AssumeRoleARN != "" { - return v4.NewSigner(stscreds.NewCredentials(s, m.config.AssumeRoleARN)), nil - } - - return v4.NewSigner(s.Config.Credentials), nil - default: - if m.config.AssumeRoleARN != "" { - s, err := session.NewSession(&aws.Config{ - Region: aws.String(m.config.Region), - }) - if err != nil { - return nil, err - } - return v4.NewSigner(stscreds.NewCredentials(s, m.config.AssumeRoleARN)), nil - } - return nil, fmt.Errorf("invalid SigV4 auth type") - } - - if m.config.AssumeRoleARN != "" { - s, err := session.NewSession(&aws.Config{ - Region: aws.String(m.config.Region), - Credentials: c}, - ) - if err != nil { - return nil, err - } - return v4.NewSigner(stscreds.NewCredentials(s, m.config.AssumeRoleARN)), nil - } - - return v4.NewSigner(c), nil -} - -func replaceBody(req *http.Request) ([]byte, error) { - if req.Body == nil { - return []byte{}, nil - } - payload, err := ioutil.ReadAll(req.Body) - if err != nil { - return nil, err - } - req.Body = ioutil.NopCloser(bytes.NewReader(payload)) - return payload, nil -} - -func stripHeaders(req *http.Request) { - for h := range req.Header { - if _, exists := permittedHeaders[h]; !exists { - req.Header.Del(h) - } - } -} diff --git a/pkg/sql/api/api.go b/pkg/sql/api/api.go deleted file mode 100644 index 58fdfe7..0000000 --- a/pkg/sql/api/api.go +++ /dev/null @@ -1,90 +0,0 @@ -package api - -import ( - "context" - "errors" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/grafana/grafana-aws-sdk/pkg/awsds" - "github.com/grafana/grafana-aws-sdk/pkg/sql/models" - "github.com/grafana/grafana-plugin-sdk-go/backend/log" - "github.com/grafana/sqlds/v2" - "github.com/jpillora/backoff" -) - -var ( - ExecuteError = errors.New("error executing query") - StatusError = errors.New("error getting query query status") - StopError = errors.New("error stopping query") -) - -type ExecuteQueryInput struct { - ID string - Query string -} - -type ExecuteQueryOutput struct { - ID string -} - -type ExecuteQueryStatus struct { - ID string - Finished bool - State string -} - -type SQL interface { - Execute(aws.Context, *ExecuteQueryInput) (*ExecuteQueryOutput, error) - Status(aws.Context, *ExecuteQueryOutput) (*ExecuteQueryStatus, error) - Stop(*ExecuteQueryOutput) error -} - -type Resources interface { - Regions(aws.Context) ([]string, error) - Databases(aws.Context, sqlds.Options) ([]string, error) -} - -type AWSAPI interface { - SQL - Resources -} - -type Loader func(cache *awsds.SessionCache, settings models.Settings) (AWSAPI, error) - -var ( - backoffMin = 200 * time.Millisecond - backoffMax = 10 * time.Minute -) - -// WaitOnQuery polls the datasource api until the query finishes, returning an error if it failed. -func WaitOnQuery(ctx context.Context, api SQL, output *ExecuteQueryOutput) error { - backoffInstance := backoff.Backoff{ - Min: backoffMin, - Max: backoffMax, - Factor: 2, - } - for { - status, err := api.Status(ctx, output) - if err != nil { - return err - } - if status.Finished { - return nil - } - select { - case <-ctx.Done(): - err := ctx.Err() - if errors.Is(err, context.Canceled) { - err := api.Stop(output) - if err != nil { - return err - } - } - log.DefaultLogger.Debug("request failed", "query ID", output.ID, "error", err) - return err - case <-time.After(backoffInstance.Duration()): - continue - } - } -} diff --git a/pkg/sql/api/api_test.go b/pkg/sql/api/api_test.go deleted file mode 100644 index f04738b..0000000 --- a/pkg/sql/api/api_test.go +++ /dev/null @@ -1,113 +0,0 @@ -package api - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" -) - -type fakeDS struct { - statusCounter int - status []*ExecuteQueryStatus - statusErr error - stopped bool -} - -func (s *fakeDS) Execute(_ aws.Context, _ *ExecuteQueryInput) (*ExecuteQueryOutput, error) { - return &ExecuteQueryOutput{}, nil -} - -func (s *fakeDS) Stop(*ExecuteQueryOutput) error { - s.stopped = true - return nil -} - -func (s *fakeDS) Status(aws.Context, *ExecuteQueryOutput) (*ExecuteQueryStatus, error) { - i := s.statusCounter - s.statusCounter++ - return s.status[i], s.statusErr -} - -func TestWaitOnQuery(t *testing.T) { - // for tests we override backoff instance to always take 1 millisecond so the tests run quickly - backoffMin = 1 * time.Millisecond - backoffMax = 1 * time.Millisecond - - tests := []struct { - description string - ds *fakeDS - expectedErr error - }{ - { - "returns with no error", - &fakeDS{ - statusCounter: 0, - status: []*ExecuteQueryStatus{{Finished: true}}, - statusErr: nil, - }, - nil, - }, - { - "returns with no error after several calls", - &fakeDS{ - statusCounter: 0, - status: []*ExecuteQueryStatus{{Finished: false}, {Finished: true}}, - statusErr: nil, - }, - nil, - }, - { - "returns an error", - &fakeDS{ - statusCounter: 0, - status: []*ExecuteQueryStatus{{}}, - statusErr: StatusError, - }, - nil, - }, - } - - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - err := WaitOnQuery(context.TODO(), tc.ds, &ExecuteQueryOutput{}) - if tc.ds.statusCounter != len(tc.ds.status) { - t.Errorf("status not called the right amount of times. Want %d got %d", len(tc.ds.status), tc.ds.statusCounter) - } - if (err != nil || tc.ds.statusErr != nil) && !errors.Is(err, tc.ds.statusErr) { - t.Errorf("unexpected error %v", err) - } - }) - } -} - -func TestConnection_waitOnQueryCancelled(t *testing.T) { - // add a big timeout to have time to cancel - backoffMin = 10000 * time.Millisecond - backoffMax = 10000 * time.Millisecond - - ds := &fakeDS{ - statusCounter: 0, - status: []*ExecuteQueryStatus{{Finished: false}}, - } - - ctx, cancel := context.WithCancel(context.Background()) - done := make(chan bool) - - // start the execution in parallel - go func() { - err := WaitOnQuery(ctx, ds, &ExecuteQueryOutput{}) - if err == nil || !errors.Is(err, context.Canceled) { - t.Errorf("unexpected error %v", err) - } - done <- true - }() - cancel() - <-done - - if !ds.stopped { - t.Errorf("failed to cancel the request") - } -} diff --git a/pkg/sql/datasource/datasource.go b/pkg/sql/datasource/datasource.go deleted file mode 100644 index 294de21..0000000 --- a/pkg/sql/datasource/datasource.go +++ /dev/null @@ -1,170 +0,0 @@ -package datasource - -import ( - "database/sql" - "fmt" - "sync" - - "github.com/grafana/grafana-aws-sdk/pkg/awsds" - "github.com/grafana/grafana-aws-sdk/pkg/sql/api" - "github.com/grafana/grafana-aws-sdk/pkg/sql/driver" - "github.com/grafana/grafana-aws-sdk/pkg/sql/models" - "github.com/grafana/grafana-plugin-sdk-go/backend" - "github.com/grafana/sqlds/v2" -) - -// AWSDatasource stores a cache of several instances. -// Each Map will depend on the datasource ID (and connection options): -// - config: Base configuration. It will be used as base to populate datasource settings. -// It does not depend on connection options (only one per datasource) -// - api: API instace with the common methods to contact the data source API. -// - driver: Abstraction on top the upstream sql.Driver. Defined to handle multiple connections. -// - db: Upstream database (sql.DB). -// - sessionCache: AWS cache. This is not a Map since it does not depend on the datasource. -type AWSDatasource struct { - sessionCache *awsds.SessionCache - config sync.Map - api sync.Map - driver sync.Map - db sync.Map -} - -func New(config backend.DataSourceInstanceSettings) *AWSDatasource { - ds := &AWSDatasource{sessionCache: awsds.NewSessionCache()} - ds.config.Store(config.ID, config) - return ds -} - -func (d *AWSDatasource) storeDB(id int64, args sqlds.Options, db *sql.DB) { - key := connectionKey(id, args) - d.db.Store(key, db) -} - -func (d *AWSDatasource) loadDB(id int64, args sqlds.Options) (*sql.DB, bool) { - key := connectionKey(id, args) - db, dbExists := d.db.Load(key) - dr, driverExists := d.driver.Load(key) - if dbExists && driverExists && !dr.(driver.Driver).Closed() { - return db.(*sql.DB), true - } - return nil, false -} - -func (s *AWSDatasource) createDB(id int64, args sqlds.Options, settings models.Settings, dr driver.Driver) (*sql.DB, error) { - db, err := dr.OpenDB() - if err != nil { - return nil, fmt.Errorf("%w: Failed to connect to database. Is the hostname and port correct?", err) - } - s.storeDB(id, args, db) - - return db, nil -} - -func (d *AWSDatasource) storeAPI(id int64, args sqlds.Options, dsAPI api.AWSAPI) { - key := connectionKey(id, args) - d.api.Store(key, dsAPI) -} - -func (d *AWSDatasource) loadAPI(id int64, args sqlds.Options) (api.AWSAPI, bool) { - key := connectionKey(id, args) - dsAPI, exists := d.api.Load(key) - if exists { - return dsAPI.(api.AWSAPI), true - } - return nil, false -} - -func (s *AWSDatasource) createAPI(id int64, args sqlds.Options, settings models.Settings, loader api.Loader) (api.AWSAPI, error) { - api, err := loader(s.sessionCache, settings) - if err != nil { - return nil, fmt.Errorf("%w: Failed to create client", err) - } - s.storeAPI(id, args, api) - return api, err -} - -func (d *AWSDatasource) storeDriver(id int64, args sqlds.Options, dr interface{}) { - key := connectionKey(id, args) - d.driver.Store(key, dr) -} - -func (s *AWSDatasource) createDriver(id int64, args sqlds.Options, settings models.Settings, dsAPI api.AWSAPI, loader driver.Loader) (driver.Driver, error) { - dr, err := loader(dsAPI) - if err != nil { - return nil, fmt.Errorf("%w: Failed to create client", err) - } - s.storeDriver(id, args, dr) - - return dr, nil -} - -func (d *AWSDatasource) parseSettings(id int64, args sqlds.Options, settings models.Settings) error { - config, ok := d.config.Load(id) - if !ok { - return fmt.Errorf("unable to find stored configuration for datasource %d", id) - } - err := settings.Load(config.(backend.DataSourceInstanceSettings)) - if err != nil { - return fmt.Errorf("error reading settings: %s", err.Error()) - } - settings.Apply(args) - return nil -} - -// GetDB returns a *sql.DB. When called multiple times with the same id and options, it -// will return a cached version of the DB. The first time, it will use the loader -// functions to initialize the required settings, API and driver and finally create a DB. -func (s *AWSDatasource) GetDB( - id int64, - options sqlds.Options, - settingsLoader models.Loader, - apiLoader api.Loader, - driverLoader driver.Loader, -) (*sql.DB, error) { - cachedDB, exists := s.loadDB(id, options) - if exists { - return cachedDB, nil - } - - // First connection - settings := settingsLoader() - err := s.parseSettings(id, options, settings) - if err != nil { - return nil, err - } - - dsAPI, err := s.createAPI(id, options, settings, apiLoader) - if err != nil { - return nil, err - } - - dr, err := s.createDriver(id, options, settings, dsAPI, driverLoader) - if err != nil { - return nil, err - } - - return s.createDB(id, options, settings, dr) -} - -// GetAPI returns an API interface. When called multiple times with the same id and options, it -// will return a cached version of the API. The first time, it will use the loader -// functions to initialize the required settings and API. -func (s *AWSDatasource) GetAPI( - id int64, - options sqlds.Options, - settingsLoader models.Loader, - apiLoader api.Loader, -) (api.AWSAPI, error) { - cachedAPI, exists := s.loadAPI(id, options) - if exists { - return cachedAPI, nil - } - - // create new api - settings := settingsLoader() - err := s.parseSettings(id, options, settings) - if err != nil { - return nil, err - } - return s.createAPI(id, options, settings, apiLoader) -} diff --git a/pkg/sql/datasource/datasource_test.go b/pkg/sql/datasource/datasource_test.go deleted file mode 100644 index 8e0e765..0000000 --- a/pkg/sql/datasource/datasource_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package datasource - -import ( - "database/sql" - "database/sql/driver" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/grafana/grafana-aws-sdk/pkg/awsds" - "github.com/grafana/grafana-aws-sdk/pkg/sql/api" - sqlDriver "github.com/grafana/grafana-aws-sdk/pkg/sql/driver" - "github.com/grafana/grafana-aws-sdk/pkg/sql/models" - "github.com/grafana/grafana-plugin-sdk-go/backend" - "github.com/grafana/sqlds/v2" -) - -func TestNew(t *testing.T) { - config := backend.DataSourceInstanceSettings{ - ID: 100, - } - ds := New(config) - if ds.sessionCache == nil { - t.Errorf("missing initialization") - } - if _, ok := ds.config.Load(config.ID); !ok { - t.Errorf("missing config") - } -} - -type fakeDriver struct { - db *sql.DB - closed bool -} - -func (f *fakeDriver) Open(_ string) (driver.Conn, error) { - return nil, nil -} - -func (f *fakeDriver) Closed() bool { - return f.closed -} - -func (f *fakeDriver) OpenDB() (*sql.DB, error) { - return f.db, nil -} - -func TestLoadDB(t *testing.T) { - db := &sql.DB{} - tests := []struct { - description string - driver *fakeDriver - res *sql.DB - }{ - { - description: "it should return a stored db", - driver: &fakeDriver{db: db}, - res: db, - }, - { - description: "it should not return a db if the connection has been closed", - driver: &fakeDriver{closed: true, db: db}, - res: nil, - }, - } - - for _, tt := range tests { - t.Run(tt.description, func(t *testing.T) { - id := int64(1) - args := sqlds.Options{} - key := connectionKey(id, args) - ds := &AWSDatasource{} - if tt.driver.db != nil { - ds.db.Store(key, tt.driver.db) - ds.driver.Store(key, tt.driver) - } - res, exists := ds.loadDB(id, args) - if res != tt.res { - t.Errorf("unexpected result %v", res) - } - if tt.res != nil && !exists { - t.Errorf("should return true") - } - }) - } -} - -type fakeAPI struct { - api.AWSAPI -} - -func TestLoadAPI(t *testing.T) { - api := &fakeAPI{} - tests := []struct { - description string - id int64 - args sqlds.Options - api *fakeAPI - res *fakeAPI - }{ - { - description: "it should return a stored api without args", - id: 1, - args: sqlds.Options{}, - api: api, - res: api, - }, - { - description: "it should return a stored api with args", - id: 1, - args: sqlds.Options{"foo": "bar"}, - api: api, - res: api, - }, - { - description: "it should return an empty response", - id: 1, - args: sqlds.Options{"foo": "bar"}, - api: nil, - res: nil, - }, - } - - for _, tt := range tests { - t.Run(tt.description, func(t *testing.T) { - ds := &AWSDatasource{} - key := connectionKey(tt.id, tt.args) - if tt.api != nil { - ds.api.Store(key, tt.api) - } - res, exists := ds.loadAPI(tt.id, tt.args) - if res != tt.res && (res != nil || tt.res != nil) { - t.Errorf("unexpected result %v", res) - } - if tt.res != nil && !exists { - t.Errorf("should return true") - } - }) - } -} - -type fakeSettings struct { - settings backend.DataSourceInstanceSettings - modifier sqlds.Options -} - -func (f *fakeSettings) Load(c backend.DataSourceInstanceSettings) error { - f.settings = c - return nil -} - -func (f *fakeSettings) Apply(args sqlds.Options) { - f.modifier = args -} - -func TestParseSettings(t *testing.T) { - id := int64(1) - args := sqlds.Options{"foo": "bar"} - ds := &AWSDatasource{} - ds.config.Store(id, backend.DataSourceInstanceSettings{ID: id}) - - settings := &fakeSettings{} - err := ds.parseSettings(id, args, settings) - if err != nil { - t.Errorf("unexpected error %v", err) - } - if settings.settings.ID != id { - t.Errorf("failed to load config") - } - if settings.modifier["foo"] != "bar" { - t.Errorf("failed to apply modifier") - } -} - -func fakeAPILoader(cache *awsds.SessionCache, settings models.Settings) (api.AWSAPI, error) { - return fakeAPI{}, nil -} - -func TestCreateAPI(t *testing.T) { - id := int64(1) - args := sqlds.Options{"foo": "bar"} - ds := &AWSDatasource{} - key := connectionKey(id, args) - settings := &fakeSettings{} - - api, err := ds.createAPI(id, args, settings, fakeAPILoader) - if err != nil { - t.Errorf("unexpected error %v", err) - } - if !cmp.Equal(api, fakeAPI{}) { - t.Errorf("unexpected result api %v", cmp.Diff(api, fakeAPI{})) - } - cachedAPI, ok := ds.api.Load(key) - if !ok || !cmp.Equal(cachedAPI, fakeAPI{}) { - t.Errorf("unexpected cached api %v", cmp.Diff(cachedAPI, fakeAPI{})) - } -} - -func fakeDriverLoader(api.AWSAPI) (sqlDriver.Driver, error) { - return &fakeDriver{db: &sql.DB{}}, nil -} - -func TestCreateDriver(t *testing.T) { - id := int64(1) - args := sqlds.Options{"foo": "bar"} - ds := &AWSDatasource{} - key := connectionKey(id, args) - api := fakeAPI{} - settings := &fakeSettings{} - - dr, err := ds.createDriver(id, args, settings, api, fakeDriverLoader) - if err != nil { - t.Errorf("unexpected error %v", err) - } - if dr == nil { - t.Errorf("unexpected result driver %v", dr) - } - cachedDriver, ok := ds.driver.Load(key) - if !ok || cachedDriver == nil { - t.Errorf("unexpected cached driver %v", cachedDriver) - } -} - -func TestCreateDB(t *testing.T) { - id := int64(1) - args := sqlds.Options{"foo": "bar"} - ds := &AWSDatasource{} - key := connectionKey(id, args) - db := &sql.DB{} - dr := &fakeDriver{db: db} - settings := &fakeSettings{} - - res, err := ds.createDB(id, args, settings, dr) - if err != nil { - t.Errorf("unexpected error %v", err) - } - if res != db { - t.Errorf("unexpected result db %v", res) - } - cachedDB, ok := ds.db.Load(key) - if !ok || cachedDB != db { - t.Errorf("unexpected cached db %v", cachedDB) - } -} - -func fakeSettingsLoader() models.Settings { - return &fakeSettings{} -} - -func TestGetDB(t *testing.T) { - id := int64(1) - args := sqlds.Options{"foo": "bar"} - ds := &AWSDatasource{} - ds.config.Store(id, backend.DataSourceInstanceSettings{ID: id}) - key := connectionKey(id, args) - - res, err := ds.GetDB(id, args, fakeSettingsLoader, fakeAPILoader, fakeDriverLoader) - if err != nil { - t.Errorf("unexpected error %v", err) - } - if res == nil { - t.Errorf("unexpected result db %v", res) - } - cachedDB, ok := ds.db.Load(key) - if !ok || cachedDB == nil { - t.Errorf("unexpected cached db %v", cachedDB) - } -} - -func TestGetAPI(t *testing.T) { - id := int64(1) - args := sqlds.Options{"foo": "bar"} - ds := &AWSDatasource{} - ds.config.Store(id, backend.DataSourceInstanceSettings{ID: id}) - key := connectionKey(id, args) - - api, err := ds.GetAPI(id, args, fakeSettingsLoader, fakeAPILoader) - if err != nil { - t.Errorf("unexpected error %v", err) - } - if !cmp.Equal(api, fakeAPI{}) { - t.Errorf("unexpected result api %v", cmp.Diff(api, fakeAPI{})) - } - cachedAPI, ok := ds.api.Load(key) - if !ok || !cmp.Equal(cachedAPI, fakeAPI{}) { - t.Errorf("unexpected cached api %v", cmp.Diff(cachedAPI, fakeAPI{})) - } -} diff --git a/pkg/sql/datasource/utils.go b/pkg/sql/datasource/utils.go deleted file mode 100644 index 1104a09..0000000 --- a/pkg/sql/datasource/utils.go +++ /dev/null @@ -1,21 +0,0 @@ -package datasource - -import ( - "context" - "fmt" - - "github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter" - "github.com/grafana/sqlds/v2" -) - -func connectionKey(id int64, args sqlds.Options) string { - return fmt.Sprintf("%d-%v", id, args) -} - -func GetDatasourceID(ctx context.Context) int64 { - plugin := httpadapter.PluginConfigFromContext(ctx) - if plugin.DataSourceInstanceSettings != nil { - return plugin.DataSourceInstanceSettings.ID - } - return 0 -} diff --git a/pkg/sql/datasource/utils_test.go b/pkg/sql/datasource/utils_test.go deleted file mode 100644 index b0c4961..0000000 --- a/pkg/sql/datasource/utils_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package datasource - -import ( - "context" - "testing" -) - -func TestGetDatasourceID(t *testing.T) { - // It's not possible to test that GetDatasourceID returns an actual - // ID because the ctx key is not exported. This just tests the fallback - // path. - if id := GetDatasourceID(context.TODO()); id != 0 { - t.Errorf("unexpected id: %d", id) - } -} diff --git a/pkg/sql/driver/driver.go b/pkg/sql/driver/driver.go deleted file mode 100644 index 402be75..0000000 --- a/pkg/sql/driver/driver.go +++ /dev/null @@ -1,16 +0,0 @@ -package driver - -import ( - "database/sql" - "database/sql/driver" - - "github.com/grafana/grafana-aws-sdk/pkg/sql/api" -) - -type Driver interface { - Open(_ string) (driver.Conn, error) - Closed() bool - OpenDB() (*sql.DB, error) -} - -type Loader func(api.AWSAPI) (Driver, error) diff --git a/pkg/sql/models/models.go b/pkg/sql/models/models.go deleted file mode 100644 index 4478db2..0000000 --- a/pkg/sql/models/models.go +++ /dev/null @@ -1,15 +0,0 @@ -package models - -import ( - "github.com/grafana/grafana-plugin-sdk-go/backend" - "github.com/grafana/sqlds/v2" -) - -type Settings interface { - Load(backend.DataSourceInstanceSettings) error - Apply(args sqlds.Options) -} - -type Loader func() Settings - -const DefaultKey = "__default" diff --git a/pkg/sql/routes/routes.go b/pkg/sql/routes/routes.go deleted file mode 100644 index 9694d7f..0000000 --- a/pkg/sql/routes/routes.go +++ /dev/null @@ -1,76 +0,0 @@ -package routes - -import ( - "encoding/json" - "io" - "io/ioutil" - "net/http" - - "github.com/grafana/grafana-aws-sdk/pkg/sql/api" - "github.com/grafana/grafana-plugin-sdk-go/backend/log" - "github.com/grafana/sqlds/v2" -) - -type ResourceHandler struct { - API api.Resources -} - -func Write(rw http.ResponseWriter, b []byte) { - _, err := rw.Write(b) - if err != nil { - log.DefaultLogger.Error(err.Error()) - } -} - -func ParseBody(body io.ReadCloser) (sqlds.Options, error) { - reqBody := sqlds.Options{} - b, err := ioutil.ReadAll(body) - if err != nil { - return nil, err - } - err = json.Unmarshal(b, &reqBody) - if err != nil { - return nil, err - } - return reqBody, nil -} - -func SendResources(rw http.ResponseWriter, res []string, err error) { - if err != nil { - rw.WriteHeader(http.StatusBadRequest) - Write(rw, []byte(err.Error())) - return - } - bytes, err := json.Marshal(res) - if err != nil { - log.DefaultLogger.Error(err.Error()) - rw.WriteHeader(http.StatusInternalServerError) - Write(rw, []byte(err.Error())) - return - } - rw.Header().Add("Content-Type", "application/json") - Write(rw, bytes) -} - -func (r *ResourceHandler) regions(rw http.ResponseWriter, req *http.Request) { - regions, err := r.API.Regions(req.Context()) - SendResources(rw, regions, err) -} - -func (r *ResourceHandler) databases(rw http.ResponseWriter, req *http.Request) { - reqBody, err := ParseBody(req.Body) - if err != nil { - rw.WriteHeader(http.StatusBadRequest) - Write(rw, []byte(err.Error())) - return - } - res, err := r.API.Databases(req.Context(), reqBody) - SendResources(rw, res, err) -} - -func (r *ResourceHandler) DefaultRoutes() map[string]func(http.ResponseWriter, *http.Request) { - return map[string]func(http.ResponseWriter, *http.Request){ - "/regions": r.regions, - "/databases": r.databases, - } -} diff --git a/pkg/sql/routes/routes_test.go b/pkg/sql/routes/routes_test.go deleted file mode 100644 index 3970fa4..0000000 --- a/pkg/sql/routes/routes_test.go +++ /dev/null @@ -1,122 +0,0 @@ -package routes - -import ( - "bytes" - "fmt" - "io" - "net/http" - "net/http/httptest" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/google/go-cmp/cmp" - "github.com/grafana/sqlds/v2" -) - -func TestWrite(t *testing.T) { - rw := httptest.NewRecorder() - msg := []byte("foo") - Write(rw, msg) - resp := rw.Result() - body, err := io.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - if !cmp.Equal(body, msg) { - t.Errorf("unexpected result: %v", cmp.Diff(body, msg)) - } -} - -func TestSendResources(t *testing.T) { - rw := httptest.NewRecorder() - SendResources(rw, []string{"foo"}, nil) - resp := rw.Result() - body, err := io.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - expected := []byte(`["foo"]`) - if !cmp.Equal(body, expected) { - t.Errorf("unexpected result: %v", cmp.Diff(body, expected)) - } - if rw.Header().Get("Content-Type") != "application/json" { - t.Errorf("unexpected Content-Type header: %s", rw.Header().Get("Content-Type")) - } -} - -type fakeDS struct { - regions []string - databases map[string][]string -} - -var ds = &fakeDS{ - regions: []string{"us-east1"}, - databases: map[string][]string{ - "us-east-1": {"db1"}, - }, -} - -func (f *fakeDS) Regions(aws.Context) ([]string, error) { - return f.regions, nil -} - -func (f *fakeDS) Databases(ctx aws.Context, options sqlds.Options) ([]string, error) { - dbs, ok := f.databases[options["region"]] - if !ok { - return nil, fmt.Errorf("error") - } - return dbs, nil -} - -func TestDefaultRoutes(t *testing.T) { - tests := []struct { - description string - route string - reqBody []byte - expectedCode int - expectedResult string - }{ - { - description: "return default regions", - route: "/regions", - reqBody: nil, - expectedCode: http.StatusOK, - expectedResult: `["us-east1"]`, - }, - { - description: "default databases", - route: "/databases", - reqBody: []byte(`{"region":"us-east-1"}`), - expectedCode: http.StatusOK, - expectedResult: `["db1"]`, - }, - { - description: "wrong region for databases", - route: "/databases", - reqBody: []byte(`{"region":"us-east-3"}`), - expectedCode: http.StatusBadRequest, - }, - } - for _, tt := range tests { - t.Run(tt.description, func(t *testing.T) { - req := httptest.NewRequest("GET", "http://example.com/foo", bytes.NewReader(tt.reqBody)) - rw := httptest.NewRecorder() - rh := ResourceHandler{API: ds} - routes := rh.DefaultRoutes() - routes[tt.route](rw, req) - - resp := rw.Result() - body, err := io.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - if resp.StatusCode != tt.expectedCode { - t.Errorf("expecting code %v got %v", tt.expectedCode, resp.StatusCode) - } - if resp.StatusCode == http.StatusOK && !cmp.Equal(string(body), tt.expectedResult) { - t.Errorf("unexpected response: %v", cmp.Diff(string(body), tt.expectedResult)) - } - }) - } -} diff --git a/yarn.lock b/yarn.lock index 248ca20..6c0c70c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1115,6 +1115,11 @@ "@emotion/utils" "0.11.3" babel-plugin-emotion "^10.0.27" +"@emotion/eslint-plugin@^11.5.0": + version "11.5.0" + resolved "https://registry.yarnpkg.com/@emotion/eslint-plugin/-/eslint-plugin-11.5.0.tgz#1bad513b0d557e9a2cbf91415d409113595400c2" + integrity sha512-AyjeBIHuFYQIMLB+t5VRqXGzMkrD98p9aCgxTxt0DGBjQa6ExDU5xvhbeSjLRClc1zIYkDmbNBbGB71RAVgqFw== + "@emotion/hash@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" @@ -5578,6 +5583,18 @@ eslint-plugin-jsdoc@31.6.1: semver "^7.3.4" spdx-expression-parse "^3.0.1" +eslint-plugin-lodash@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-7.3.0.tgz#02bbb2c39a8b28f73daf01f99b2d83bcc7f11a79" + integrity sha512-FQM8HklruJzulPawX3uZqWbeyN3bQT4hjVCpFYMrWo0Hdz1qDCwp1v3JS4zjhdssAXdwCxdnyrNMCZJK70GeUQ== + dependencies: + lodash "^4.17.21" + +eslint-plugin-no-only-tests@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz#19f6c9620bda02b9b9221b436c5f070e42628d76" + integrity sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q== + eslint-plugin-prettier@3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" @@ -5607,6 +5624,13 @@ eslint-plugin-react@7.22.0: resolve "^1.18.1" string.prototype.matchall "^4.0.2" +eslint-plugin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin/-/eslint-plugin-1.0.1.tgz#24bf3136d167c90ed0d4d5702d8b9b1ed2beef79" + integrity sha512-ervp8C09On0fLA258TvE08AqAr/bhRYgHVZd3BrJjD4JfOA2JGANDLGs06j51oWqfPd7Feoo3OoqHD+fuI2sFQ== + dependencies: + requireindex "~1.1.0" + eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -8297,7 +8321,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.17.21, lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -11040,6 +11064,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requireindex@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" + integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" From 97f77a31ec6d8a0bdcefb7e7784c2153025734c5 Mon Sep 17 00:00:00 2001 From: Andres Martinez Gotor Date: Thu, 4 Nov 2021 16:42:04 +0100 Subject: [PATCH 2/4] update --- .drone.yml | 6 +++--- .eslintrc | 19 +------------------ 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/.drone.yml b/.drone.yml index 06fa074..b316b14 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ platform: steps: - name: initialize - image: grafana/grafana-plugin-ci:1.1.0-alpine + image: grafana/grafana-plugin-ci:1.2.1-alpine commands: - mkdir -p bin - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.27/grabpl @@ -21,7 +21,7 @@ steps: - rm -rf node_modules/@grafana/data/node_modules - name: build-and-test-frontend - image: grafana/grafana-plugin-ci:1.1.0-alpine + image: grafana/grafana-plugin-ci:1.2.1-alpine commands: - yarn eslint ./src --ext .js,.jsx,.ts,.tsx - yarn build @@ -31,6 +31,6 @@ steps: --- kind: signature -hmac: 032b0b1724c1fe669af7ae31ca652e90ce525e561c9c248fb44d72ffd1c2cb0f +hmac: 8d76dd7bc0390219974f20f9fa1d8257ca6e36aa3ad4ec7947ed59b6252eb2cb ... diff --git a/.eslintrc b/.eslintrc index 56189b5..e400395 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,22 +7,5 @@ "react/prop-types": "off", "@emotion/jsx-import": "error", "lodash/import-scope": [2, "member"] - }, - "overrides": [ - { - "files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"], - "rules": { - "react-hooks/rules-of-hooks": "off", - "react-hooks/exhaustive-deps": "off" - } - }, - { - "files": ["packages/grafana-ui/src/components/ThemeDemos/**/*.{ts,tsx}"], - "rules": { - "@emotion/jsx-import": "off", - "react/jsx-uses-react": "off", - "react/react-in-jsx-scope": "off" - } - } - ] + } } From 0ae663a879e337753b0d5cc9d3d0751ac74c9b26 Mon Sep 17 00:00:00 2001 From: Andres Martinez Gotor Date: Thu, 4 Nov 2021 17:31:28 +0100 Subject: [PATCH 3/4] fix repo in drone signature --- .drone.yml | 2 +- Magefile.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b316b14..41b6992 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,6 +31,6 @@ steps: --- kind: signature -hmac: 8d76dd7bc0390219974f20f9fa1d8257ca6e36aa3ad4ec7947ed59b6252eb2cb +hmac: b63300304a0dad7f76ee99c27e2fc095c1be56d60501d9ad93d371324f2eb637 ... diff --git a/Magefile.go b/Magefile.go index b9fed54..3af1d95 100644 --- a/Magefile.go +++ b/Magefile.go @@ -32,7 +32,7 @@ func Drone() error { return err } - if err := sh.RunV("drone", "--server", "https://drone.grafana.net", "sign", "--save", "grafana/grafana-plugin-sdk-go"); err != nil { + if err := sh.RunV("drone", "--server", "https://drone.grafana.net", "sign", "--save", "grafana/grafana-aws-sdk-react"); err != nil { return err } From 893ef43222eed9c1b01d60f5b50f83a0267c0243 Mon Sep 17 00:00:00 2001 From: Andres Martinez Gotor Date: Fri, 5 Nov 2021 10:52:05 +0100 Subject: [PATCH 4/4] Apply feedback --- .eslintrc | 10 +----- .github/workflows/publish-npm.yml | 57 +++++++++++++++++++++++++++++++ README.md | 13 ++++--- package.json | 4 --- yarn.lock | 31 +---------------- 5 files changed, 67 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.eslintrc b/.eslintrc index e400395..99f3182 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,11 +1,3 @@ { - "extends": ["@grafana/eslint-config"], - "root": true, - "plugins": ["no-only-tests", "@emotion", "lodash"], - "rules": { - "no-only-tests/no-only-tests": "error", - "react/prop-types": "off", - "@emotion/jsx-import": "error", - "lodash/import-scope": [2, "member"] - } + "extends": ["@grafana/eslint-config"] } diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..ff81823 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,57 @@ +name: publish-npm +on: + push: + branches: + - master + +jobs: + publish: + name: Publish to NPM & GitHub Package Registry + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + ref: master + # limit releases to version changes - https://github.com/EndBug/version-check + - name: Check version changes + uses: EndBug/version-check@v1 + id: version_check + with: + # diff the commits rather than commit message for version changes + diff_search: true + + - name: Version update detected + if: steps.version_check.outputs.changed == 'true' + run: 'echo "Version change found! New version: ${{ steps.version_check.outputs.version }} (${{ steps.version_check.outputs.type }})"' + + - name: Setup .npmrc file for NPM registry + if: steps.version_check.outputs.changed == 'true' + uses: actions/setup-node@v2 + with: + node-version: '14' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + if: steps.version_check.outputs.changed == 'true' + run: yarn + + - name: Publish package to NPM + if: steps.version_check.outputs.changed == 'true' + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Setup .npmrc file for GitHub Packages + if: steps.version_check.outputs.changed == 'true' + uses: actions/setup-node@v2 + with: + node-version: '14' + registry-url: 'https://npm.pkg.github.com' + scope: '@grafana' + + - name: Publish package to Github Packages + if: steps.version_check.outputs.changed == 'true' + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }} diff --git a/README.md b/README.md index d4504bd..fd99fa0 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,16 @@ This is a common package that can be used for all amazon plugins. +## Frontend configuration -## Backend plugins (go sdk) +see the ./src folder -see the ./pkg folder - | +## Drone configuration -## Frontend configuration +Drone signs the Drone configuration file. This needs to be run everytime the drone.yml file is modified. See https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md for more info. -see the ./src folder +To update the drone file run (note that you need to export your `DRONE_TOKEN` before): +``` +drone --server https://drone.grafana.net sign --save grafana/grafana-aws-sdk-react +``` diff --git a/package.json b/package.json index 2bc2c2b..4ffcfe9 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "@babel/preset-env": "^7.13.12", "@babel/preset-react": "^7.13.13", "@babel/preset-typescript": "^7.13.0", - "@emotion/eslint-plugin": "^11.5.0", "@grafana/data": "^7.5.0", "@grafana/toolkit": "^7.5.1", "@grafana/tsconfig": "^1.0.0-rc1", @@ -47,9 +46,6 @@ "@types/rollup-plugin-visualizer": "2.6.0", "@types/sinon": "^7.5.2", "babel-jest": "^26.6.3", - "eslint-plugin": "^1.0.1", - "eslint-plugin-lodash": "^7.3.0", - "eslint-plugin-no-only-tests": "^2.6.0", "jest": "^26.6.3", "pretty-format": "25.1.0", "react-test-renderer": "^17.0.2", diff --git a/yarn.lock b/yarn.lock index 6c0c70c..248ca20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1115,11 +1115,6 @@ "@emotion/utils" "0.11.3" babel-plugin-emotion "^10.0.27" -"@emotion/eslint-plugin@^11.5.0": - version "11.5.0" - resolved "https://registry.yarnpkg.com/@emotion/eslint-plugin/-/eslint-plugin-11.5.0.tgz#1bad513b0d557e9a2cbf91415d409113595400c2" - integrity sha512-AyjeBIHuFYQIMLB+t5VRqXGzMkrD98p9aCgxTxt0DGBjQa6ExDU5xvhbeSjLRClc1zIYkDmbNBbGB71RAVgqFw== - "@emotion/hash@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" @@ -5583,18 +5578,6 @@ eslint-plugin-jsdoc@31.6.1: semver "^7.3.4" spdx-expression-parse "^3.0.1" -eslint-plugin-lodash@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-7.3.0.tgz#02bbb2c39a8b28f73daf01f99b2d83bcc7f11a79" - integrity sha512-FQM8HklruJzulPawX3uZqWbeyN3bQT4hjVCpFYMrWo0Hdz1qDCwp1v3JS4zjhdssAXdwCxdnyrNMCZJK70GeUQ== - dependencies: - lodash "^4.17.21" - -eslint-plugin-no-only-tests@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz#19f6c9620bda02b9b9221b436c5f070e42628d76" - integrity sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q== - eslint-plugin-prettier@3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" @@ -5624,13 +5607,6 @@ eslint-plugin-react@7.22.0: resolve "^1.18.1" string.prototype.matchall "^4.0.2" -eslint-plugin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin/-/eslint-plugin-1.0.1.tgz#24bf3136d167c90ed0d4d5702d8b9b1ed2beef79" - integrity sha512-ervp8C09On0fLA258TvE08AqAr/bhRYgHVZd3BrJjD4JfOA2JGANDLGs06j51oWqfPd7Feoo3OoqHD+fuI2sFQ== - dependencies: - requireindex "~1.1.0" - eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -8321,7 +8297,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.17.21, lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -11064,11 +11040,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requireindex@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" - integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= - requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"