From 9a3affc5b8e3cc1d1179a5eb01a754e0519256df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Feb 2021 04:03:58 +0000 Subject: [PATCH 01/56] chore(deps): bump github.com/sirupsen/logrus from 1.7.0 to 1.7.1 Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.7.0...v1.7.1) Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0853a19..e068391 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.7.0 + github.com/sirupsen/logrus v1.7.1 github.com/stretchr/testify v1.6.1 // indirect golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect diff --git a/go.sum b/go.sum index 17acc97..9a80d17 100644 --- a/go.sum +++ b/go.sum @@ -7,14 +7,16 @@ 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= +github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.7.1 h1:rsizeFmZP+GYwyb4V6t6qpG7ZNWzA2bvgW/yC2xHCcg= +github.com/sirupsen/logrus v1.7.1/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= From d6ae6653419d60f94fe2a70c1a121eaf877b30f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Feb 2021 04:10:49 +0000 Subject: [PATCH 02/56] chore(deps): bump github.com/sirupsen/logrus from 1.7.1 to 1.8.0 Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.7.1...v1.8.0) Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e068391..7d1e445 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.7.1 + github.com/sirupsen/logrus v1.8.0 github.com/stretchr/testify v1.6.1 // indirect golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect diff --git a/go.sum b/go.sum index 9a80d17..10dd8db 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/sirupsen/logrus v1.7.1 h1:rsizeFmZP+GYwyb4V6t6qpG7ZNWzA2bvgW/yC2xHCcg= -github.com/sirupsen/logrus v1.7.1/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= +github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= From e59663d7e4d2ddd75f140e4e05ef6583c4278483 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Mar 2021 04:01:51 +0000 Subject: [PATCH 03/56] chore(deps): bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1 Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.8.0...v1.8.1) Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 7d1e445..8ea116a 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.8.0 + github.com/sirupsen/logrus v1.8.1 github.com/stretchr/testify v1.6.1 // indirect golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect diff --git a/go.sum b/go.sum index 10dd8db..f0276e4 100644 --- a/go.sum +++ b/go.sum @@ -7,16 +7,14 @@ 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= -github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= -github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= From d849ca1c638cc5dde10b71ab119506e38d7c9a5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 04:00:56 +0000 Subject: [PATCH 04/56] chore(deps): bump actions/checkout from 2 to 2.3.4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4) Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/securityscan.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/todo.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a513d83..b3ea8fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Setup go uses: actions/setup-go@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 88f1428..053f12a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ jobs: name: Lint - Go runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - name: golangci-lint uses: reviewdog/action-golangci-lint@master with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66f3820..1291128 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/securityscan.yml b/.github/workflows/securityscan.yml index 7e653b1..45c17a7 100644 --- a/.github/workflows/securityscan.yml +++ b/.github/workflows/securityscan.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 with: fetch-depth: 2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d4850ea..98a82fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index 39bf4b8..3296dd3 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -7,7 +7,7 @@ jobs: todo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - name: Check Todos uses: ribtoks/tdg-github-action@master with: From 34b637bb93d8da178786d485e1756c82f85282a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 04:00:58 +0000 Subject: [PATCH 05/56] chore(deps): bump go-semantic-release/action from 1 to 1.11.2 Bumps [go-semantic-release/action](https://github.com/go-semantic-release/action) from 1 to 1.11.2. - [Release notes](https://github.com/go-semantic-release/action/releases) - [Commits](https://github.com/go-semantic-release/action/compare/v1...v1.11.2) Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66f3820..9ad8191 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: name: Unshallow run: git fetch --prune --unshallow - - uses: go-semantic-release/action@v1 + uses: go-semantic-release/action@v1.11.2 id: semantic with: github-token: ${{ secrets.GITHUB_TOKEN }} From b17fe77b2c6efc54de94def6f64196ea5c3676ab Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Wed, 12 May 2021 07:41:33 +0200 Subject: [PATCH 06/56] chore: add dependabot auto approve --- .github/workflows/approve.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/approve.yml diff --git a/.github/workflows/approve.yml b/.github/workflows/approve.yml new file mode 100644 index 0000000..7f15636 --- /dev/null +++ b/.github/workflows/approve.yml @@ -0,0 +1,13 @@ +on: pull_request_target + +jobs: + + approve: + name: Dependabot PR Auto-approve + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + runs-on: ubuntu-latest + steps: + - + uses: hmarr/auto-approve-action@v2.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" From 2664768eb152bb0309f75c3a25af1dca3218561f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 06:30:36 +0000 Subject: [PATCH 07/56] chore(deps): bump goreleaser/goreleaser-action from 2 to 2.5.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 2.5.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Changelog](https://github.com/goreleaser/goreleaser-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v2.5.0) Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e27de67..c5c1d1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v2.5.0 if: steps.semantic.outputs.version != '' with: version: latest From bfa1dbd889081f3d173883e91d1533ad975dd79d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 May 2021 04:00:52 +0000 Subject: [PATCH 08/56] chore(deps): bump goreleaser/goreleaser-action from 2.5.0 to 2.6.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Changelog](https://github.com/goreleaser/goreleaser-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.5.0...v2.6.0) Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5c1d1c..de0a227 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.5.0 + uses: goreleaser/goreleaser-action@v2.6.0 if: steps.semantic.outputs.version != '' with: version: latest From 1b356169af991f0280e665597fc32a0124067288 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 04:11:48 +0000 Subject: [PATCH 09/56] chore(deps): bump goreleaser/goreleaser-action from 2.6.0 to 2.6.1 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de0a227..7cad65c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.6.0 + uses: goreleaser/goreleaser-action@v2.6.1 if: steps.semantic.outputs.version != '' with: version: latest From 69387875d9e03c689bd02beb950272a67ad1c981 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jul 2021 04:01:04 +0000 Subject: [PATCH 10/56] chore(deps): bump go-semantic-release/action from 1.11.2 to 1.14 Bumps [go-semantic-release/action](https://github.com/go-semantic-release/action) from 1.11.2 to 1.14. - [Release notes](https://github.com/go-semantic-release/action/releases) - [Commits](https://github.com/go-semantic-release/action/compare/v1.11.2...v1.14) --- updated-dependencies: - dependency-name: go-semantic-release/action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cad65c..8c3a232 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: name: Unshallow run: git fetch --prune --unshallow - - uses: go-semantic-release/action@v1.11.2 + uses: go-semantic-release/action@v1.14 id: semantic with: github-token: ${{ secrets.GITHUB_TOKEN }} From 290cdd0fda465d5b2bf58197a7cf3ce9fe8cb265 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jul 2021 04:01:00 +0000 Subject: [PATCH 11/56] chore(deps): bump goreleaser/goreleaser-action from 2.6.1 to 2.7.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.6.1...v2.7.0) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c3a232..6e48aa6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.6.1 + uses: goreleaser/goreleaser-action@v2.7.0 if: steps.semantic.outputs.version != '' with: version: latest From 7edfc133bc6fcb2d24639b5d36922c504c20cd61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Jul 2021 04:01:10 +0000 Subject: [PATCH 12/56] chore(deps): bump go-semantic-release/action from 1.14 to 1.15 Bumps [go-semantic-release/action](https://github.com/go-semantic-release/action) from 1.14 to 1.15. - [Release notes](https://github.com/go-semantic-release/action/releases) - [Commits](https://github.com/go-semantic-release/action/compare/v1.14...v1.15) --- updated-dependencies: - dependency-name: go-semantic-release/action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e48aa6..71a812b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: name: Unshallow run: git fetch --prune --unshallow - - uses: go-semantic-release/action@v1.14 + uses: go-semantic-release/action@v1.15 id: semantic with: github-token: ${{ secrets.GITHUB_TOKEN }} From d74fabd44fb3fd93a979546f0ed3222445bfb542 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 04:01:21 +0000 Subject: [PATCH 13/56] chore(deps): bump goreleaser/goreleaser-action from 2.7.0 to 2.8.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.7.0...v2.8.0) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71a812b..625515f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.7.0 + uses: goreleaser/goreleaser-action@v2.8.0 if: steps.semantic.outputs.version != '' with: version: latest From 6862beb04e1d4b557f994f6da67a8f48b9926f8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 04:01:23 +0000 Subject: [PATCH 14/56] chore(deps): bump actions/checkout from 2.3.4 to 2.3.5 Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/securityscan.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/todo.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3ea8fc..1df649a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Setup go uses: actions/setup-go@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 053f12a..c27318c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ jobs: name: Lint - Go runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: golangci-lint uses: reviewdog/action-golangci-lint@master with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71a812b..012597f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/securityscan.yml b/.github/workflows/securityscan.yml index 45c17a7..e53e69e 100644 --- a/.github/workflows/securityscan.yml +++ b/.github/workflows/securityscan.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 with: fetch-depth: 2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98a82fd..ee91224 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index 3296dd3..09cd4b3 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -7,7 +7,7 @@ jobs: todo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: Check Todos uses: ribtoks/tdg-github-action@master with: From fe24f39494a022b65a4b52a86930e4680f0e5622 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Nov 2021 04:00:53 +0000 Subject: [PATCH 15/56] chore(deps): bump actions/checkout from 2.3.5 to 2.4.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/securityscan.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/todo.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1df649a..5332c19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: Setup go uses: actions/setup-go@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c27318c..1d4f1d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ jobs: name: Lint - Go runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v2.4.0 - name: golangci-lint uses: reviewdog/action-golangci-lint@master with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04ea352..6d466ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/securityscan.yml b/.github/workflows/securityscan.yml index e53e69e..b5b24d6 100644 --- a/.github/workflows/securityscan.yml +++ b/.github/workflows/securityscan.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 with: fetch-depth: 2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee91224..f440149 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index 09cd4b3..3a65f50 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -7,7 +7,7 @@ jobs: todo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v2.4.0 - name: Check Todos uses: ribtoks/tdg-github-action@master with: From 2d3920c93d88a403b6485536a1f6b5f82263b778 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 04:01:18 +0000 Subject: [PATCH 16/56] chore(deps): bump goreleaser/goreleaser-action from 2.8.0 to 2.8.1 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.8.0 to 2.8.1. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.8.0...v2.8.1) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d466ce..6b25af9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.8.0 + uses: goreleaser/goreleaser-action@v2.8.1 if: steps.semantic.outputs.version != '' with: version: latest From a4a80fb896dfeb1e3041b4e1989de13ed4601947 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 04:01:02 +0000 Subject: [PATCH 17/56] chore(deps): bump go-semantic-release/action from 1.15 to 1.17 Bumps [go-semantic-release/action](https://github.com/go-semantic-release/action) from 1.15 to 1.17. - [Release notes](https://github.com/go-semantic-release/action/releases) - [Commits](https://github.com/go-semantic-release/action/compare/v1.15...v1.17) --- updated-dependencies: - dependency-name: go-semantic-release/action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b25af9..5b0b917 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: name: Unshallow run: git fetch --prune --unshallow - - uses: go-semantic-release/action@v1.15 + uses: go-semantic-release/action@v1.17 id: semantic with: github-token: ${{ secrets.GITHUB_TOKEN }} From 25a3d7737f899c78d084528244fa43c077a75d49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 04:01:48 +0000 Subject: [PATCH 18/56] chore(deps): bump goreleaser/goreleaser-action from 2.8.1 to 2.9.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.8.1 to 2.9.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.8.1...v2.9.0) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b0b917..d7e1b6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.8.1 + uses: goreleaser/goreleaser-action@v2.9.0 if: steps.semantic.outputs.version != '' with: version: latest From 5e5c4783cfb8ea782926b7894a859872bdafbe2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 04:01:52 +0000 Subject: [PATCH 19/56] chore(deps): bump goreleaser/goreleaser-action from 2.9.0 to 2.9.1 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.9.0 to 2.9.1. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.9.0...v2.9.1) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7e1b6d..62df59f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.9.0 + uses: goreleaser/goreleaser-action@v2.9.1 if: steps.semantic.outputs.version != '' with: version: latest From fb63d6d4cf9f26ffceb416b53e3ebebf4b31b1cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 04:01:24 +0000 Subject: [PATCH 20/56] chore(deps): bump hmarr/auto-approve-action from 2.1.0 to 2.2.1 Bumps [hmarr/auto-approve-action](https://github.com/hmarr/auto-approve-action) from 2.1.0 to 2.2.1. - [Release notes](https://github.com/hmarr/auto-approve-action/releases) - [Commits](https://github.com/hmarr/auto-approve-action/compare/v2.1.0...v2.2.1) --- updated-dependencies: - dependency-name: hmarr/auto-approve-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/approve.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/approve.yml b/.github/workflows/approve.yml index 7f15636..df9c600 100644 --- a/.github/workflows/approve.yml +++ b/.github/workflows/approve.yml @@ -8,6 +8,6 @@ jobs: runs-on: ubuntu-latest steps: - - uses: hmarr/auto-approve-action@v2.1.0 + uses: hmarr/auto-approve-action@v2.2.1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" From 5d446aecb6dbeae7015a04dd2b5265b24633b067 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 04:01:33 +0000 Subject: [PATCH 21/56] chore(deps): bump actions/setup-go from 2 to 3 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5332c19..18aaf5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: uses: actions/checkout@v2.4.0 - name: Setup go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: stable: true - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62df59f..d609ddd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: changelog-file: .changelog - name: Set up Go - uses: actions/setup-go@v2.1.3 + uses: actions/setup-go@v3 if: steps.semantic.outputs.version != '' - name: Release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f440149..b9056f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: run: git fetch --prune --unshallow - name: Set up Go - uses: actions/setup-go@v2.1.3 + uses: actions/setup-go@v3 - name: Download Go modules run: go mod download From 7c91e43e3403ef53a496817e1ae415757f12b1b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 04:01:17 +0000 Subject: [PATCH 22/56] chore(deps): bump actions/checkout from 2.4.0 to 3.0.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.0.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3.0.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/securityscan.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/todo.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5332c19..4a6396b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.2 - name: Setup go uses: actions/setup-go@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d4f1d5..caf1263 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ jobs: name: Lint - Go runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3.0.2 - name: golangci-lint uses: reviewdog/action-golangci-lint@master with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62df59f..910fc9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.2 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/securityscan.yml b/.github/workflows/securityscan.yml index b5b24d6..b63d6d9 100644 --- a/.github/workflows/securityscan.yml +++ b/.github/workflows/securityscan.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.2 with: fetch-depth: 2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f440149..0e907f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.2 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index 3a65f50..2da3b1c 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -7,7 +7,7 @@ jobs: todo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3.0.2 - name: Check Todos uses: ribtoks/tdg-github-action@master with: From cb7c5a2b10952417708917661035c23436d7c3ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 04:01:44 +0000 Subject: [PATCH 23/56] chore(deps): bump github/codeql-action from 1 to 2 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/securityscan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/securityscan.yml b/.github/workflows/securityscan.yml index b63d6d9..dd20a6d 100644 --- a/.github/workflows/securityscan.yml +++ b/.github/workflows/securityscan.yml @@ -23,9 +23,9 @@ jobs: if: ${{ github.event_name == 'pull_request' }} - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: go - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From a93d50338bc497a5234760877b21b0ea596e92f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 04:01:41 +0000 Subject: [PATCH 24/56] chore(deps): bump goreleaser/goreleaser-action from 2.9.1 to 3.0.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.9.1 to 3.0.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.9.1...v3.0.0) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 189a588..be30494 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: steps.semantic.outputs.version != '' - name: Release - uses: goreleaser/goreleaser-action@v2.9.1 + uses: goreleaser/goreleaser-action@v3.0.0 if: steps.semantic.outputs.version != '' with: version: latest From 5e298897231db2acd72c07d2143fb733b5f270a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 04:01:43 +0000 Subject: [PATCH 25/56] chore(deps): bump go-semantic-release/action from 1.17 to 1.18 Bumps [go-semantic-release/action](https://github.com/go-semantic-release/action) from 1.17 to 1.18. - [Release notes](https://github.com/go-semantic-release/action/releases) - [Commits](https://github.com/go-semantic-release/action/compare/v1.17...v1.18) --- updated-dependencies: - dependency-name: go-semantic-release/action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 189a588..00e3f5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: name: Unshallow run: git fetch --prune --unshallow - - uses: go-semantic-release/action@v1.17 + uses: go-semantic-release/action@v1.18 id: semantic with: github-token: ${{ secrets.GITHUB_TOKEN }} From e1a3419939cc1b87e095ca6d90eb0dd280535093 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Fri, 3 Jun 2022 16:07:11 +0200 Subject: [PATCH 26/56] chore: gitignore --- .gitignore | 1 + auth.go => v1/auth.go | 0 auth_test.go => v1/auth_test.go | 0 endpoint.go => v1/endpoint.go | 0 endpoint_test.go => v1/endpoint_test.go | 0 integration_test.go => v1/integration_test.go | 0 submissions.go => v1/submissions.go | 0 submissions_test.go => v1/submissions_test.go | 0 8 files changed, 1 insertion(+) rename auth.go => v1/auth.go (100%) rename auth_test.go => v1/auth_test.go (100%) rename endpoint.go => v1/endpoint.go (100%) rename endpoint_test.go => v1/endpoint_test.go (100%) rename integration_test.go => v1/integration_test.go (100%) rename submissions.go => v1/submissions.go (100%) rename submissions_test.go => v1/submissions_test.go (100%) diff --git a/.gitignore b/.gitignore index fca22b6..9d6945c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ isa .idea/ dist/ vendor/ +test.yml diff --git a/auth.go b/v1/auth.go similarity index 100% rename from auth.go rename to v1/auth.go diff --git a/auth_test.go b/v1/auth_test.go similarity index 100% rename from auth_test.go rename to v1/auth_test.go diff --git a/endpoint.go b/v1/endpoint.go similarity index 100% rename from endpoint.go rename to v1/endpoint.go diff --git a/endpoint_test.go b/v1/endpoint_test.go similarity index 100% rename from endpoint_test.go rename to v1/endpoint_test.go diff --git a/integration_test.go b/v1/integration_test.go similarity index 100% rename from integration_test.go rename to v1/integration_test.go diff --git a/submissions.go b/v1/submissions.go similarity index 100% rename from submissions.go rename to v1/submissions.go diff --git a/submissions_test.go b/v1/submissions_test.go similarity index 100% rename from submissions_test.go rename to v1/submissions_test.go From f527ae739b12e0fdbe4d7885ab8fa0674718641d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 04:01:51 +0000 Subject: [PATCH 27/56] chore(deps): bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0 Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.1 to 1.9.0. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.8.1...v1.9.0) --- updated-dependencies: - dependency-name: github.com/sirupsen/logrus dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +--- go.sum | 19 ++++++------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 8ea116a..58e5e46 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.8.1 - github.com/stretchr/testify v1.6.1 // indirect - golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb // indirect + github.com/sirupsen/logrus v1.9.0 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) diff --git a/go.sum b/go.sum index f0276e4..d227c2a 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -13,22 +12,16 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb h1:HS9IzC4UFbpMBLQUDSQcU+ViVT1vdFCQVjdPVpTlZrs= -golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 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= From 110e74084c1f49e421a373a8de4454f604a594fe Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 10:24:56 +0200 Subject: [PATCH 28/56] feat: add v2 --- .github/goreleaser.yml | 14 +- .github/workflows/build.yml | 2 +- .gitignore | 2 +- README.md | 7 +- cmd/cli/company/company.go | 26 +++ cmd/cli/company/list_programs.go | 19 ++ cmd/cli/main.go | 63 ++++++ go.mod | 6 +- go.sum | 373 ++++++++++++++++++++++++++++++- pkg/config/config.go | 107 +++++++++ v1/auth.go | 20 +- v1/auth_test.go | 20 +- v1/endpoint.go | 26 ++- v1/endpoint_test.go | 2 +- v1/integration_test.go | 47 +++- v1/submissions.go | 2 +- v1/submissions_test.go | 4 +- v2/auth.go | 129 +++++++++++ v2/auth_callback.go | 74 ++++++ v2/endpoint.go | 46 ++++ v2/programs.go | 67 ++++++ v2/submissions.go | 113 ++++++++++ v2/utils.go | 14 ++ 23 files changed, 1127 insertions(+), 56 deletions(-) create mode 100644 cmd/cli/company/company.go create mode 100644 cmd/cli/company/list_programs.go create mode 100644 cmd/cli/main.go create mode 100644 pkg/config/config.go create mode 100644 v2/auth.go create mode 100644 v2/auth_callback.go create mode 100644 v2/endpoint.go create mode 100644 v2/programs.go create mode 100644 v2/submissions.go create mode 100644 v2/utils.go diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 49c7b1d..ea2ed71 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -11,4 +11,16 @@ changelog: exclude: - '^docs:' - '^test:' - - '^chore' \ No newline at end of file + - '^chore' +builds: + - + id: cli + dir: ./cmd/cli + +archives: + - replacements: + darwin: macos + linux: linux + windows: windows + 386: i386 + amd64: x86_64 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a513d83..6cb9f4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,4 +18,4 @@ jobs: run: go mod download - name: Go build - run: go build -o /dev/null ./... + run: go build -o /dev/null ./cmd/cli diff --git a/.gitignore b/.gitignore index 9d6945c..a68e5c9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ isa .idea/ dist/ vendor/ -test.yml +*.yml diff --git a/README.md b/README.md index 6fb31c0..0eb9d1b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ # go-intigriti -Go library for interacting with the [intigriti](https://www.intigriti.com/) API. -Checkout the [docs](https://pkg.go.dev/github.com/hazcod/go-intigriti)! +Go library for interacting with the [intigriti](https://www.intigriti.com/) v2 API. +Checkout the [docs](https://pkg.go.dev/github.com/intigriti/sdk-go)! +API documentation is available on the [ReadMe](https://dash.readme.com/project/intigriti/v2.0/overview). ## Usage ```go package main import ( - inti "github.com/hazcod/go-intigriti" + inti "github.com/hazcod/go-intigriti/v2" "log" ) diff --git a/cmd/cli/company/company.go b/cmd/cli/company/company.go new file mode 100644 index 0000000..26156cd --- /dev/null +++ b/cmd/cli/company/company.go @@ -0,0 +1,26 @@ +package company + +import ( + "flag" + "github.com/hazcod/go-intigriti/pkg/config" + v2 "github.com/hazcod/go-intigriti/v2" + "github.com/sirupsen/logrus" + "strings" +) + +func Command(l *logrus.Logger, cfg *config.Config, inti v2.Endpoint) { + if len(flag.Args()) < 2 { + l.Fatal("Missing subcommand. See: company ") + } + + subCommand := strings.ToLower(flag.Args()[1]) + + switch subCommand { + case "ls", "list", "list-programs": + ListPrograms(l, inti) + return + + default: + l.Fatalf("Unknown subcommand '%s'. See: company ", subCommand) + } +} diff --git a/cmd/cli/company/list_programs.go b/cmd/cli/company/list_programs.go new file mode 100644 index 0000000..1abcce0 --- /dev/null +++ b/cmd/cli/company/list_programs.go @@ -0,0 +1,19 @@ +package company + +import ( + v2 "github.com/hazcod/go-intigriti/v2" + "github.com/sirupsen/logrus" +) + +func ListPrograms(l *logrus.Logger, inti v2.Endpoint) { + l.Info("Listing company programs") + + programs, err := inti.GetPrograms() + if err != nil { + l.WithError(err).Fatal("could not list programs") + } + + for _, program := range programs { + l.Infof("- %s (type %s, status %s, handle %s)", program.Name, program.Type.Value, program.Status.Value, program.Handle) + } +} diff --git a/cmd/cli/main.go b/cmd/cli/main.go new file mode 100644 index 0000000..0131aae --- /dev/null +++ b/cmd/cli/main.go @@ -0,0 +1,63 @@ +package main + +import ( + "flag" + "github.com/hazcod/go-intigriti/cmd/cli/company" + "github.com/hazcod/go-intigriti/pkg/config" + v2 "github.com/hazcod/go-intigriti/v2" + "github.com/sirupsen/logrus" + "strings" +) + +func main() { + logger := logrus.New() + + configPath := flag.String("config", "inti.yml", "Path to your config file.") + logLevelStr := flag.String("log", "info", "Log level.") + flag.Parse() + + logLevel, err := logrus.ParseLevel(*logLevelStr) + if err != nil { + logger.WithError(err).Fatal("could not parse log level") + } + + logger.SetLevel(logLevel) + logger.WithField("level", logLevel.String()).Debugf("log level set") + + cfg, err := config.Load(logger, *configPath) + if err != nil { + logger.Fatalf("could not load configuration: %s", err) + } + + if err := cfg.Validate(); err != nil { + logger.WithError(err).Fatal("invalid configuration") + } + + inti, err := v2.New(cfg.Auth.ClientID, cfg.Auth.ClientSecret, &cfg.Cache) + if err != nil { + logger.WithError(err).Fatal("could not initialize client") + } + + intiToken, err := inti.GetToken() + if err != nil { + logger.WithError(err).Warn("could not extract token, skipping token cache") + } else { + if err := cfg.CacheAuth(logger, *configPath, intiToken); err != nil { + logger.WithError(err).Warn("could not cache token") + } + } + + if len(flag.Args()) == 0 { + logger.Fatalf("no command provided. See: company") + } + + command := strings.ToLower(flag.Args()[0]) + + switch strings.ToLower(command) { + case "company", "c": + company.Command(logger, cfg, inti) + return + default: + logger.Fatalf("unknown command '%s'. See: company", command) + } +} diff --git a/go.mod b/go.mod index 0853a19..fa326d2 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,14 @@ module github.com/hazcod/go-intigriti go 1.14 require ( + github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b // indirect + github.com/kelseyhightower/envconfig v1.4.0 github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.7.0 github.com/stretchr/testify v1.6.1 // indirect - golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb // indirect + golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect + gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 ) diff --git a/go.sum b/go.sum index 17acc97..b8314a4 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,114 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +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.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +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 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/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.4.1/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.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b h1:FQ7+9fxhyp82ks9vAuyPzG0/vVbWwMwLJ+P6yJI5FN8= +github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b/go.mod h1:HMcgvsgd0Fjj4XXDkbjdmlbI505rUPBs6WBMYg2pXks= +github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -13,22 +118,276 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +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-20190605123033-f99c8df09eb5/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/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/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-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-20190108225652-1e06a53dbb7e/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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/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-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 h1:zwrSfklXn0gxyLRX/aR+q6cgHbV/ItVyzbPlbA+dkAw= +golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb h1:HS9IzC4UFbpMBLQUDSQcU+ViVT1vdFCQVjdPVpTlZrs= -golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.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.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/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-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +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.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +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-20190418145605-e7d98fc518a7/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-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/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.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +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 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/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-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/pkg/config/config.go b/pkg/config/config.go new file mode 100644 index 0000000..ce645d4 --- /dev/null +++ b/pkg/config/config.go @@ -0,0 +1,107 @@ +package config + +import ( + "github.com/juju/fslock" + "github.com/kelseyhightower/envconfig" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/oauth2" + "gopkg.in/yaml.v3" + "io/ioutil" + "time" +) + +const ( + appEnvPrefix = "INTI" +) + +type Config struct { + Log struct { + Level string `yaml:"level"` + } `yaml:"log"` + + Auth struct { + ClientID string `yaml:"client_id"` + ClientSecret string `yaml:"client_secret"` + } `yaml:"auth"` + + Cache TokenCache `yaml:"cache"` +} + +type TokenCache struct { + RefreshToken string `yaml:"refresh_token"` + AccessToken string `yanl:"access_token"` + ExpiryDate time.Time `yaml:"expiry"` + Type string `yaml:"type"` +} + +func Load(logger *logrus.Logger, path string) (*Config, error) { + var config Config + + if path != "" { + configBytes, err := ioutil.ReadFile(path) + if err != nil { + return nil, errors.Wrap(err, "could not load configuration file") + } + + if err := yaml.Unmarshal(configBytes, &config); err != nil { + return nil, errors.Wrap(err, "could not parse configuration file") + } + + logger.WithField("config", path).Debug("loaded configuration") + } + + if err := envconfig.Process(appEnvPrefix, &config); err != nil { + return nil, errors.Wrap(err, "could not load environment variables") + } + + return &config, nil +} + +func (c *Config) Save(logger *logrus.Logger, path string) error { + b, err := yaml.Marshal(c) + if err != nil { + return errors.Wrap(err, "could not serialize config") + } + + if err := ioutil.WriteFile(path, b, 0600); err != nil { + return errors.Wrap(err, "could not write config") + } + + return nil +} + +func (c *Config) Validate() error { + if c.Auth.ClientID == "" { + return errors.New("no clientid provided") + } + + if c.Auth.ClientSecret == "" { + return errors.New("no client secret provided") + } + + return nil +} + +func (c *Config) CacheAuth(l *logrus.Logger, path string, token *oauth2.Token) error { + if !token.Valid() { + return errors.New("token is not valid") + } + + lock := fslock.New(path) + if err := lock.TryLock(); err != nil { + return errors.Wrap(err, "could not lock config file") + } + defer lock.Unlock() + + c.Cache.AccessToken = token.AccessToken + c.Cache.RefreshToken = token.RefreshToken + c.Cache.ExpiryDate = token.Expiry + c.Cache.Type = token.TokenType + + if err := c.Save(l, path); err != nil { + return errors.Wrap(err, "failed to save config") + } + + return nil +} diff --git a/v1/auth.go b/v1/auth.go index 781a86a..c25294d 100644 --- a/v1/auth.go +++ b/v1/auth.go @@ -1,4 +1,4 @@ -package intigriti +package v1 import ( "encoding/json" @@ -14,19 +14,19 @@ const ( expectedTokenType = "bearer" expectedTokenScope = "external_api" authRefreshNeeded = time.Second * 10 - httpTimeout = time.Second * 5 + httpTimeout = time.Second * 5 mimeFormUrlEncoded = "application/x-www-form-urlencoded" ) type authResponse struct { - AccessToken string `json:"access_token"` - ExpiresAtSeconds int `json:"expires_in"` - TokenType string `json:"token_type"` - Scope string `json:"scope"` + AccessToken string `json:"access_token"` + ExpiresAtSeconds int `json:"expires_in"` + TokenType string `json:"token_type"` + Scope string `json:"scope"` } func needsAuthRefresh(token, testTime time.Time) bool { - return token.Add( authRefreshNeeded ).Before( testTime ) + return token.Add(authRefreshNeeded).Before(testTime) } func getNewAuthToken(apiUrl, clientId, clientSecret string) (authResponse authResponse, err error) { @@ -49,7 +49,7 @@ func getNewAuthToken(apiUrl, clientId, clientSecret string) (authResponse authRe return authResponse, errors.Wrap(err, "http request failed") } - defer func(){ _ = resp.Body.Close() }() + defer func() { _ = resp.Body.Close() }() if resp.StatusCode > 399 { return authResponse, errors.Errorf("received error code: %d", resp.StatusCode) @@ -70,7 +70,7 @@ func getNewAuthToken(apiUrl, clientId, clientSecret string) (authResponse authRe func setNewAuthExpiration(e *Endpoint, tokenSeconds int) error { now := time.Now() - newExpTime := now.Add(time.Second * time.Duration( tokenSeconds )) + newExpTime := now.Add(time.Second * time.Duration(tokenSeconds)) if newExpTime.Before(now) { return errors.Errorf("new expiration time %s is before %s", newExpTime, now) } @@ -85,7 +85,7 @@ func setNewAuthExpiration(e *Endpoint, tokenSeconds int) error { func authenticate(e *Endpoint) error { now := time.Now() - if ! needsAuthRefresh(e.authTokenExp, now) { + if !needsAuthRefresh(e.authTokenExp, now) { e.Logger.WithField("auth_token_exp", e.authTokenExp). Debug("no need to refresh auth token") return nil diff --git a/v1/auth_test.go b/v1/auth_test.go index 68a9028..65cb900 100644 --- a/v1/auth_test.go +++ b/v1/auth_test.go @@ -1,4 +1,4 @@ -package intigriti +package v1 import ( "encoding/json" @@ -13,20 +13,20 @@ import ( func TestNeedsAuthRefresh(t *testing.T) { now := time.Now() - okTime := now.Add( time.Minute ) + okTime := now.Add(time.Minute) if needsAuthRefresh(okTime, now) { t.Error("token needs refresh while it doesnt") } - badTime := now.Add( time.Minute * -1 ) - if ! needsAuthRefresh(badTime, now) { + badTime := now.Add(time.Minute * -1) + if !needsAuthRefresh(badTime, now) { t.Error("token never needs refresh") } } func TestSetNewAuthExpiration(t *testing.T) { e := New("", "") - okToken := time.Hour * 4 + okToken := time.Hour * 4 if err := setNewAuthExpiration(&e, int(okToken.Seconds())); err != nil { t.Error(err) @@ -39,7 +39,7 @@ func TestSetNewAuthExpiration(t *testing.T) { } func getTestAuthTokenServer(token string, expiresAtSec int) *httptest.Server { - return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request){ + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodPost { http.NotFound(w, r) return @@ -47,13 +47,15 @@ func getTestAuthTokenServer(token string, expiresAtSec int) *httptest.Server { w.Header().Set("Content-Type", "application/json") authResponse := authResponse{ - AccessToken: token, + AccessToken: token, ExpiresAtSeconds: expiresAtSec, TokenType: expectedTokenType, Scope: expectedTokenScope, } bytes, err := json.Marshal(&authResponse) - if err != nil { w.WriteHeader(http.StatusBadRequest) } + if err != nil { + w.WriteHeader(http.StatusBadRequest) + } w.Write(bytes) })) } @@ -66,4 +68,4 @@ func TestGetNewAuthToken(t *testing.T) { if _, err := getNewAuthToken(ts.URL, "foo", "bar"); err != nil { t.Error(err) } -} \ No newline at end of file +} diff --git a/v1/endpoint.go b/v1/endpoint.go index 6056cdd..1c568a9 100644 --- a/v1/endpoint.go +++ b/v1/endpoint.go @@ -1,4 +1,4 @@ -package intigriti +package v1 import ( "github.com/sirupsen/logrus" @@ -7,34 +7,38 @@ import ( const ( apiSubmissions = "https://api.intigriti.com/external/submission" - apiAuth = "https://login.intigriti.com/connect/token" + apiAuth = "https://login.intigriti.com/connect/token" clientTag = "Go intigriti library" ) type Endpoint struct { - Logger *logrus.Logger + Logger *logrus.Logger URLApiAuth string URLApiSubmissions string - clientToken string - clientSecret string - clientTag string + clientToken string + clientSecret string + clientTag string - authToken string - authTokenExp time.Time + authToken string + authTokenExp time.Time } func New(clientToken string, clientSecret string) Endpoint { e := Endpoint{ - clientToken: clientToken, + clientToken: clientToken, clientSecret: clientSecret, - clientTag: clientTag, + clientTag: clientTag, } + e.clientToken = "" + + // TODO: implement new OIDC authentication mechanism + e.Logger = logrus.New() e.URLApiAuth = apiAuth e.URLApiSubmissions = apiSubmissions return e -} \ No newline at end of file +} diff --git a/v1/endpoint_test.go b/v1/endpoint_test.go index 48cff19..c85f906 100644 --- a/v1/endpoint_test.go +++ b/v1/endpoint_test.go @@ -1,4 +1,4 @@ -package intigriti +package v1 import "testing" diff --git a/v1/integration_test.go b/v1/integration_test.go index d604447..cad9d11 100644 --- a/v1/integration_test.go +++ b/v1/integration_test.go @@ -1,6 +1,7 @@ -//+build integration +//go:build integration +// +build integration -package intigriti +package v1 import ( "github.com/sirupsen/logrus" @@ -9,11 +10,33 @@ import ( ) func TestIntegration(t *testing.T) { + + + foo = "Fooasd" + + + // fp bar + + + dkl + + + d +

Successfully authenticated, you may close this page.

+ + + ` +) + +type callbackResult struct { + Error error + Code string +} + +func (e *Endpoint) getLocalHandler(state string, resultChan chan callbackResult, doneChan chan struct{}) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/" { + e.Logger.WithField("path", r.URL.Path).Debug("invalid callback path") + w.WriteHeader(http.StatusNotFound) + return + } + + if r.URL.Query().Get("state") != state { + e.Logger.WithField("required_state", state).WithField("given_state", r.URL.Query().Get("state")). + Warn("invalid state provided") + w.WriteHeader(http.StatusBadRequest) + return + } + + w.Header().Set("content-type", "text/html; charset=UTF-8") + _, _ = w.Write([]byte(htmlAutoClose)) + + resultChan <- callbackResult{ + Code: r.URL.Query().Get("code"), + Error: nil, + } + + doneChan <- struct{}{} + + e.Logger.WithField("code", r.URL.Query().Get("code")).Debug("callback successfully got code") + + return + }) +} + +func (e *Endpoint) listenForCallback(localPort uint, state string, resultChan chan callbackResult) { + e.Logger.WithField("port", localPort).Debug("retrieving new authorization code") + + doneChan := make(chan struct{}, 2) + + srv := http.Server{} + srv.Addr = fmt.Sprintf("localhost:%d", localPort) + srv.Handler = e.getLocalHandler(state, resultChan, doneChan) + + go func() { + <-doneChan + ctx, _ := context.WithTimeout(context.Background(), time.Millisecond) + _ = srv.Shutdown(ctx) + e.Logger.Debug("shut down local callback listener") + }() + + err := srv.ListenAndServe() + resultChan <- callbackResult{Error: err} + e.Logger.Debug("returning from listenForCallback") +} diff --git a/v2/endpoint.go b/v2/endpoint.go new file mode 100644 index 0000000..dd29c8f --- /dev/null +++ b/v2/endpoint.go @@ -0,0 +1,46 @@ +package v2 + +import ( + "github.com/hazcod/go-intigriti/pkg/config" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/oauth2" + "net/http" +) + +const ( + // TODO: inject on every HTTP request + clientTag = "hazcod/go-intigriti/1.0" +) + +type Endpoint struct { + Logger *logrus.Logger + URLAPI string + + clientID string + clientSecret string + refreshToken string + clientTag string + + client *http.Client + oauthToken *oauth2.Token +} + +func New(clientToken string, clientSecret string, tc *config.TokenCache) (Endpoint, error) { + e := Endpoint{ + clientID: clientToken, + clientSecret: clientSecret, + clientTag: clientTag, + } + + e.Logger = logrus.New() + + httpClient, err := e.getClient(tc) + if err != nil { + return e, errors.Wrap(err, "could not init client") + } + + e.client = httpClient + + return e, nil +} diff --git a/v2/programs.go b/v2/programs.go new file mode 100644 index 0000000..5545838 --- /dev/null +++ b/v2/programs.go @@ -0,0 +1,67 @@ +package v2 + +import ( + "encoding/json" + "github.com/pkg/errors" + "io/ioutil" + "net/http" +) + +const ( + programURI = "/company/v2/programs" +) + +func (e *Endpoint) GetPrograms() ([]Program, error) { + req, err := http.NewRequest(http.MethodGet, apiEndpoint+programURI, nil) + if err != nil { + return nil, errors.Wrap(err, "could not create get programs") + } + + resp, err := e.client.Do(req) + if err != nil { + return nil, errors.Wrap(err, "could not get programs") + } + + if resp.StatusCode > 399 { + return nil, errors.Errorf("returned status %d", resp.StatusCode) + } + + defer resp.Body.Close() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, errors.Wrap(err, "could not read response") + } + + var programs []Program + + if err := json.Unmarshal(b, &programs); err != nil { + return nil, errors.Wrap(err, "could not decode programs") + } + + return programs, nil +} + +type Program struct { + ID string `json:"id"` + Handle string `json:"handle"` + CompanyID string `json:"companyId"` + CompanyHandle string `json:"companyHandle"` + LogoURL string `json:"logoUrl"` + Name string `json:"name"` + Status struct { + ID int `json:"id"` + Value string `json:"value"` + } `json:"status"` + ConfidentialityLevel struct { + ID int `json:"id"` + Value string `json:"value"` + } `json:"confidentialityLevel"` + WebLinks struct { + Details string `json:"details"` + } `json:"webLinks"` + Type struct { + ID int `json:"id"` + Value string `json:"value"` + } `json:"type"` +} diff --git a/v2/submissions.go b/v2/submissions.go new file mode 100644 index 0000000..cad9904 --- /dev/null +++ b/v2/submissions.go @@ -0,0 +1,113 @@ +package v2 + +import ( + "encoding/json" + "fmt" + "github.com/pkg/errors" + "io/ioutil" + "net/http" + "strings" +) + +const ( + submissionUri = "/company/v2/programs/%s/submissions" +) + +func (e *Endpoint) GetSubmissions(programId string) ([]Submission, error) { + req, err := http.NewRequest(http.MethodGet, apiEndpoint+fmt.Sprintf(submissionUri, programId), nil) + if err != nil { + return nil, errors.Wrap(err, "could not create get programs") + } + + resp, err := e.client.Do(req) + if err != nil { + return nil, errors.Wrap(err, "could not get programs") + } + + if resp.StatusCode > 399 { + return nil, errors.Errorf("returned status %d", resp.StatusCode) + } + + defer resp.Body.Close() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, errors.Wrap(err, "could not read response") + } + + var submissions []Submission + + if err := json.Unmarshal(b, &submissions); err != nil { + return nil, errors.Wrap(err, "could not decode programs") + } + + return submissions, nil +} + +type Submission struct { + Code string `json:"code"` + InternalReference interface{} `json:"internalReference"` + Title string `json:"title"` + ProgramID string `json:"programId"` + Severity struct { + ID int `json:"id"` + Vector interface{} `json:"vector"` + Value string `json:"value"` + } `json:"severity"` + State struct { + Status struct { + ID int `json:"id"` + Value string `json:"value"` + } `json:"status"` + CloseReason struct { + ID int `json:"id"` + Value string `json:"value"` + } `json:"closeReason"` + } `json:"state"` + TotalPayout struct { + Value float64 `json:"value"` + Currency string `json:"currency"` + } `json:"totalPayout"` + CreatedAt int `json:"createdAt"` + LastUpdatedAt int `json:"lastUpdatedAt"` + AwaitingFeedback bool `json:"awaitingFeedback"` + Destroyed bool `json:"destroyed"` + Assignee interface{} `json:"assignee"` + Tags []interface{} `json:"tags"` + GroupID interface{} `json:"groupId"` + Submitter struct { + Ranking struct { + Rank int `json:"rank"` + Reputation int `json:"reputation"` + Streak interface{} `json:"streak"` + } `json:"ranking"` + IdentityChecked bool `json:"identityChecked"` + UserID string `json:"userId"` + UserName string `json:"userName"` + AvatarURL string `json:"avatarUrl"` + Role string `json:"role"` + } `json:"submitter"` + CollaboratorCount int `json:"collaboratorCount"` + WebLinks struct { + Details string `json:"details"` + } `json:"webLinks"` +} + +func (s *Submission) IsClosed() bool { + return s.State.CloseReason.Value != "" +} + +func (s *Submission) IsActive() bool { + switch strings.ToLower(s.State.Status.Value) { + case "triage": + return false + case "closed": + return false + case "accepted": + return false + case "archived": + return false + default: + return true + } +} diff --git a/v2/utils.go b/v2/utils.go new file mode 100644 index 0000000..63030eb --- /dev/null +++ b/v2/utils.go @@ -0,0 +1,14 @@ +package v2 + +import "math/rand" + +func randomString(n int) string { + var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") + + s := make([]rune, n) + for i := range s { + s[i] = letters[rand.Intn(len(letters))] + } + + return string(s) +} From ee7d7ed562e0b52d560652169238cda42ce1994e Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 10:29:04 +0200 Subject: [PATCH 29/56] chore: minor optimizations from govet --- pkg/config/config.go | 7 ++++++- v2/auth_callback.go | 5 ++--- v2/endpoint.go | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index ce645d4..18c3680 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -92,7 +92,12 @@ func (c *Config) CacheAuth(l *logrus.Logger, path string, token *oauth2.Token) e if err := lock.TryLock(); err != nil { return errors.Wrap(err, "could not lock config file") } - defer lock.Unlock() + + defer func() { + if err := lock.Unlock(); err != nil { + l.WithError(err).Warn("could not release config lock") + } + }() c.Cache.AccessToken = token.AccessToken c.Cache.RefreshToken = token.RefreshToken diff --git a/v2/auth_callback.go b/v2/auth_callback.go index ce78c91..6298213 100644 --- a/v2/auth_callback.go +++ b/v2/auth_callback.go @@ -47,8 +47,6 @@ func (e *Endpoint) getLocalHandler(state string, resultChan chan callbackResult, doneChan <- struct{}{} e.Logger.WithField("code", r.URL.Query().Get("code")).Debug("callback successfully got code") - - return }) } @@ -63,9 +61,10 @@ func (e *Endpoint) listenForCallback(localPort uint, state string, resultChan ch go func() { <-doneChan - ctx, _ := context.WithTimeout(context.Background(), time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) _ = srv.Shutdown(ctx) e.Logger.Debug("shut down local callback listener") + cancel() // just to fix govet }() err := srv.ListenAndServe() diff --git a/v2/endpoint.go b/v2/endpoint.go index dd29c8f..886d7a6 100644 --- a/v2/endpoint.go +++ b/v2/endpoint.go @@ -19,7 +19,6 @@ type Endpoint struct { clientID string clientSecret string - refreshToken string clientTag string client *http.Client From 39106a51d3af4d0f4eac1b1267d4a89a89a7b82f Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 10:31:01 +0200 Subject: [PATCH 30/56] chore: fix v1 test --- v1/endpoint.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/v1/endpoint.go b/v1/endpoint.go index 1c568a9..22c9af8 100644 --- a/v1/endpoint.go +++ b/v1/endpoint.go @@ -32,10 +32,6 @@ func New(clientToken string, clientSecret string) Endpoint { clientTag: clientTag, } - e.clientToken = "" - - // TODO: implement new OIDC authentication mechanism - e.Logger = logrus.New() e.URLApiAuth = apiAuth e.URLApiSubmissions = apiSubmissions From e18c3331a1234471faa45e45d71e9c8e4a69f874 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 10:53:32 +0200 Subject: [PATCH 31/56] feat: add v2 company submissions --- cmd/cli/company/company.go | 6 +++- cmd/cli/company/list_submissions.go | 46 +++++++++++++++++++++++++++++ cmd/cli/main.go | 1 + 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 cmd/cli/company/list_submissions.go diff --git a/cmd/cli/company/company.go b/cmd/cli/company/company.go index 26156cd..34fd009 100644 --- a/cmd/cli/company/company.go +++ b/cmd/cli/company/company.go @@ -13,13 +13,17 @@ func Command(l *logrus.Logger, cfg *config.Config, inti v2.Endpoint) { l.Fatal("Missing subcommand. See: company ") } - subCommand := strings.ToLower(flag.Args()[1]) + subCommand := strings.ToLower(flag.Arg(1)) switch subCommand { case "ls", "list", "list-programs": ListPrograms(l, inti) return + case "sub", "submissions", "list-submissions": + ListSubmissions(l, inti) + return + default: l.Fatalf("Unknown subcommand '%s'. See: company ", subCommand) } diff --git a/cmd/cli/company/list_submissions.go b/cmd/cli/company/list_submissions.go new file mode 100644 index 0000000..f362f82 --- /dev/null +++ b/cmd/cli/company/list_submissions.go @@ -0,0 +1,46 @@ +package company + +import ( + "flag" + v2 "github.com/hazcod/go-intigriti/v2" + "github.com/sirupsen/logrus" + "strings" +) + +func ListSubmissions(l *logrus.Logger, inti v2.Endpoint) { + programID := "*" + if len(flag.Args()) >= 3 { + programID = flag.Arg(2) + l.WithField("program_id", programID).Debug("filtering submissions for program") + } + + l.WithField("program_id", programID).Info("Listing company submissions") + + programIDs := make([]string, 0) + + if strings.TrimSpace(programID) == "" || programID == "*" { + programs, err := inti.GetPrograms() + if err != nil { + l.WithError(err).Fatal("could not list programs") + } + for _, program := range programs { + programIDs = append(programIDs, program.ID) + } + } else { + programIDs = []string{programID} + } + + for _, programID := range programIDs { + submissions, err := inti.GetSubmissions(programID) + if err != nil { + l.WithError(err).WithField("program_id", submissions).Warn("could not list submissions") + continue + } + + for _, subm := range submissions { + l.Infof( + "- %s (state %s, severity %s, code %s)", + subm.Title, subm.State.Status, subm.Severity.Value, subm.Code) + } + } +} diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 0131aae..a576afb 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -46,6 +46,7 @@ func main() { logger.WithError(err).Warn("could not cache token") } } + logger.WithField("valid", intiToken.Valid()).Debug("retrieved auth token") if len(flag.Args()) == 0 { logger.Fatalf("no command provided. See: company") From 32ec3a39bb21574c34c1cfa6f0a97acc2f140559 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:13:13 +0200 Subject: [PATCH 32/56] feat: allow to override URLs for internal testing --- cmd/cli/main.go | 2 +- v2/auth.go | 42 +++++++++++++++++++++++++++++------------- v2/endpoint.go | 8 ++++++-- v2/utils.go | 4 +++- 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/cmd/cli/main.go b/cmd/cli/main.go index a576afb..d70b4e4 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -33,7 +33,7 @@ func main() { logger.WithError(err).Fatal("invalid configuration") } - inti, err := v2.New(cfg.Auth.ClientID, cfg.Auth.ClientSecret, &cfg.Cache) + inti, err := v2.New(cfg.Auth.ClientID, cfg.Auth.ClientSecret, &cfg.Cache, logger) if err != nil { logger.WithError(err).Fatal("could not initialize client") } diff --git a/v2/auth.go b/v2/auth.go index 9ea7f0d..abe389c 100644 --- a/v2/auth.go +++ b/v2/auth.go @@ -6,6 +6,7 @@ import ( "github.com/pkg/errors" "golang.org/x/oauth2" "net/http" + "os" "time" ) @@ -20,13 +21,33 @@ const ( apiEndpoint = "https://api.intigriti.com/external" ) +var ( + tokenURL = os.Getenv("INTI_TOKEN_URL") + authzURL = os.Getenv("INTI_AUTH_URL") + apiURL = os.Getenv("INTI_API_URL") +) + func (e *Endpoint) getOauth2Config() oauth2.Config { + if tokenURL == "" { + tokenURL = apiTokenURL + } + + if authzURL == "" { + authzURL = apiAuthzURL + } + + if apiURL == "" { + apiURL = apiEndpoint + } + + e.Logger.WithField("api_url", apiURL).Debug("set api url") + return oauth2.Config{ ClientID: e.clientID, ClientSecret: e.clientSecret, Endpoint: oauth2.Endpoint{ - TokenURL: apiTokenURL, - AuthURL: apiAuthzURL, + TokenURL: tokenURL, + AuthURL: authzURL, }, RedirectURL: localCallbackURL, Scopes: []string{"external_api", "offline_access"}, @@ -34,6 +55,10 @@ func (e *Endpoint) getOauth2Config() oauth2.Config { } func (e *Endpoint) GetToken() (*oauth2.Token, error) { + if e.oauthToken != nil && e.oauthToken.Valid() { + return e.oauthToken, nil + } + conf := e.getOauth2Config() tokenSrc := conf.TokenSource(context.Background(), e.oauthToken) @@ -48,16 +73,7 @@ func (e *Endpoint) GetToken() (*oauth2.Token, error) { func (e *Endpoint) getClient(tc *config.TokenCache) (*http.Client, error) { ctx := context.Background() - conf := &oauth2.Config{ - ClientID: e.clientID, - ClientSecret: e.clientSecret, - Endpoint: oauth2.Endpoint{ - TokenURL: apiTokenURL, - AuthURL: apiAuthzURL, - }, - RedirectURL: localCallbackURL, - Scopes: []string{"external_api", "offline_access"}, - } + conf := e.getOauth2Config() httpClient := &http.Client{Timeout: httpTimeoutSec * time.Second} @@ -75,7 +91,7 @@ func (e *Endpoint) getClient(tc *config.TokenCache) (*http.Client, error) { if !e.oauthToken.Valid() { e.Logger.Debug("authenticating for new token") - authzCode, err := e.authenticate(ctx, conf) + authzCode, err := e.authenticate(ctx, &conf) if err != nil { return nil, errors.Wrap(err, "failed to authenticate") } diff --git a/v2/endpoint.go b/v2/endpoint.go index 886d7a6..a665475 100644 --- a/v2/endpoint.go +++ b/v2/endpoint.go @@ -25,14 +25,18 @@ type Endpoint struct { oauthToken *oauth2.Token } -func New(clientToken string, clientSecret string, tc *config.TokenCache) (Endpoint, error) { +func New(clientToken string, clientSecret string, tc *config.TokenCache, logger *logrus.Logger) (Endpoint, error) { e := Endpoint{ clientID: clientToken, clientSecret: clientSecret, clientTag: clientTag, } - e.Logger = logrus.New() + if logger == nil { + e.Logger = logrus.New() + } else { + e.Logger = logger + } httpClient, err := e.getClient(tc) if err != nil { diff --git a/v2/utils.go b/v2/utils.go index 63030eb..e1087d7 100644 --- a/v2/utils.go +++ b/v2/utils.go @@ -1,6 +1,8 @@ package v2 -import "math/rand" +import ( + "math/rand" +) func randomString(n int) string { var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") From 2c7e14b3a2ad16bb612d51d48e855aad6cd90b93 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:16:58 +0200 Subject: [PATCH 33/56] chore: readme --- README.md | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0eb9d1b..40d778b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # go-intigriti -Go library for interacting with the [intigriti](https://www.intigriti.com/) v2 API. +Go library and commandline client for interacting with the [intigriti](https://www.intigriti.com/) v1 and v2 API. Checkout the [docs](https://pkg.go.dev/github.com/intigriti/sdk-go)! + +## Library + API documentation is available on the [ReadMe](https://dash.readme.com/project/intigriti/v2.0/overview). -## Usage + +### Usage ```go package main @@ -13,21 +17,31 @@ import ( ) func main() { - intigriti := inti.New("my-client-token", "my-client-secret") - submissions, err := intigriti.GetSubmissions() + intigriti, err := inti.New("my-client-token", "my-client-secret", nil) // or a logrus.Logger + if err != nil { log.Fatal(err) } + + programs, err := intigriti.GetPrograms() if err != nil { log.Fatal(err) } - for _, submission := range submissions { - log.Println(submission.Title) + for _, program := range programs { + log.Println(program.Name) } } ``` -## Testing +### Testing ```shell script -# test on production -TOKEN="foo" SECRET="bar" go test -tags integration -v ./... +# test on production using inti.yml +go test -tags integration -v ./... + +# test on staging using inti.yml +INTI_TOKEN_URL=="testing.api.com" INTI_AUTH_URL=="subs.testing.api.com" INTI_API_URL="api.testing.com" go test -tags integration -v ./... +``` + +## Commandline client -# test on staging -TOKEN="foo" SECRET="bar" AUTH_API="testing.api.com" SUB_API="subs.testing.api.com" go test -tags integration -v ./... +Usage: +```shell +% inti company list-programs +% inti company list-submissions ``` \ No newline at end of file From bc08bcec7507a45d9e98c0bcc8c510aed80ed208 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:17:52 +0200 Subject: [PATCH 34/56] fix: status value --- cmd/cli/company/list_submissions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cli/company/list_submissions.go b/cmd/cli/company/list_submissions.go index f362f82..4c3b298 100644 --- a/cmd/cli/company/list_submissions.go +++ b/cmd/cli/company/list_submissions.go @@ -40,7 +40,7 @@ func ListSubmissions(l *logrus.Logger, inti v2.Endpoint) { for _, subm := range submissions { l.Infof( "- %s (state %s, severity %s, code %s)", - subm.Title, subm.State.Status, subm.Severity.Value, subm.Code) + subm.Title, subm.State.Status.Value, subm.Severity.Value, subm.Code) } } } From 240247559288374109c58fe6a90478220de1b5af Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:20:09 +0200 Subject: [PATCH 35/56] chore: add version comment --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 40d778b..4717ace 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,9 @@ Checkout the [docs](https://pkg.go.dev/github.com/intigriti/sdk-go)! API documentation is available on the [ReadMe](https://dash.readme.com/project/intigriti/v2.0/overview). +We have a `v1/` for the regular external API and a `v2/` for the new v2.0 external API. +Check with your customer success representative what version you ought to use. + ### Usage ```go package main From b37d922910df4bcae5519eaba17f5551c5666449 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:23:07 +0200 Subject: [PATCH 36/56] breaking: trigger release --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4717ace..d8895cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # go-intigriti -Go library and commandline client for interacting with the [intigriti](https://www.intigriti.com/) v1 and v2 API. -Checkout the [docs](https://pkg.go.dev/github.com/intigriti/sdk-go)! +Go library and commandline client for interacting with the [intigriti](https://www.intigriti.com/) v1 and v2 external API. +Checkout the [docs](https://pkg.go.dev/github.com/hazcod/go-intigriti)! ## Library From 4c6ab110e5f27699e3435874041052398ac2e2fc Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:24:44 +0200 Subject: [PATCH 37/56] fix: company filter --- cmd/cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cli/main.go b/cmd/cli/main.go index d70b4e4..232814e 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -55,7 +55,7 @@ func main() { command := strings.ToLower(flag.Args()[0]) switch strings.ToLower(command) { - case "company", "c": + case "company", "c", "com": company.Command(logger, cfg, inti) return default: From 334f2b0da6abbafa0bf9ce80c4d08a41c46f258a Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:30:32 +0200 Subject: [PATCH 38/56] BREAKING CHANGES: add support for the v2 API --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d8895cb..d138592 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ # go-intigriti + Go library and commandline client for interacting with the [intigriti](https://www.intigriti.com/) v1 and v2 external API. Checkout the [docs](https://pkg.go.dev/github.com/hazcod/go-intigriti)! +## Commandline client + +Usage: +```shell +% inti company list-programs +% inti company list-submissions +``` ## Library @@ -39,12 +47,4 @@ go test -tags integration -v ./... # test on staging using inti.yml INTI_TOKEN_URL=="testing.api.com" INTI_AUTH_URL=="subs.testing.api.com" INTI_API_URL="api.testing.com" go test -tags integration -v ./... -``` - -## Commandline client - -Usage: -```shell -% inti company list-programs -% inti company list-submissions ``` \ No newline at end of file From a0b6da3df500cd0067261e8cbbdc4c7cd4256e2a Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:31:02 +0200 Subject: [PATCH 39/56] fix: go mod tidy --- go.mod | 3 +-- go.sum | 17 ++++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 952e48f..c822e41 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,12 @@ module github.com/hazcod/go-intigriti go 1.14 require ( - github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b // indirect + github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b github.com/kelseyhightower/envconfig v1.4.0 github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 - github.com/stretchr/testify v1.6.1 // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 diff --git a/go.sum b/go.sum index bf3032a..028de4b 100644 --- a/go.sum +++ b/go.sum @@ -118,20 +118,15 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -228,7 +223,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -245,8 +239,9 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 7747dd9c676aa31d092d9f8d61b135b6095db8bc Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:41:12 +0200 Subject: [PATCH 40/56] fix: release fixes --- .github/goreleaser.yml | 27 ++++++++++++++-------- .github/workflows/build.yml | 21 ----------------- .github/workflows/gorelease.yml | 28 ++++++++++++++++++++++ .github/workflows/release.yml | 41 +++++++++++---------------------- .gitignore | 3 +-- 5 files changed, 61 insertions(+), 59 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/gorelease.yml diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index ea2ed71..0ba4283 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -1,10 +1,13 @@ before: hooks: - go mod download + checksum: name_template: 'checksums.txt' + snapshot: name_template: "{{ .Tag }}-next" + changelog: sort: asc filters: @@ -12,15 +15,21 @@ changelog: - '^docs:' - '^test:' - '^chore' + builds: - - - id: cli - dir: ./cmd/cli +- + id: cli + dir: ./cmd/cli + env: [CGO_ENABLED=0] + ldflags: [-w -s -extldflags "-static"] + goos: [darwin, linux, windows, freebsd] + goarch: [amd64, arm64] archives: - - replacements: - darwin: macos - linux: linux - windows: windows - 386: i386 - amd64: x86_64 \ No newline at end of file +- + replacements: + darwin: macos + linux: linux + windows: windows + 386: i386 + amd64: x86_64 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0cb47b7..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: build -on: pull_request - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v3.0.2 - - - name: Setup go - uses: actions/setup-go@v3 - with: - stable: true - - - name: Download go modules - run: go mod download - - - name: Go build - run: go build -o /dev/null ./cmd/cli diff --git a/.github/workflows/gorelease.yml b/.github/workflows/gorelease.yml new file mode 100644 index 0000000..b1b7e0b --- /dev/null +++ b/.github/workflows/gorelease.yml @@ -0,0 +1,28 @@ +name: gorelease + +on: + pull_request: + push: + tags: ['*'] + +jobs: + gorelease: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Unshallow + run: git fetch --prune --unshallow + - + name: Set up Go + uses: actions/setup-go@v3 + - + name: Release + uses: goreleaser/goreleaser-action@v3.0.0 + with: + version: latest + args: release --config=.github/goreleaser.yml --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 834ac81..0581df1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,35 +1,22 @@ -name: goreleaser +name: release on: push: - master: + branches: [main, master] jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3.0.2 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: go-semantic-release/action@v1.18 - id: semantic - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - changelog-file: .changelog - - - name: Set up Go - uses: actions/setup-go@v3 - if: steps.semantic.outputs.version != '' - - - name: Release - uses: goreleaser/goreleaser-action@v3.0.0 - if: steps.semantic.outputs.version != '' - with: - version: latest - args: release --config=.github/goreleaser.yml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - + name: Checkout + uses: actions/checkout@v3.0.2 + - + name: Unshallow + run: git fetch --prune --unshallow + - + uses: go-semantic-release/action@v1.18 + id: semantic + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + changelog-file: .changelog diff --git a/.gitignore b/.gitignore index a68e5c9..0914f05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ -:wq test/ build/ isa .idea/ dist/ vendor/ -*.yml +inti.yml From e31a72e523f827678617e372d701efe073e8e13f Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:43:06 +0200 Subject: [PATCH 41/56] fix: builds --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0581df1..6d2d2a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: name: Unshallow run: git fetch --prune --unshallow - - uses: go-semantic-release/action@v1.18 + uses: go-semantic-release/action@v1 id: semantic with: github-token: ${{ secrets.GITHUB_TOKEN }} From dd397ab600a94bf9b4a39db9679fdd990204f813 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:47:48 +0200 Subject: [PATCH 42/56] fix: release builds --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ .github/workflows/gorelease.yml | 28 ---------------------------- .github/workflows/release.yml | 11 +++++++++++ 3 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/gorelease.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..209949f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: build + +on: + pull_request: + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Unshallow + run: git fetch --prune --unshallow + - + name: Set up Go + uses: actions/setup-go@v3 + - + name: Build + uses: goreleaser/goreleaser-action@v3.0.0 + with: + version: latest + args: release --config=.github/goreleaser.yml --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gorelease.yml b/.github/workflows/gorelease.yml deleted file mode 100644 index b1b7e0b..0000000 --- a/.github/workflows/gorelease.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: gorelease - -on: - pull_request: - push: - tags: ['*'] - -jobs: - gorelease: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Unshallow - run: git fetch --prune --unshallow - - - name: Set up Go - uses: actions/setup-go@v3 - - - name: Release - uses: goreleaser/goreleaser-action@v3.0.0 - with: - version: latest - args: release --config=.github/goreleaser.yml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d2d2a4..a6c4fad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,3 +20,14 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} changelog-file: .changelog + - + name: Set up Go + uses: actions/setup-go@v3 + - + name: Release + uses: goreleaser/goreleaser-action@v3.0.0 + with: + version: latest + args: release --config=.github/goreleaser.yml --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a4937e63608f973363c4403cd99da4eeb0fca7bf Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:48:22 +0200 Subject: [PATCH 43/56] fix: fix relesae --- .github/workflows/release.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6c4fad..a3ddda8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,12 +14,6 @@ jobs: - name: Unshallow run: git fetch --prune --unshallow - - - uses: go-semantic-release/action@v1 - id: semantic - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - changelog-file: .changelog - name: Set up Go uses: actions/setup-go@v3 From 57dd0506b0374c1586bfc6aa05f5290919a420e5 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Mon, 1 Aug 2022 11:54:20 +0200 Subject: [PATCH 44/56] fix: release artifacts --- .github/goreleaser.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 0ba4283..6f0d3ae 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -16,13 +16,16 @@ changelog: - '^test:' - '^chore' +release: + disable: false + builds: - id: cli dir: ./cmd/cli env: [CGO_ENABLED=0] ldflags: [-w -s -extldflags "-static"] - goos: [darwin, linux, windows, freebsd] + goos: [darwin, linux, windows] goarch: [amd64, arm64] archives: @@ -31,5 +34,4 @@ archives: darwin: macos linux: linux windows: windows - 386: i386 amd64: x86_64 \ No newline at end of file From ecf92ae8aedebe00004b69b41e35dedb93de8207 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 09:47:42 +0200 Subject: [PATCH 45/56] fix: try fix github release artifacts --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3ddda8..c84d121 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,13 +10,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.0.2 - - - name: Unshallow - run: git fetch --prune --unshallow + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v3 + - + name: Create release tag + uses: go-semantic-release/action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Release uses: goreleaser/goreleaser-action@v3.0.0 From cc5c1d13d586aae42f313972e96e150df5d17209 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 23:29:26 +0200 Subject: [PATCH 46/56] fix: try fix github release artifacts --- .github/goreleaser.yml | 7 +++++++ .github/workflows/release.yml | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 6f0d3ae..232c3af 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -8,6 +8,9 @@ checksum: snapshot: name_template: "{{ .Tag }}-next" +gomod: + proxy: true + changelog: sort: asc filters: @@ -19,6 +22,10 @@ changelog: release: disable: false +sboms: +- + artifacts: archive + builds: - id: cli diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c84d121..5841a86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,9 +21,11 @@ jobs: uses: go-semantic-release/action@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} + - + run: git fetch -a && git pull - name: Release - uses: goreleaser/goreleaser-action@v3.0.0 + uses: goreleaser/goreleaser-action@v3 with: version: latest args: release --config=.github/goreleaser.yml --rm-dist From 2c7a0ddd5a95f3e0340b98a66afee1107f5a823d Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 23:33:06 +0200 Subject: [PATCH 47/56] fix: try fix github release artifacts --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5841a86..a5f3c0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} - - run: git fetch -a && git pull + run: git fetch -a - name: Release uses: goreleaser/goreleaser-action@v3 From 439620c5029f242fd62e7aa92fd595a20954704f Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 23:37:55 +0200 Subject: [PATCH 48/56] fix: try fix github release artifacts --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0914f05..7d0206f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ isa dist/ vendor/ inti.yml +.semrel/ +.generated-go-semantic-release-changelog.md \ No newline at end of file From 6ac7af280dbb68e08593d64cd537adb3dca05a61 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 23:39:32 +0200 Subject: [PATCH 49/56] fix: try fix github release artifacts --- .github/goreleaser.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 232c3af..09c7fa3 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -8,9 +8,6 @@ checksum: snapshot: name_template: "{{ .Tag }}-next" -gomod: - proxy: true - changelog: sort: asc filters: From 44bafaa71b2a1ce35c8aa7d65f0995105f30afeb Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 23:43:47 +0200 Subject: [PATCH 50/56] fix: try fix github release artifacts --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5f3c0a..7a0833e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,10 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 + - + name: Install syft + run: | + curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin - name: Create release tag uses: go-semantic-release/action@v1 From c630c13a6b0c77a2302ca1b12c31c00b2b95dbd8 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 2 Aug 2022 23:49:02 +0200 Subject: [PATCH 51/56] chore: scan checkout depth fix --- .github/workflows/securityscan.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/securityscan.yml b/.github/workflows/securityscan.yml index dd20a6d..978f979 100644 --- a/.github/workflows/securityscan.yml +++ b/.github/workflows/securityscan.yml @@ -15,9 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.0.2 - with: - fetch-depth: 2 + uses: actions/checkout@v3 - run: git checkout HEAD^2 if: ${{ github.event_name == 'pull_request' }} From 8a6ab5d608eeb95a9e356f1600c61bd3bd2e9c79 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Wed, 3 Aug 2022 10:17:50 +0200 Subject: [PATCH 52/56] fix: rename cli to inti --- .github/goreleaser.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 09c7fa3..c383c22 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -31,6 +31,7 @@ builds: ldflags: [-w -s -extldflags "-static"] goos: [darwin, linux, windows] goarch: [amd64, arm64] + binary: inti archives: - From 2e493f4a6fc6c5971fc57bf4b8af61952e40641d Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Wed, 3 Aug 2022 10:25:29 +0200 Subject: [PATCH 53/56] fix: rename cli to inti --- .github/goreleaser.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index c383c22..d282bb9 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -39,4 +39,5 @@ archives: darwin: macos linux: linux windows: windows - amd64: x86_64 \ No newline at end of file + amd64: x86_64 + go-intigriti: inti \ No newline at end of file From c925c7691d35defa48eae284327b0c5ac6a47ad4 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Wed, 3 Aug 2022 10:28:56 +0200 Subject: [PATCH 54/56] fix: rename cli to inti --- .github/goreleaser.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index d282bb9..3cd09df 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -19,6 +19,10 @@ changelog: release: disable: false +archives: +- + name_template: "inti_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + sboms: - artifacts: archive @@ -40,4 +44,3 @@ archives: linux: linux windows: windows amd64: x86_64 - go-intigriti: inti \ No newline at end of file From 872cf59371102f921a1953010c079bde9318970d Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Wed, 3 Aug 2022 10:30:52 +0200 Subject: [PATCH 55/56] fix: rename cli to inti --- .github/goreleaser.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml index 3cd09df..977f6d8 100644 --- a/.github/goreleaser.yml +++ b/.github/goreleaser.yml @@ -19,10 +19,6 @@ changelog: release: disable: false -archives: -- - name_template: "inti_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - sboms: - artifacts: archive @@ -39,6 +35,7 @@ builds: archives: - + name_template: "inti_{{ .Version }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: macos linux: linux From 8d7585b96b06929a16b16360eeef42ab353d18eb Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Tue, 14 Mar 2023 15:52:24 +0100 Subject: [PATCH 56/56] fix(config): access token typo --- pkg/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 18c3680..5c36972 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -30,7 +30,7 @@ type Config struct { type TokenCache struct { RefreshToken string `yaml:"refresh_token"` - AccessToken string `yanl:"access_token"` + AccessToken string `yaml:"access_token"` ExpiryDate time.Time `yaml:"expiry"` Type string `yaml:"type"` }