From b5292686ba26b0f17114d1d79ea2280be64129ae Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Fri, 31 May 2024 09:12:02 +0200 Subject: [PATCH 01/19] fix: update instructions in CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 78cfdbc..e9c751d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ python3 -m pip install yq --break-system-packages python3 -m pip install pycurl --break-system-packages ``` -Then run `make download-apis` to download the latest code. If you want to download a new version, you can also do that. +Then run `make tools download-apis` to download the latest code. If you want to download a new version, you can also do that. Then generate the client by running `make generate`. From 948e04ec665b2ddb18bb8e4b43c4ddb4f11acce0 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Mon, 3 Jun 2024 11:36:49 +0200 Subject: [PATCH 02/19] chore: update APIs & API usage --- CONTRIBUTING.md | 6 + go.mod | 56 +++ go.sum | 144 +++++++ internal/analysis/analysis.go | 85 ++-- internal/analysis/analysis_test.go | 6 +- internal/orchestration/2024-02-16/client.go | 258 +++++++++++- .../orchestration/2024-02-16/client_test.go | 112 +++-- .../orchestration/2024-02-16/common/common.go | 6 +- .../2024-02-16/parameters/orgs.go | 4 +- .../2024-02-16/parameters/scans.go | 4 +- .../2024-02-16/scans/scans.config.yaml | 2 +- .../orchestration/2024-02-16/scans/scans.go | 153 ++++++- internal/workspace/2024-03-12/client.go | 395 ------------------ .../workspace/2024-03-12/common/common.go | 239 ----------- internal/workspace/2024-03-12/links/links.go | 15 - .../workspace/2024-03-12/mocks/workspace.go | 78 ---- .../2024-03-12/parameters/content-type.go | 12 - .../workspace/2024-03-12/parameters/orgs.go | 11 - .../2024-03-12/parameters/request-id.go | 11 - .../2024-03-12/parameters/user-agent.go | 7 - .../client_pact_test.go | 45 +- .../{2024-03-12 => 2024-05-14}/client_test.go | 30 +- .../common/common.config.yaml | 2 +- .../{2024-03-12 => 2024-05-14}/gen.go | 2 +- .../links/links.config.yaml | 2 +- .../pacts/code-client-go-workspaceapi.json | 2 +- .../parameters/content-type.config.yaml | 2 +- .../parameters/orgs.config.yaml | 2 +- .../parameters/request-id.config.yaml | 2 +- .../parameters/user-agent.config.yaml | 2 +- .../spec.config.yaml | 16 +- .../{2024-03-12 => 2024-05-14}/workspace.go | 4 +- .../workspaces/workspaces.config.yaml | 6 +- .../workspaces/workspaces.go | 33 +- scripts/download-orchestration-api.py | 6 +- scripts/download-workspace-api.py | 8 +- scripts/utils.py | 2 +- 37 files changed, 822 insertions(+), 948 deletions(-) delete mode 100644 internal/workspace/2024-03-12/client.go delete mode 100644 internal/workspace/2024-03-12/common/common.go delete mode 100644 internal/workspace/2024-03-12/links/links.go delete mode 100644 internal/workspace/2024-03-12/mocks/workspace.go delete mode 100644 internal/workspace/2024-03-12/parameters/content-type.go delete mode 100644 internal/workspace/2024-03-12/parameters/orgs.go delete mode 100644 internal/workspace/2024-03-12/parameters/request-id.go delete mode 100644 internal/workspace/2024-03-12/parameters/user-agent.go rename internal/workspace/{2024-03-12 => 2024-05-14}/client_pact_test.go (77%) rename internal/workspace/{2024-03-12 => 2024-05-14}/client_test.go (86%) rename internal/workspace/{2024-03-12 => 2024-05-14}/common/common.config.yaml (81%) rename internal/workspace/{2024-03-12 => 2024-05-14}/gen.go (97%) rename internal/workspace/{2024-03-12 => 2024-05-14}/links/links.config.yaml (81%) rename internal/workspace/{2024-03-12 => 2024-05-14}/pacts/code-client-go-workspaceapi.json (96%) rename internal/workspace/{2024-03-12 => 2024-05-14}/parameters/content-type.config.yaml (83%) rename internal/workspace/{2024-03-12 => 2024-05-14}/parameters/orgs.config.yaml (81%) rename internal/workspace/{2024-03-12 => 2024-05-14}/parameters/request-id.config.yaml (82%) rename internal/workspace/{2024-03-12 => 2024-05-14}/parameters/user-agent.config.yaml (82%) rename internal/workspace/{2024-03-12 => 2024-05-14}/spec.config.yaml (67%) rename internal/workspace/{2024-03-12 => 2024-05-14}/workspace.go (94%) rename internal/workspace/{2024-03-12 => 2024-05-14}/workspaces/workspaces.config.yaml (76%) rename internal/workspace/{2024-03-12 => 2024-05-14}/workspaces/workspaces.go (65%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9c751d..9c26bde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,6 +51,12 @@ python3 -m pip install yq --break-system-packages python3 -m pip install pycurl --break-system-packages ``` +Then update `scripts/download-orchestration-api.py` with the latest commit & api version timestamp as found at https://github.com/snyk/orchestration-service/tree/main/src/rest/resources/scans + +Then update `scripts/download-workspace-api.py` with the latest commit & api version timestamp as found at https://github.com/snyk/workspace-service/tree/main/src/rest/api/hidden/resources/workspaces + +Do a search/replace across files, if the version timestamp has changed to replace all old versions with the new version. + Then run `make tools download-apis` to download the latest code. If you want to download a new version, you can also do that. Then generate the client by running `make generate`. diff --git a/go.mod b/go.mod index d19026b..ad18629 100644 --- a/go.mod +++ b/go.mod @@ -18,41 +18,97 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect + github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect + github.com/CloudyKit/jet/v6 v6.2.0 // indirect + github.com/Joker/jade v1.1.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect + github.com/andybalholm/brotli v1.0.5 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/aymerick/douceur v0.2.0 // indirect + github.com/bytedance/sonic v1.10.0-rc3 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/fatih/structs v1.1.0 // indirect + github.com/flosch/pongo2/v4 v4.0.2 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/getkin/kin-openapi v0.118.0 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/gin-gonic/gin v1.9.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 // indirect + github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/invopop/yaml v0.2.0 // indirect + github.com/iris-contrib/schema v0.0.6 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kataras/blocks v0.0.7 // indirect + github.com/kataras/golog v0.1.9 // indirect + github.com/kataras/iris/v12 v12.2.5 // indirect + github.com/kataras/pio v0.0.12 // indirect + github.com/kataras/sitemap v0.0.6 // indirect + github.com/kataras/tunnel v0.0.4 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/labstack/echo/v4 v4.11.1 // indirect + github.com/labstack/gommon v0.4.0 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mailgun/raymond/v2 v2.0.48 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/microcosm-cc/bluemonday v1.0.26 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/sergi/go-diff v1.3.1 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/tdewolff/minify/v2 v2.12.8 // indirect + github.com/tdewolff/parse/v2 v2.6.7 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect + github.com/yosssi/ace v0.0.5 // indirect + golang.org/x/arch v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.19.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 5631e23..f502bbd 100644 --- a/go.sum +++ b/go.sum @@ -14,7 +14,16 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= 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/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= +github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= +github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -22,8 +31,12 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= +github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= @@ -33,14 +46,26 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.0-rc3 h1:uNSnscRapXTwUgTyOF0GVljYD08p9X/Lbr9MweSV3V0= +github.com/bytedance/sonic v1.10.0-rc3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= @@ -68,13 +93,22 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= +github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -97,15 +131,23 @@ github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogB github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= +github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -130,6 +172,11 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= +github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= 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= @@ -137,6 +184,7 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -150,6 +198,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ 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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -187,6 +237,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= +github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -195,16 +247,36 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= +github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= +github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= +github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= +github.com/kataras/iris/v12 v12.2.5 h1:R5UzUW4MIByBM6tKMG3UqJ7hL1JCEE+dkqQ8L72f6PU= +github.com/kataras/iris/v12 v12.2.5/go.mod h1:bf3oblPF8tQmRgyPCzPZr0mLazvEDFgImdaGZYuN4hw= +github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w= +github.com/kataras/pio v0.0.12/go.mod h1:ODK/8XBhhQ5WqrAhKy+9lTPS7sBf6O3KcLhc9klfRcY= +github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= +github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= +github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -214,22 +286,36 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= +github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= +github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= +github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= +github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= +github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58= +github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -240,12 +326,16 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -255,7 +345,10 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/pact-foundation/pact-go v1.7.0 h1:5iyVyg+avkWz9Jn7cefRmlPbXu+KMZvWblIe15v4fc8= github.com/pact-foundation/pact-go v1.7.0/go.mod h1:NcAbRqIE0cjRF+JKl2vcLlzjvrgcZrnq4SwQu2o4PeA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= @@ -289,13 +382,20 @@ github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +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/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -319,14 +419,25 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tdewolff/minify/v2 v2.12.8 h1:Q2BqOTmlMjoutkuD/OPCnJUpIqrzT3nRPkw+q+KpXS0= +github.com/tdewolff/minify/v2 v2.12.8/go.mod h1:YRgk7CC21LZnbuke2fmYnCTq+zhCgpb0yJACOTUNJ1E= +github.com/tdewolff/parse/v2 v2.6.7 h1:WrFllrqmzAcrKHzoYgMupqgUBIfBVOb0yscFzDf8bBg= +github.com/tdewolff/parse/v2 v2.6.7/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= +github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= @@ -334,10 +445,22 @@ github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLY github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= +github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -345,6 +468,9 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= +golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -379,6 +505,7 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= @@ -392,6 +519,7 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r 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-20190327091125-710a502c58a2/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= @@ -399,6 +527,7 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= @@ -440,7 +569,10 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -473,6 +605,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -493,6 +627,7 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/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.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= @@ -534,14 +669,20 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -553,6 +694,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -562,4 +704,6 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh 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= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index 30da1cb..c4d1611 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -25,7 +25,6 @@ import ( "io" "net/http" "strings" - "time" "github.com/google/uuid" @@ -37,8 +36,8 @@ import ( codeClientHTTP "github.com/snyk/code-client-go/http" orchestrationClient "github.com/snyk/code-client-go/internal/orchestration/2024-02-16" scans "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" - workspaceClient "github.com/snyk/code-client-go/internal/workspace/2024-03-12" - workspaces "github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces" + workspaceClient "github.com/snyk/code-client-go/internal/workspace/2024-05-14" + workspaces "github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces" "github.com/snyk/code-client-go/observability" "github.com/snyk/code-client-go/sarif" "github.com/snyk/code-client-go/scan" @@ -128,7 +127,7 @@ func (a *analysisOrchestrator) CreateWorkspace(ctx context.Context, orgId string } workspaceResponse, err := workspace.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx, orgUUID, &workspaceClient.CreateWorkspaceParams{ - Version: "2024-03-12~experimental", + Version: "2024-05-14~experimental", SnykRequestId: uuid.MustParse(requestId), ContentType: "application/vnd.api+json", UserAgent: "cli", @@ -137,6 +136,7 @@ func (a *analysisOrchestrator) CreateWorkspace(ctx context.Context, orgId string Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } `json:"attributes"` Type workspaces.WorkspacePostRequestDataType `json:"type"` @@ -144,16 +144,19 @@ func (a *analysisOrchestrator) CreateWorkspace(ctx context.Context, orgId string Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } Type workspaces.WorkspacePostRequestDataType }{Attributes: struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` }(struct { BundleId string RepositoryUri string + RootFolderId string WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType }{ BundleId: bundleHash, @@ -225,41 +228,59 @@ func (a *analysisOrchestrator) RunAnalysis(ctx context.Context, orgId string, ro func (a *analysisOrchestrator) triggerScan(ctx context.Context, client *orchestrationClient.ClientWithResponses, org uuid.UUID, workspaceId string) (*openapi_types.UUID, error) { flow := scans.Flow{} - err := flow.UnmarshalJSON([]byte(`{"name": "cli_test"}`)) + err := flow.UnmarshalJSON([]byte(`{"name": "ide"}`)) if err != nil { return nil, fmt.Errorf("failed to create scan request: %w", err) } + + workspaceUUID := uuid.MustParse(workspaceId) + + data := struct { + Attributes struct { + Flow scans.Flow `json:"flow"` + + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. + WorkspaceUrl string `json:"workspace_url"` + } `json:"attributes"` + Id *openapi_types.UUID `json:"id,omitempty"` + Type scans.PostScanRequestDataType `json:"type"` + }{ + Attributes: struct { + Flow scans.Flow `json:"flow"` + + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. + WorkspaceUrl string `json:"workspace_url"` + }{ + Flow: flow, + WorkspaceId: &workspaceUUID, + WorkspaceUrl: fmt.Sprintf("http://workspace-service/workspaces/%s", workspaceId), + }, + Type: "workspace", + } + createScanResponse, err := client.CreateScanWorkspaceJobForUserWithApplicationVndAPIPlusJSONBodyWithResponse( ctx, org, &orchestrationClient.CreateScanWorkspaceJobForUserParams{Version: "2024-02-16~experimental"}, - orchestrationClient.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: struct { - Attributes struct { - Flow scans.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } `json:"attributes"` - Id *openapi_types.UUID `json:"id,omitempty"` - Type scans.PostScanRequestDataType `json:"type"` - }(struct { - Attributes struct { - Flow scans.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } - Id *openapi_types.UUID - Type scans.PostScanRequestDataType - }{ - Attributes: struct { - Flow scans.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - }(struct { - Flow scans.Flow - WorkspaceUrl string - }{ - Flow: flow, - WorkspaceUrl: fmt.Sprintf("http://workspace-service/workspaces/%s", workspaceId), - }), - Type: "workspace", - })}) + orchestrationClient.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: data}) if err != nil { return nil, fmt.Errorf("failed to trigger scan: %w", err) diff --git a/internal/analysis/analysis_test.go b/internal/analysis/analysis_test.go index 803be7e..d8bbc3d 100644 --- a/internal/analysis/analysis_test.go +++ b/internal/analysis/analysis_test.go @@ -74,7 +74,7 @@ func TestAnalysis_CreateWorkspace(t *testing.T) { mockHTTPClient.EXPECT().Do( mock.MatchedBy(func(i interface{}) bool { req := i.(*http.Request) - return req.URL.String() == "http://localhost/hidden/orgs/4a72d1db-b465-4764-99e1-ecedad03b06a/workspaces?version=2024-03-12~experimental" && + return req.URL.String() == "http://localhost/hidden/orgs/4a72d1db-b465-4764-99e1-ecedad03b06a/workspaces?version=2024-05-14~experimental" && req.Method == "POST" && req.Header.Get("Content-Type") == "application/vnd.api+json" && req.Header.Get("Snyk-Request-Id") == "b372d1db-b465-4764-99e1-ecedad03b06a" && @@ -132,7 +132,7 @@ func TestAnalysis_CreateWorkspace_Failure(t *testing.T) { mockHTTPClient.EXPECT().Do( mock.MatchedBy(func(i interface{}) bool { req := i.(*http.Request) - return req.URL.String() == "http://localhost/hidden/orgs/4a72d1db-b465-4764-99e1-ecedad03b06a/workspaces?version=2024-03-12~experimental" && + return req.URL.String() == "http://localhost/hidden/orgs/4a72d1db-b465-4764-99e1-ecedad03b06a/workspaces?version=2024-05-14~experimental" && req.Method == "POST" && req.Header.Get("Content-Type") == "application/vnd.api+json" && req.Header.Get("Snyk-Request-Id") == "b372d1db-b465-4764-99e1-ecedad03b06a" && @@ -202,7 +202,7 @@ func TestAnalysis_CreateWorkspace_KnownErrors(t *testing.T) { mockHTTPClient := httpmocks.NewMockHTTPClient(ctrl) mockHTTPClient.EXPECT().Do(mock.MatchedBy(func(i interface{}) bool { req := i.(*http.Request) - return req.URL.String() == "http://localhost/hidden/orgs/4a72d1db-b465-4764-99e1-ecedad03b06a/workspaces?version=2024-03-12~experimental" && + return req.URL.String() == "http://localhost/hidden/orgs/4a72d1db-b465-4764-99e1-ecedad03b06a/workspaces?version=2024-05-14~experimental" && req.Method == "POST" })).Times(1).Return(&http.Response{ StatusCode: tc.expectedStatus, diff --git a/internal/orchestration/2024-02-16/client.go b/internal/orchestration/2024-02-16/client.go index e890f7f..b75250e 100644 --- a/internal/orchestration/2024-02-16/client.go +++ b/internal/orchestration/2024-02-16/client.go @@ -1,6 +1,6 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. package v20240216 import ( @@ -13,7 +13,7 @@ import ( "net/url" "strings" - "github.com/oapi-codegen/runtime" + "github.com/deepmap/oapi-codegen/pkg/runtime" externalRef0 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/common" externalRef1 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/parameters" externalRef2 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" @@ -35,6 +35,12 @@ type GetScanWorkspaceJobInternalParams struct { Version externalRef0.Version `form:"version" json:"version"` } +// CreateFindingsUrlParams defines parameters for CreateFindingsUrl. +type CreateFindingsUrlParams struct { + // Version The requested version of the endpoint to process the request + Version externalRef0.Version `form:"version" json:"version"` +} + // CreateScanWorkspaceJobForUserParams defines parameters for CreateScanWorkspaceJobForUser. type CreateScanWorkspaceJobForUserParams struct { // Version The requested version of the endpoint to process the request @@ -48,7 +54,10 @@ type GetScanWorkspaceJobForUserParams struct { } // CreateScanWorkspaceJobInternalApplicationVndAPIPlusJSONRequestBody defines body for CreateScanWorkspaceJobInternal for application/vnd.api+json ContentType. -type CreateScanWorkspaceJobInternalApplicationVndAPIPlusJSONRequestBody = externalRef2.PostScanRequest +type CreateScanWorkspaceJobInternalApplicationVndAPIPlusJSONRequestBody = externalRef2.PostScanRequestWithUser + +// CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody defines body for CreateFindingsUrl for application/vnd.api+json ContentType. +type CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody = externalRef2.PostFindingsUrlRequest // CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody defines body for CreateScanWorkspaceJobForUser for application/vnd.api+json ContentType. type CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody = externalRef2.PostScanRequest @@ -134,6 +143,11 @@ type ClientInterface interface { // GetScanWorkspaceJobInternal request GetScanWorkspaceJobInternal(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *GetScanWorkspaceJobInternalParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateFindingsUrlWithBody request with any body + CreateFindingsUrlWithBody(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateFindingsUrlWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, body CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateScanWorkspaceJobForUserWithBody request with any body CreateScanWorkspaceJobForUserWithBody(ctx context.Context, orgId externalRef1.OrgId, params *CreateScanWorkspaceJobForUserParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -179,6 +193,30 @@ func (c *Client) GetScanWorkspaceJobInternal(ctx context.Context, orgId external return c.Client.Do(req) } +func (c *Client) CreateFindingsUrlWithBody(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateFindingsUrlRequestWithBody(c.Server, orgId, scanjobId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateFindingsUrlWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, body CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateFindingsUrlRequestWithApplicationVndAPIPlusJSONBody(c.Server, orgId, scanjobId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateScanWorkspaceJobForUserWithBody(ctx context.Context, orgId externalRef1.OrgId, params *CreateScanWorkspaceJobForUserParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateScanWorkspaceJobForUserRequestWithBody(c.Server, orgId, params, contentType, body) if err != nil { @@ -339,6 +377,78 @@ func NewGetScanWorkspaceJobInternalRequest(server string, orgId externalRef1.Org return req, nil } +// NewCreateFindingsUrlRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateFindingsUrl builder with application/vnd.api+json body +func NewCreateFindingsUrlRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, body CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateFindingsUrlRequestWithBody(server, orgId, scanjobId, params, "application/vnd.api+json", bodyReader) +} + +// NewCreateFindingsUrlRequestWithBody generates requests for CreateFindingsUrl with any type of body +func NewCreateFindingsUrlRequestWithBody(server string, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "org_id", runtime.ParamLocationPath, orgId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "scanjob_id", runtime.ParamLocationPath, scanjobId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/internal/orgs/%s/scans/%s/findings_url", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, params.Version); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewCreateScanWorkspaceJobForUserRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateScanWorkspaceJobForUser builder with application/vnd.api+json body func NewCreateScanWorkspaceJobForUserRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef1.OrgId, params *CreateScanWorkspaceJobForUserParams, body CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -514,6 +624,11 @@ type ClientWithResponsesInterface interface { // GetScanWorkspaceJobInternalWithResponse request GetScanWorkspaceJobInternalWithResponse(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *GetScanWorkspaceJobInternalParams, reqEditors ...RequestEditorFn) (*GetScanWorkspaceJobInternalResponse, error) + // CreateFindingsUrlWithBodyWithResponse request with any body + CreateFindingsUrlWithBodyWithResponse(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFindingsUrlResponse, error) + + CreateFindingsUrlWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, body CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFindingsUrlResponse, error) + // CreateScanWorkspaceJobForUserWithBodyWithResponse request with any body CreateScanWorkspaceJobForUserWithBodyWithResponse(ctx context.Context, orgId externalRef1.OrgId, params *CreateScanWorkspaceJobForUserParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateScanWorkspaceJobForUserResponse, error) @@ -531,6 +646,7 @@ type CreateScanWorkspaceJobInternalResponse struct { ApplicationvndApiJSON401 *externalRef0.N401 ApplicationvndApiJSON403 *externalRef0.N403 ApplicationvndApiJSON404 *externalRef0.N404 + ApplicationvndApiJSON409 *externalRef0.N409 ApplicationvndApiJSON429 *externalRef0.ErrorDocument ApplicationvndApiJSON500 *externalRef0.N500 } @@ -579,6 +695,35 @@ func (r GetScanWorkspaceJobInternalResponse) StatusCode() int { return 0 } +type CreateFindingsUrlResponse struct { + Body []byte + HTTPResponse *http.Response + ApplicationvndApiJSON201 *externalRef2.PostFindingsUrlResponse + ApplicationvndApiJSON400 *externalRef0.N400 + ApplicationvndApiJSON401 *externalRef0.N401 + ApplicationvndApiJSON403 *externalRef0.N403 + ApplicationvndApiJSON404 *externalRef0.N404 + ApplicationvndApiJSON409 *externalRef0.N409 + ApplicationvndApiJSON429 *externalRef0.ErrorDocument + ApplicationvndApiJSON500 *externalRef0.N500 +} + +// Status returns HTTPResponse.Status +func (r CreateFindingsUrlResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateFindingsUrlResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreateScanWorkspaceJobForUserResponse struct { Body []byte HTTPResponse *http.Response @@ -587,6 +732,7 @@ type CreateScanWorkspaceJobForUserResponse struct { ApplicationvndApiJSON401 *externalRef0.N401 ApplicationvndApiJSON403 *externalRef0.N403 ApplicationvndApiJSON404 *externalRef0.N404 + ApplicationvndApiJSON409 *externalRef0.N409 ApplicationvndApiJSON429 *externalRef0.ErrorDocument ApplicationvndApiJSON500 *externalRef0.N500 } @@ -661,6 +807,23 @@ func (c *ClientWithResponses) GetScanWorkspaceJobInternalWithResponse(ctx contex return ParseGetScanWorkspaceJobInternalResponse(rsp) } +// CreateFindingsUrlWithBodyWithResponse request with arbitrary body returning *CreateFindingsUrlResponse +func (c *ClientWithResponses) CreateFindingsUrlWithBodyWithResponse(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFindingsUrlResponse, error) { + rsp, err := c.CreateFindingsUrlWithBody(ctx, orgId, scanjobId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateFindingsUrlResponse(rsp) +} + +func (c *ClientWithResponses) CreateFindingsUrlWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef1.OrgId, scanjobId externalRef1.ScanJobId, params *CreateFindingsUrlParams, body CreateFindingsUrlApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFindingsUrlResponse, error) { + rsp, err := c.CreateFindingsUrlWithApplicationVndAPIPlusJSONBody(ctx, orgId, scanjobId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateFindingsUrlResponse(rsp) +} + // CreateScanWorkspaceJobForUserWithBodyWithResponse request with arbitrary body returning *CreateScanWorkspaceJobForUserResponse func (c *ClientWithResponses) CreateScanWorkspaceJobForUserWithBodyWithResponse(ctx context.Context, orgId externalRef1.OrgId, params *CreateScanWorkspaceJobForUserParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateScanWorkspaceJobForUserResponse, error) { rsp, err := c.CreateScanWorkspaceJobForUserWithBody(ctx, orgId, params, contentType, body, reqEditors...) @@ -736,6 +899,13 @@ func ParseCreateScanWorkspaceJobInternalResponse(rsp *http.Response) (*CreateSca } response.ApplicationvndApiJSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest externalRef0.N409 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: var dest externalRef0.ErrorDocument if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -823,6 +993,81 @@ func ParseGetScanWorkspaceJobInternalResponse(rsp *http.Response) (*GetScanWorks return response, nil } +// ParseCreateFindingsUrlResponse parses an HTTP response from a CreateFindingsUrlWithResponse call +func ParseCreateFindingsUrlResponse(rsp *http.Response) (*CreateFindingsUrlResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateFindingsUrlResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest externalRef2.PostFindingsUrlResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest externalRef0.N400 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest externalRef0.N401 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest externalRef0.N403 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest externalRef0.N404 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest externalRef0.N409 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest externalRef0.ErrorDocument + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest externalRef0.N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON500 = &dest + + } + + return response, nil +} + // ParseCreateScanWorkspaceJobForUserResponse parses an HTTP response from a CreateScanWorkspaceJobForUserWithResponse call func ParseCreateScanWorkspaceJobForUserResponse(rsp *http.Response) (*CreateScanWorkspaceJobForUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -872,6 +1117,13 @@ func ParseCreateScanWorkspaceJobForUserResponse(rsp *http.Response) (*CreateScan } response.ApplicationvndApiJSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest externalRef0.N409 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: var dest externalRef0.ErrorDocument if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/internal/orchestration/2024-02-16/client_test.go b/internal/orchestration/2024-02-16/client_test.go index 28ec403..433468f 100644 --- a/internal/orchestration/2024-02-16/client_test.go +++ b/internal/orchestration/2024-02-16/client_test.go @@ -4,12 +4,14 @@ import ( "bytes" "context" "errors" - openapi_types "github.com/oapi-codegen/runtime/types" - externalRef2 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" "io" "net/http" "testing" + openapi_types "github.com/oapi-codegen/runtime/types" + + scans "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" + "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -71,29 +73,26 @@ func TestOrchestration_CreateScanWorkspaceJobForUserWithApplicationVndAPIPlusJSO &orchestrationClient.CreateScanWorkspaceJobForUserParams{Version: "2024-02-16~experimental"}, orchestrationClient.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: struct { Attributes struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` + Flow scans.Flow `json:"flow"` + + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. + WorkspaceUrl string `json:"workspace_url"` } `json:"attributes"` - Id *openapi_types.UUID `json:"id,omitempty"` - Type externalRef2.PostScanRequestDataType `json:"type"` - }(struct { - Attributes struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } - Id *openapi_types.UUID - Type externalRef2.PostScanRequestDataType + Id *openapi_types.UUID `json:"id,omitempty"` + Type scans.PostScanRequestDataType `json:"type"` }{ - Attributes: struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - }(struct { - Flow externalRef2.Flow - WorkspaceUrl string - }{}), Id: &id, Type: "cli", - })}) + }}) require.NoError(t, err) require.NotNil(t, response) require.Equal(t, 201, response.StatusCode()) @@ -131,29 +130,25 @@ func TestOrchestration_CreateScanWorkspaceJobForUserWithApplicationVndAPIPlusJSO &orchestrationClient.CreateScanWorkspaceJobForUserParams{Version: "2024-02-16~experimental"}, orchestrationClient.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: struct { Attributes struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` + Flow scans.Flow `json:"flow"` + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. + WorkspaceUrl string `json:"workspace_url"` } `json:"attributes"` - Id *openapi_types.UUID `json:"id,omitempty"` - Type externalRef2.PostScanRequestDataType `json:"type"` - }(struct { - Attributes struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } - Id *openapi_types.UUID - Type externalRef2.PostScanRequestDataType + Id *openapi_types.UUID `json:"id,omitempty"` + Type scans.PostScanRequestDataType `json:"type"` }{ - Attributes: struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - }(struct { - Flow externalRef2.Flow - WorkspaceUrl string - }{}), Id: &id, Type: "cli", - })}) + }}) require.NoError(t, err) require.NotNil(t, response) require.Equal(t, http.StatusNotFound, response.StatusCode()) @@ -179,29 +174,26 @@ func TestOrchestration_CreateScanWorkspaceJobForUserWithApplicationVndAPIPlusJSO &orchestrationClient.CreateScanWorkspaceJobForUserParams{Version: "2024-02-16~experimental"}, orchestrationClient.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: struct { Attributes struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` + Flow scans.Flow `json:"flow"` + + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. + WorkspaceUrl string `json:"workspace_url"` } `json:"attributes"` - Id *openapi_types.UUID `json:"id,omitempty"` - Type externalRef2.PostScanRequestDataType `json:"type"` - }(struct { - Attributes struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } - Id *openapi_types.UUID - Type externalRef2.PostScanRequestDataType + Id *openapi_types.UUID `json:"id,omitempty"` + Type scans.PostScanRequestDataType `json:"type"` }{ - Attributes: struct { - Flow externalRef2.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - }(struct { - Flow externalRef2.Flow - WorkspaceUrl string - }{}), Id: &id, Type: "cli", - })}) + }}) require.Error(t, err) doer.AssertExpectations(t) } @@ -251,7 +243,7 @@ func TestOrchestration_GetScanWorkspaceJobForUserWithResponse_Success(t *testing require.NoError(t, err) require.NotNil(t, response) require.Equal(t, http.StatusOK, response.StatusCode()) - require.Equal(t, externalRef2.ScanJobResultsAttributesStatusInProgress, response.ApplicationvndApiJSON200.Data.Attributes.Status) + require.Equal(t, scans.ScanJobResultsAttributesStatusInProgress, response.ApplicationvndApiJSON200.Data.Attributes.Status) doer.AssertExpectations(t) } diff --git a/internal/orchestration/2024-02-16/common/common.go b/internal/orchestration/2024-02-16/common/common.go index 7e3fcc9..49cd43f 100644 --- a/internal/orchestration/2024-02-16/common/common.go +++ b/internal/orchestration/2024-02-16/common/common.go @@ -1,13 +1,13 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. package v20240216 import ( "encoding/json" - "github.com/oapi-codegen/runtime" - openapi_types "github.com/oapi-codegen/runtime/types" + "github.com/deepmap/oapi-codegen/pkg/runtime" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) // Defines values for MetaCount. diff --git a/internal/orchestration/2024-02-16/parameters/orgs.go b/internal/orchestration/2024-02-16/parameters/orgs.go index 5d3d37f..0b982c1 100644 --- a/internal/orchestration/2024-02-16/parameters/orgs.go +++ b/internal/orchestration/2024-02-16/parameters/orgs.go @@ -1,10 +1,10 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. package v20240216 import ( - openapi_types "github.com/oapi-codegen/runtime/types" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) // OrgId defines model for OrgId. diff --git a/internal/orchestration/2024-02-16/parameters/scans.go b/internal/orchestration/2024-02-16/parameters/scans.go index fbb77e6..39b6af3 100644 --- a/internal/orchestration/2024-02-16/parameters/scans.go +++ b/internal/orchestration/2024-02-16/parameters/scans.go @@ -1,10 +1,10 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. package v20240216 import ( - openapi_types "github.com/oapi-codegen/runtime/types" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) // ScanJobId defines model for ScanJobId. diff --git a/internal/orchestration/2024-02-16/scans/scans.config.yaml b/internal/orchestration/2024-02-16/scans/scans.config.yaml index 0a5f862..d0c824a 100644 --- a/internal/orchestration/2024-02-16/scans/scans.config.yaml +++ b/internal/orchestration/2024-02-16/scans/scans.config.yaml @@ -4,5 +4,5 @@ generate: output-options: skip-prune: true import-mapping: - ../common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/common + ../common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/common output: scans/scans.go \ No newline at end of file diff --git a/internal/orchestration/2024-02-16/scans/scans.go b/internal/orchestration/2024-02-16/scans/scans.go index b00f648..5928969 100644 --- a/internal/orchestration/2024-02-16/scans/scans.go +++ b/internal/orchestration/2024-02-16/scans/scans.go @@ -1,6 +1,6 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. package v20240216 import ( @@ -8,9 +8,9 @@ import ( "errors" "time" - "github.com/oapi-codegen/runtime" - openapi_types "github.com/oapi-codegen/runtime/types" - externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/common" + "github.com/deepmap/oapi-codegen/pkg/runtime" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/common" ) // Defines values for CliTestFlowName. @@ -18,14 +18,34 @@ const ( CliTest CliTestFlowName = "cli_test" ) +// Defines values for FindingsUrlType. +const ( + FindingsUrlTypeFindingsUrl FindingsUrlType = "findings_url" +) + +// Defines values for IdeTestFlowName. +const ( + IdeTest IdeTestFlowName = "ide_test" +) + // Defines values for MonitorFlowName. const ( Monitor MonitorFlowName = "monitor" ) +// Defines values for PostFindingsUrlRequestDataType. +const ( + PostFindingsUrlRequestDataTypeFindingsUrl PostFindingsUrlRequestDataType = "findings_url" +) + // Defines values for PostScanRequestDataType. const ( - Workspace PostScanRequestDataType = "workspace" + PostScanRequestDataTypeWorkspace PostScanRequestDataType = "workspace" +) + +// Defines values for PostScanRequestWithUserDataType. +const ( + PostScanRequestWithUserDataTypeWorkspace PostScanRequestWithUserDataType = "workspace" ) // Defines values for ScanJobType. @@ -67,7 +87,8 @@ type CliTestFlow struct { // CliTestFlowName The flow which the scan is triggered for. type CliTestFlowName string -// Component defines model for Component. +// Component A component identifies a subset of the given repository (a file, a bunch of files, the entire repo, or perhaps a fragment of a file) that may contain findings attached to it. +// E.g. server/package.json for SCA or a java repository for SAST type Component struct { // CreatedAt Point in time in which this component was created CreatedAt time.Time `json:"created_at"` @@ -85,11 +106,33 @@ type Component struct { Type string `json:"type"` } +// FindingsUrl defines model for FindingsUrl. +type FindingsUrl struct { + Attributes struct { + // Url A GET-able self-signed URL with a short TTL to retrieve findings + Url string `json:"url"` + } `json:"attributes"` + Id openapi_types.UUID `json:"id"` + Type FindingsUrlType `json:"type"` +} + +// FindingsUrlType defines model for FindingsUrl.Type. +type FindingsUrlType string + // Flow defines model for Flow. type Flow struct { union json.RawMessage } +// IdeTestFlow defines model for IdeTestFlow. +type IdeTestFlow struct { + // Name The flow which the scan is triggered for. + Name IdeTestFlowName `json:"name"` +} + +// IdeTestFlowName The flow which the scan is triggered for. +type IdeTestFlowName string + // LegacyFlowProperties defines model for LegacyFlowProperties. type LegacyFlowProperties struct { ImportId openapi_types.UUID `json:"import_id"` @@ -109,12 +152,46 @@ type MonitorFlow struct { // MonitorFlowName The flow which the scan is triggered for. type MonitorFlowName string +// PostFindingsUrlRequest defines model for PostFindingsUrlRequest. +type PostFindingsUrlRequest struct { + Data struct { + Attributes struct { + // ComponentId ID of this component as provided by the scanner + ComponentId string `json:"component_id"` + + // ScannerName Name of the scanner which reports findings + ScannerName string `json:"scanner_name"` + } `json:"attributes"` + Id *openapi_types.UUID `json:"id,omitempty"` + Type PostFindingsUrlRequestDataType `json:"type"` + } `json:"data"` +} + +// PostFindingsUrlRequestDataType defines model for PostFindingsUrlRequest.Data.Type. +type PostFindingsUrlRequestDataType string + +// PostFindingsUrlResponse defines model for PostFindingsUrlResponse. +type PostFindingsUrlResponse struct { + Data FindingsUrl `json:"data"` + Jsonapi *externalRef0.JsonApi `json:"jsonapi,omitempty"` + Links *externalRef0.SelfLink `json:"links,omitempty"` +} + // PostScanRequest defines model for PostScanRequest. type PostScanRequest struct { Data struct { Attributes struct { Flow Flow `json:"flow"` + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. WorkspaceUrl string `json:"workspace_url"` } `json:"attributes"` @@ -126,6 +203,35 @@ type PostScanRequest struct { // PostScanRequestDataType defines model for PostScanRequest.Data.Type. type PostScanRequestDataType string +// PostScanRequestWithUser defines model for PostScanRequestWithUser. +type PostScanRequestWithUser struct { + Data struct { + Attributes struct { + Flow Flow `json:"flow"` + + // ScanOptions Additional options for the scan + ScanOptions *struct { + // LimitScanToFiles The findings will be limited to a subset of files only. + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + + // UserId Snyk user id who initiates the scan + UserId *openapi_types.UUID `json:"user_id,omitempty"` + + // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + + // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. + WorkspaceUrl string `json:"workspace_url"` + } `json:"attributes"` + Id *openapi_types.UUID `json:"id,omitempty"` + Type PostScanRequestWithUserDataType `json:"type"` + } `json:"data"` +} + +// PostScanRequestWithUserDataType defines model for PostScanRequestWithUser.Data.Type. +type PostScanRequestWithUserDataType string + // ScanJob defines model for ScanJob. type ScanJob struct { Attributes ScanJobBasicAttributes `json:"attributes"` @@ -143,6 +249,9 @@ type ScanJobBasicAttributes struct { // Status Defines the completion status of this job. The job is considered finished when: - the status is `done` meaning it successfully completed, although some product lines might have reported errors, or timed out - the status is `failed` meaning it prematurely failed to complete and no product line got a chance to report - the status is `timeout` when the overall job did not manage to complete on time The job is considered in progress when: - the status is either `queued` meaning it hasn't been picked up yet by the orchestrator - the status is `in_progress` meaning it has been picked up by the orchestrator but product lines are still scanning Status ScanJobBasicAttributesStatus `json:"status"` + + // UserId Snyk user id who initiates the scan + UserId *openapi_types.UUID `json:"user_id,omitempty"` } // ScanJobBasicAttributesStatus Defines the completion status of this job. The job is considered finished when: - the status is `done` meaning it successfully completed, although some product lines might have reported errors, or timed out - the status is `failed` meaning it prematurely failed to complete and no product line got a chance to report - the status is `timeout` when the overall job did not manage to complete on time The job is considered in progress when: - the status is either `queued` meaning it hasn't been picked up yet by the orchestrator - the status is `in_progress` meaning it has been picked up by the orchestrator but product lines are still scanning @@ -151,6 +260,8 @@ type ScanJobBasicAttributesStatus string // ScanJobResults defines model for ScanJobResults. type ScanJobResults struct { Attributes struct { + // Components A list of software components identified during the scan as well as related findings associated to it. + // E.g. if a Git repository contains 2 NPM projects and javascript code server/package.json and client/package.json, assuming we have SCA and SAST enabled the scan might come back with the following components: - SCA scan: server/package.json - SCA scan: client/package.json - SAST scan: all the code in the repository Components []Component `json:"components"` // CreatedAt Point in time in which this job was created @@ -239,6 +350,34 @@ func (t *Flow) MergeCliTestFlow(v CliTestFlow) error { return err } +// AsIdeTestFlow returns the union data inside the Flow as a IdeTestFlow +func (t Flow) AsIdeTestFlow() (IdeTestFlow, error) { + var body IdeTestFlow + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIdeTestFlow overwrites any union data inside the Flow as the provided IdeTestFlow +func (t *Flow) FromIdeTestFlow(v IdeTestFlow) error { + v.Name = "IdeTestFlow" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIdeTestFlow performs a merge with any union data inside the Flow, using the provided IdeTestFlow +func (t *Flow) MergeIdeTestFlow(v IdeTestFlow) error { + v.Name = "IdeTestFlow" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + func (t Flow) Discriminator() (string, error) { var discriminator struct { Discriminator string `json:"name"` @@ -255,6 +394,8 @@ func (t Flow) ValueByDiscriminator() (interface{}, error) { switch discriminator { case "CliTestFlow": return t.AsCliTestFlow() + case "IdeTestFlow": + return t.AsIdeTestFlow() case "MonitorFlow": return t.AsMonitorFlow() default: diff --git a/internal/workspace/2024-03-12/client.go b/internal/workspace/2024-03-12/client.go deleted file mode 100644 index dccc05f..0000000 --- a/internal/workspace/2024-03-12/client.go +++ /dev/null @@ -1,395 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/oapi-codegen/runtime" - externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/common" - externalRef2 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters" - externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces" -) - -const ( - BearerAuthScopes = "bearerAuth.Scopes" -) - -// Defines values for CreateWorkspaceParamsContentType. -const ( - ApplicationvndApiJson CreateWorkspaceParamsContentType = "application/vnd.api+json" -) - -// CreateWorkspaceParams defines parameters for CreateWorkspace. -type CreateWorkspaceParams struct { - // Version The requested version of the endpoint to process the request - Version externalRef0.Version `form:"version" json:"version"` - - // SnykRequestId Request ID - SnykRequestId externalRef2.RequestId `json:"snyk-request-id"` - - // UserAgent The client that sent the request, as per RFC 7231. - UserAgent externalRef2.UserAgent `json:"user-agent"` - - // ContentType Content type header - ContentType CreateWorkspaceParamsContentType `json:"content-type"` -} - -// CreateWorkspaceParamsContentType defines parameters for CreateWorkspace. -type CreateWorkspaceParamsContentType string - -// CreateWorkspaceApplicationVndAPIPlusJSONRequestBody defines body for CreateWorkspace for application/vnd.api+json ContentType. -type CreateWorkspaceApplicationVndAPIPlusJSONRequestBody = externalRef3.WorkspacePostRequest - -// RequestEditorFn is the function signature for the RequestEditor callback function -type RequestEditorFn func(ctx context.Context, req *http.Request) error - -// Doer performs HTTP requests. -// -// The standard http.Client implements this interface. -type HttpRequestDoer interface { - Do(req *http.Request) (*http.Response, error) -} - -// Client which conforms to the OpenAPI3 specification for this service. -type Client struct { - // The endpoint of the server conforming to this interface, with scheme, - // https://api.deepmap.com for example. This can contain a path relative - // to the server, such as https://api.deepmap.com/dev-test, and all the - // paths in the swagger spec will be appended to the server. - Server string - - // Doer for performing requests, typically a *http.Client with any - // customized settings, such as certificate chains. - Client HttpRequestDoer - - // A list of callbacks for modifying requests which are generated before sending over - // the network. - RequestEditors []RequestEditorFn -} - -// ClientOption allows setting custom parameters during construction -type ClientOption func(*Client) error - -// Creates a new Client, with reasonable defaults -func NewClient(server string, opts ...ClientOption) (*Client, error) { - // create a client with sane default values - client := Client{ - Server: server, - } - // mutate client and add all optional params - for _, o := range opts { - if err := o(&client); err != nil { - return nil, err - } - } - // ensure the server URL always has a trailing slash - if !strings.HasSuffix(client.Server, "/") { - client.Server += "/" - } - // create httpClient, if not already present - if client.Client == nil { - client.Client = &http.Client{} - } - return &client, nil -} - -// WithHTTPClient allows overriding the default Doer, which is -// automatically created using http.Client. This is useful for tests. -func WithHTTPClient(doer HttpRequestDoer) ClientOption { - return func(c *Client) error { - c.Client = doer - return nil - } -} - -// WithRequestEditorFn allows setting up a callback function, which will be -// called right before sending the request. This can be used to mutate the request. -func WithRequestEditorFn(fn RequestEditorFn) ClientOption { - return func(c *Client) error { - c.RequestEditors = append(c.RequestEditors, fn) - return nil - } -} - -// The interface specification for the client above. -type ClientInterface interface { - // CreateWorkspaceWithBody request with any body - CreateWorkspaceWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) -} - -func (c *Client) CreateWorkspaceWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateWorkspaceRequestWithBody(c.Server, orgId, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody(c.Server, orgId, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateWorkspace builder with application/vnd.api+json body -func NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateWorkspaceRequestWithBody(server, orgId, params, "application/vnd.api+json", bodyReader) -} - -// NewCreateWorkspaceRequestWithBody generates requests for CreateWorkspace with any type of body -func NewCreateWorkspaceRequestWithBody(server string, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "org_id", runtime.ParamLocationPath, orgId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/orgs/%s/workspaces", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, params.Version); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "snyk-request-id", runtime.ParamLocationHeader, params.SnykRequestId) - if err != nil { - return nil, err - } - - req.Header.Set("snyk-request-id", headerParam0) - - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "user-agent", runtime.ParamLocationHeader, params.UserAgent) - if err != nil { - return nil, err - } - - req.Header.Set("user-agent", headerParam1) - - var headerParam2 string - - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "content-type", runtime.ParamLocationHeader, params.ContentType) - if err != nil { - return nil, err - } - - req.Header.Set("content-type", headerParam2) - - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // CreateWorkspaceWithBodyWithResponse request with any body - CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) - - CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) -} - -type CreateWorkspaceResponse struct { - Body []byte - HTTPResponse *http.Response - ApplicationvndApiJSON201 *externalRef3.WorkspacePostResponse - ApplicationvndApiJSON400 *externalRef0.N400 - ApplicationvndApiJSON401 *externalRef0.N401 - ApplicationvndApiJSON403 *externalRef0.N403 - ApplicationvndApiJSON500 *externalRef0.N500 -} - -// Status returns HTTPResponse.Status -func (r CreateWorkspaceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateWorkspaceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// CreateWorkspaceWithBodyWithResponse request with arbitrary body returning *CreateWorkspaceResponse -func (c *ClientWithResponses) CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) { - rsp, err := c.CreateWorkspaceWithBody(ctx, orgId, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateWorkspaceResponse(rsp) -} - -func (c *ClientWithResponses) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) { - rsp, err := c.CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx, orgId, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateWorkspaceResponse(rsp) -} - -// ParseCreateWorkspaceResponse parses an HTTP response from a CreateWorkspaceWithResponse call -func ParseCreateWorkspaceResponse(rsp *http.Response) (*CreateWorkspaceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateWorkspaceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest externalRef3.WorkspacePostResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndApiJSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest externalRef0.N400 - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndApiJSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest externalRef0.N401 - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndApiJSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest externalRef0.N403 - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndApiJSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest externalRef0.N500 - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationvndApiJSON500 = &dest - - } - - return response, nil -} diff --git a/internal/workspace/2024-03-12/common/common.go b/internal/workspace/2024-03-12/common/common.go deleted file mode 100644 index 280d716..0000000 --- a/internal/workspace/2024-03-12/common/common.go +++ /dev/null @@ -1,239 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -import ( - "encoding/json" - - "github.com/oapi-codegen/runtime" - openapi_types "github.com/oapi-codegen/runtime/types" -) - -// Defines values for MetaCount. -const ( - Only MetaCount = "only" - With MetaCount = "with" -) - -// ActualVersion Resolved API version -type ActualVersion = string - -// Error defines model for Error. -type Error struct { - // Code An application-specific error code, expressed as a string value. - Code *string `json:"code,omitempty"` - - // Detail A human-readable explanation specific to this occurrence of the problem. - Detail string `json:"detail"` - - // Id A unique identifier for this particular occurrence of the problem. - Id *openapi_types.UUID `json:"id,omitempty"` - - // Links A link that leads to further details about this particular occurrance of the problem. - Links *ErrorLink `json:"links,omitempty"` - Meta *map[string]interface{} `json:"meta,omitempty"` - Source *struct { - // Parameter A string indicating which URI query parameter caused the error. - Parameter *string `json:"parameter,omitempty"` - - // Pointer A JSON Pointer [RFC6901] to the associated entity in the request document. - Pointer *string `json:"pointer,omitempty"` - } `json:"source,omitempty"` - - // Status The HTTP status code applicable to this problem, expressed as a string value. - Status string `json:"status"` - - // Title A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - Title *string `json:"title,omitempty"` -} - -// ErrorDocument defines model for ErrorDocument. -type ErrorDocument struct { - Errors []Error `json:"errors"` - Jsonapi JsonApi `json:"jsonapi"` -} - -// ErrorLink A link that leads to further details about this particular occurrance of the problem. -type ErrorLink struct { - About *LinkProperty `json:"about,omitempty"` -} - -// JsonApi defines model for JsonApi. -type JsonApi struct { - // Version Version of the JSON API specification this server supports. - Version string `json:"version"` -} - -// LinkProperty defines model for LinkProperty. -type LinkProperty struct { - union json.RawMessage -} - -// LinkProperty0 A string containing the link’s URL. -type LinkProperty0 = string - -// LinkProperty1 defines model for . -type LinkProperty1 struct { - // Href A string containing the link’s URL. - Href string `json:"href"` - - // Meta Free-form object that may contain non-standard information. - Meta *Meta `json:"meta,omitempty"` -} - -// Links defines model for Links. -type Links struct { - First *LinkProperty `json:"first,omitempty"` - Last *LinkProperty `json:"last,omitempty"` - Next *LinkProperty `json:"next,omitempty"` - Prev *LinkProperty `json:"prev,omitempty"` - Related *LinkProperty `json:"related,omitempty"` - Self *LinkProperty `json:"self,omitempty"` -} - -// Meta Free-form object that may contain non-standard information. -type Meta map[string]interface{} - -// PaginatedLinks defines model for PaginatedLinks. -type PaginatedLinks struct { - First *LinkProperty `json:"first,omitempty"` - Last *LinkProperty `json:"last,omitempty"` - Next *LinkProperty `json:"next,omitempty"` - Prev *LinkProperty `json:"prev,omitempty"` - Self *LinkProperty `json:"self,omitempty"` -} - -// QueryVersion Requested API version -type QueryVersion = string - -// RelatedLink defines model for RelatedLink. -type RelatedLink struct { - Related *LinkProperty `json:"related,omitempty"` -} - -// Relationship defines model for Relationship. -type Relationship struct { - Data struct { - Id openapi_types.UUID `json:"id"` - - // Type Type of the related resource - Type string `json:"type"` - } `json:"data"` - Links RelatedLink `json:"links"` - - // Meta Free-form object that may contain non-standard information. - Meta *Meta `json:"meta,omitempty"` -} - -// SelfLink defines model for SelfLink. -type SelfLink struct { - Self *LinkProperty `json:"self,omitempty"` -} - -// Tag defines model for Tag. -type Tag struct { - Key string `json:"key"` - Value string `json:"value"` -} - -// Types defines model for Types. -type Types = string - -// EndingBefore defines model for EndingBefore. -type EndingBefore = string - -// Limit defines model for Limit. -type Limit = int32 - -// MetaCount defines model for MetaCount. -type MetaCount string - -// StartingAfter defines model for StartingAfter. -type StartingAfter = string - -// Version Requested API version -type Version = QueryVersion - -// N400 defines model for 400. -type N400 = ErrorDocument - -// N401 defines model for 401. -type N401 = ErrorDocument - -// N403 defines model for 403. -type N403 = ErrorDocument - -// N404 defines model for 404. -type N404 = ErrorDocument - -// N409 defines model for 409. -type N409 = ErrorDocument - -// N410 defines model for 410. -type N410 = ErrorDocument - -// N500 defines model for 500. -type N500 = ErrorDocument - -// AsLinkProperty0 returns the union data inside the LinkProperty as a LinkProperty0 -func (t LinkProperty) AsLinkProperty0() (LinkProperty0, error) { - var body LinkProperty0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromLinkProperty0 overwrites any union data inside the LinkProperty as the provided LinkProperty0 -func (t *LinkProperty) FromLinkProperty0(v LinkProperty0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeLinkProperty0 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty0 -func (t *LinkProperty) MergeLinkProperty0(v LinkProperty0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JsonMerge(t.union, b) - t.union = merged - return err -} - -// AsLinkProperty1 returns the union data inside the LinkProperty as a LinkProperty1 -func (t LinkProperty) AsLinkProperty1() (LinkProperty1, error) { - var body LinkProperty1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromLinkProperty1 overwrites any union data inside the LinkProperty as the provided LinkProperty1 -func (t *LinkProperty) FromLinkProperty1(v LinkProperty1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeLinkProperty1 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty1 -func (t *LinkProperty) MergeLinkProperty1(v LinkProperty1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JsonMerge(t.union, b) - t.union = merged - return err -} - -func (t LinkProperty) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *LinkProperty) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} diff --git a/internal/workspace/2024-03-12/links/links.go b/internal/workspace/2024-03-12/links/links.go deleted file mode 100644 index 4a6932d..0000000 --- a/internal/workspace/2024-03-12/links/links.go +++ /dev/null @@ -1,15 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -// Link defines model for Link. -type Link struct { - // Href A string containing the link’s URL. - Href string `json:"href"` -} - -// LinkSelf defines model for LinkSelf. -type LinkSelf struct { - Self Link `json:"self"` -} diff --git a/internal/workspace/2024-03-12/mocks/workspace.go b/internal/workspace/2024-03-12/mocks/workspace.go deleted file mode 100644 index 23c67bf..0000000 --- a/internal/workspace/2024-03-12/mocks/workspace.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: workspace.go - -// Package mocks is a generated GoMock package. -package mocks - -import ( - context "context" - io "io" - reflect "reflect" - - gomock "github.com/golang/mock/gomock" - v20240312 "github.com/snyk/code-client-go/internal/workspace/2024-03-12" - v202403120 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters" -) - -// MockWorkspace is a mock of Workspace interface. -type MockWorkspace struct { - ctrl *gomock.Controller - recorder *MockWorkspaceMockRecorder -} - -// MockWorkspaceMockRecorder is the mock recorder for MockWorkspace. -type MockWorkspaceMockRecorder struct { - mock *MockWorkspace -} - -// NewMockWorkspace creates a new mock instance. -func NewMockWorkspace(ctrl *gomock.Controller) *MockWorkspace { - mock := &MockWorkspace{ctrl: ctrl} - mock.recorder = &MockWorkspaceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockWorkspace) EXPECT() *MockWorkspaceMockRecorder { - return m.recorder -} - -// CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse mocks base method. -func (m *MockWorkspace) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId v202403120.OrgId, params *v20240312.CreateWorkspaceParams, body v20240312.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...v20240312.RequestEditorFn) (*v20240312.CreateWorkspaceResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, orgId, params, body} - for _, a := range reqEditors { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse", varargs...) - ret0, _ := ret[0].(*v20240312.CreateWorkspaceResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse indicates an expected call of CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse. -func (mr *MockWorkspaceMockRecorder) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx, orgId, params, body interface{}, reqEditors ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, orgId, params, body}, reqEditors...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse", reflect.TypeOf((*MockWorkspace)(nil).CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse), varargs...) -} - -// CreateWorkspaceWithBodyWithResponse mocks base method. -func (m *MockWorkspace) CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId v202403120.OrgId, params *v20240312.CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...v20240312.RequestEditorFn) (*v20240312.CreateWorkspaceResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, orgId, params, contentType, body} - for _, a := range reqEditors { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CreateWorkspaceWithBodyWithResponse", varargs...) - ret0, _ := ret[0].(*v20240312.CreateWorkspaceResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateWorkspaceWithBodyWithResponse indicates an expected call of CreateWorkspaceWithBodyWithResponse. -func (mr *MockWorkspaceMockRecorder) CreateWorkspaceWithBodyWithResponse(ctx, orgId, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, orgId, params, contentType, body}, reqEditors...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWorkspaceWithBodyWithResponse", reflect.TypeOf((*MockWorkspace)(nil).CreateWorkspaceWithBodyWithResponse), varargs...) -} diff --git a/internal/workspace/2024-03-12/parameters/content-type.go b/internal/workspace/2024-03-12/parameters/content-type.go deleted file mode 100644 index 951f835..0000000 --- a/internal/workspace/2024-03-12/parameters/content-type.go +++ /dev/null @@ -1,12 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -// Defines values for ContentTypeHeader. -const ( - ApplicationvndApiJson ContentTypeHeader = "application/vnd.api+json" -) - -// ContentTypeHeader defines model for ContentTypeHeader. -type ContentTypeHeader string diff --git a/internal/workspace/2024-03-12/parameters/orgs.go b/internal/workspace/2024-03-12/parameters/orgs.go deleted file mode 100644 index 1e6df7d..0000000 --- a/internal/workspace/2024-03-12/parameters/orgs.go +++ /dev/null @@ -1,11 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -import ( - openapi_types "github.com/oapi-codegen/runtime/types" -) - -// OrgId defines model for OrgId. -type OrgId = openapi_types.UUID diff --git a/internal/workspace/2024-03-12/parameters/request-id.go b/internal/workspace/2024-03-12/parameters/request-id.go deleted file mode 100644 index ed704bb..0000000 --- a/internal/workspace/2024-03-12/parameters/request-id.go +++ /dev/null @@ -1,11 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -import ( - openapi_types "github.com/oapi-codegen/runtime/types" -) - -// RequestId defines model for RequestId. -type RequestId = openapi_types.UUID diff --git a/internal/workspace/2024-03-12/parameters/user-agent.go b/internal/workspace/2024-03-12/parameters/user-agent.go deleted file mode 100644 index 0fb98ce..0000000 --- a/internal/workspace/2024-03-12/parameters/user-agent.go +++ /dev/null @@ -1,7 +0,0 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 - -// UserAgent defines model for UserAgent. -type UserAgent = string diff --git a/internal/workspace/2024-03-12/client_pact_test.go b/internal/workspace/2024-05-14/client_pact_test.go similarity index 77% rename from internal/workspace/2024-03-12/client_pact_test.go rename to internal/workspace/2024-05-14/client_pact_test.go index 9370a79..b91ce9d 100644 --- a/internal/workspace/2024-03-12/client_pact_test.go +++ b/internal/workspace/2024-05-14/client_pact_test.go @@ -16,7 +16,7 @@ * limitations under the License. */ -package v20240312_test +package v20240514_test import ( "context" @@ -31,8 +31,8 @@ import ( codeClientHTTP "github.com/snyk/code-client-go/http" "github.com/snyk/code-client-go/internal/util/testutil" - v20240312 "github.com/snyk/code-client-go/internal/workspace/2024-03-12" - workspaces "github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces" + v20240514 "github.com/snyk/code-client-go/internal/workspace/2024-05-14" + workspaces "github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces" ) const ( @@ -47,7 +47,7 @@ const ( // Common test data var pact dsl.Pact -var client *v20240312.ClientWithResponses +var client *v20240514.ClientWithResponses func TestWorkspaceClientPact(t *testing.T) { setupPact(t) @@ -59,13 +59,13 @@ func TestWorkspaceClientPact(t *testing.T) { } }() - // https://snyk.roadie.so/catalog/default/api/workspace-service_2024-03-12_experimental + // https://snyk.roadie.so/catalog/default/api/workspace-service_2024-05-14_experimental t.Run("Create workspace", func(t *testing.T) { pact.AddInteraction().Given("New workspace").UponReceiving("Create workspace").WithRequest(dsl.Request{ Method: "POST", Path: dsl.String(fmt.Sprintf("/orgs/%s/workspaces", orgUUID)), Query: dsl.MapMatcher{ - "version": dsl.String("2024-03-12~experimental"), + "version": dsl.String("2024-05-14~experimental"), }, Headers: getHeaderMatcher(), Body: getBodyMatcher(), @@ -81,34 +81,33 @@ func TestWorkspaceClientPact(t *testing.T) { _, err := client.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse( context.Background(), uuid.MustParse(orgUUID), - &v20240312.CreateWorkspaceParams{ - Version: "2024-03-12~experimental", + &v20240514.CreateWorkspaceParams{ + Version: "2024-05-14~experimental", SnykRequestId: uuid.MustParse(requestId), }, - v20240312.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ + v20240514.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ Data: struct { Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } `json:"attributes"` Type workspaces.WorkspacePostRequestDataType `json:"type"` - }(struct { - Attributes struct { + }{ + Attributes: struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` - } - Type workspaces.WorkspacePostRequestDataType - }{Attributes: struct { - BundleId string `json:"bundle_id"` - RepositoryUri string `json:"repository_uri"` - WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` - }(struct { - BundleId string - RepositoryUri string - WorkspaceType workspaces.WorkspacePostRequestDataAttributesWorkspaceType - }{BundleId: "YnVuZGxlSWQK", RepositoryUri: "https://github.com/snyk/code-client-go.git", WorkspaceType: "file_bundle_workspace"}), Type: "workspace"}), + }{ + BundleId: "YnVuZGxlSWQK", + RepositoryUri: "https://github.com/snyk/code-client-go.git", + RootFolderId: "testFolder", + WorkspaceType: "file_bundle_workspace", + }, + Type: "workspace", + }, }) if err != nil { return err @@ -151,7 +150,7 @@ func setupPact(t *testing.T) { codeClientHTTP.WithLogger(&logger), ) var err error - client, err = v20240312.NewClientWithResponses(restApi, v20240312.WithHTTPClient(httpClient)) + client, err = v20240514.NewClientWithResponses(restApi, v20240514.WithHTTPClient(httpClient)) require.NoError(t, err) } diff --git a/internal/workspace/2024-03-12/client_test.go b/internal/workspace/2024-05-14/client_test.go similarity index 86% rename from internal/workspace/2024-03-12/client_test.go rename to internal/workspace/2024-05-14/client_test.go index 974324a..c0c8660 100644 --- a/internal/workspace/2024-03-12/client_test.go +++ b/internal/workspace/2024-05-14/client_test.go @@ -1,4 +1,4 @@ -package v20240312_test +package v20240514_test import ( "bytes" @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - workspaceClient "github.com/snyk/code-client-go/internal/workspace/2024-03-12" - externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces" + workspaceClient "github.com/snyk/code-client-go/internal/workspace/2024-05-14" + externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces" ) // HTTPRequestDoerMock mocks the interface HttpRequestDoerMock. @@ -50,7 +50,7 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Success(t *t doer.On("Do", mock.Anything).Return(&mockResponse, nil).Run(func(args mock.Arguments) { req, ok := args.Get(0).(*http.Request) assert.True(t, ok) - assert.Equal(t, "https://api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-03-12~experimental", req.URL.String()) + assert.Equal(t, "https://api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-05-14~experimental", req.URL.String()) }) client, err := workspaceClient.NewClientWithResponses("https://api.snyk.io/rest", workspaceClient.WithHTTPClient(doer)) require.NoError(t, err) @@ -58,13 +58,14 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Success(t *t orgUUID := uuid.MustParse("e7ea34c9-de0f-422c-bf2c-4654c2e2da90") requestId := uuid.New() response, err := client.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(context.Background(), orgUUID, &workspaceClient.CreateWorkspaceParams{ - Version: "2024-03-12~experimental", + Version: "2024-05-14~experimental", SnykRequestId: requestId, }, workspaceClient.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ Data: struct { Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } `json:"attributes"` Type externalRef3.WorkspacePostRequestDataType `json:"type"` @@ -72,16 +73,19 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Success(t *t Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } Type externalRef3.WorkspacePostRequestDataType }{Attributes: struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` }(struct { BundleId string RepositoryUri string + RootFolderId string WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType }{BundleId: "bundleId", RepositoryUri: "repositoryUri", WorkspaceType: "workspaceUri"}), Type: "workspace"}), }) @@ -109,7 +113,7 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Invalid(t *t doer.On("Do", mock.Anything).Return(&mockResponse, nil).Run(func(args mock.Arguments) { req, ok := args.Get(0).(*http.Request) assert.True(t, ok) - assert.Equal(t, "https://api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-03-12~experimental", req.URL.String()) + assert.Equal(t, "https://api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-05-14~experimental", req.URL.String()) }) client, err := workspaceClient.NewClientWithResponses("https://api.snyk.io/rest", workspaceClient.WithHTTPClient(doer)) require.NoError(t, err) @@ -117,13 +121,14 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Invalid(t *t orgUUID := uuid.MustParse("e7ea34c9-de0f-422c-bf2c-4654c2e2da90") requestId := uuid.New() response, err := client.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(context.Background(), orgUUID, &workspaceClient.CreateWorkspaceParams{ - Version: "2024-03-12~experimental", + Version: "2024-05-14~experimental", SnykRequestId: requestId, }, workspaceClient.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ Data: struct { Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } `json:"attributes"` Type externalRef3.WorkspacePostRequestDataType `json:"type"` @@ -131,16 +136,19 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Invalid(t *t Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } Type externalRef3.WorkspacePostRequestDataType }{Attributes: struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` }(struct { BundleId string RepositoryUri string + RootFolderId string WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType }{BundleId: "bundleId", RepositoryUri: "repositoryUri", WorkspaceType: "workspaceUri"}), Type: "workspace"}), }) @@ -156,7 +164,7 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Failure(t *t doer.On("Do", mock.Anything).Return(nil, errors.New("something went wrong")).Run(func(args mock.Arguments) { req, ok := args.Get(0).(*http.Request) assert.True(t, ok) - assert.Equal(t, "https://api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-03-12~experimental", req.URL.String()) + assert.Equal(t, "https://api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-05-14~experimental", req.URL.String()) }) client, err := workspaceClient.NewClientWithResponses("https://api.snyk.io/rest", workspaceClient.WithHTTPClient(doer)) require.NoError(t, err) @@ -164,13 +172,14 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Failure(t *t orgUUID := uuid.MustParse("e7ea34c9-de0f-422c-bf2c-4654c2e2da90") requestId := uuid.New() _, err = client.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(context.Background(), orgUUID, &workspaceClient.CreateWorkspaceParams{ - Version: "2024-03-12~experimental", + Version: "2024-05-14~experimental", SnykRequestId: requestId, }, workspaceClient.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ Data: struct { Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } `json:"attributes"` Type externalRef3.WorkspacePostRequestDataType `json:"type"` @@ -178,16 +187,19 @@ func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Failure(t *t Attributes struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } Type externalRef3.WorkspacePostRequestDataType }{Attributes: struct { BundleId string `json:"bundle_id"` RepositoryUri string `json:"repository_uri"` + RootFolderId string `json:"root_folder_id"` WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` }(struct { BundleId string RepositoryUri string + RootFolderId string WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType }{BundleId: "bundleId", RepositoryUri: "repositoryUri", WorkspaceType: "workspaceUri"}), Type: "workspace"}), }) diff --git a/internal/workspace/2024-03-12/common/common.config.yaml b/internal/workspace/2024-05-14/common/common.config.yaml similarity index 81% rename from internal/workspace/2024-03-12/common/common.config.yaml rename to internal/workspace/2024-05-14/common/common.config.yaml index 4b9e671..f53d4b5 100644 --- a/internal/workspace/2024-03-12/common/common.config.yaml +++ b/internal/workspace/2024-05-14/common/common.config.yaml @@ -1,4 +1,4 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: diff --git a/internal/workspace/2024-03-12/gen.go b/internal/workspace/2024-05-14/gen.go similarity index 97% rename from internal/workspace/2024-03-12/gen.go rename to internal/workspace/2024-05-14/gen.go index ffc92cc..0b99e80 100644 --- a/internal/workspace/2024-03-12/gen.go +++ b/internal/workspace/2024-05-14/gen.go @@ -1,7 +1,7 @@ //go:build API && !MOCK // +build API,!MOCK -package v20240312 +package v20240514 //go:generate oapi-codegen --config common/common.config.yaml common/common.yaml //go:generate oapi-codegen --config parameters/orgs.config.yaml parameters/orgs.yaml diff --git a/internal/workspace/2024-03-12/links/links.config.yaml b/internal/workspace/2024-05-14/links/links.config.yaml similarity index 81% rename from internal/workspace/2024-03-12/links/links.config.yaml rename to internal/workspace/2024-05-14/links/links.config.yaml index fd8763a..125030f 100644 --- a/internal/workspace/2024-03-12/links/links.config.yaml +++ b/internal/workspace/2024-05-14/links/links.config.yaml @@ -1,4 +1,4 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: diff --git a/internal/workspace/2024-03-12/pacts/code-client-go-workspaceapi.json b/internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json similarity index 96% rename from internal/workspace/2024-03-12/pacts/code-client-go-workspaceapi.json rename to internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json index 4ef4064..be8213d 100644 --- a/internal/workspace/2024-03-12/pacts/code-client-go-workspaceapi.json +++ b/internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json @@ -12,7 +12,7 @@ "request": { "method": "POST", "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces", - "query": "version=2024-03-12%7Eexperimental", + "query": "version=2024-05-14%7Eexperimental", "headers": { "Snyk-Request-Id": "fc763eba-0905-41c5-a27f-3934ab26786c" }, diff --git a/internal/workspace/2024-03-12/parameters/content-type.config.yaml b/internal/workspace/2024-05-14/parameters/content-type.config.yaml similarity index 83% rename from internal/workspace/2024-03-12/parameters/content-type.config.yaml rename to internal/workspace/2024-05-14/parameters/content-type.config.yaml index ba6a914..608c7ea 100644 --- a/internal/workspace/2024-03-12/parameters/content-type.config.yaml +++ b/internal/workspace/2024-05-14/parameters/content-type.config.yaml @@ -1,4 +1,4 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: diff --git a/internal/workspace/2024-03-12/parameters/orgs.config.yaml b/internal/workspace/2024-05-14/parameters/orgs.config.yaml similarity index 81% rename from internal/workspace/2024-03-12/parameters/orgs.config.yaml rename to internal/workspace/2024-05-14/parameters/orgs.config.yaml index 1f7a116..5579bcd 100644 --- a/internal/workspace/2024-03-12/parameters/orgs.config.yaml +++ b/internal/workspace/2024-05-14/parameters/orgs.config.yaml @@ -1,4 +1,4 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: diff --git a/internal/workspace/2024-03-12/parameters/request-id.config.yaml b/internal/workspace/2024-05-14/parameters/request-id.config.yaml similarity index 82% rename from internal/workspace/2024-03-12/parameters/request-id.config.yaml rename to internal/workspace/2024-05-14/parameters/request-id.config.yaml index 777921a..4b291a5 100644 --- a/internal/workspace/2024-03-12/parameters/request-id.config.yaml +++ b/internal/workspace/2024-05-14/parameters/request-id.config.yaml @@ -1,4 +1,4 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: diff --git a/internal/workspace/2024-03-12/parameters/user-agent.config.yaml b/internal/workspace/2024-05-14/parameters/user-agent.config.yaml similarity index 82% rename from internal/workspace/2024-03-12/parameters/user-agent.config.yaml rename to internal/workspace/2024-05-14/parameters/user-agent.config.yaml index b0f1d01..ed9d75b 100644 --- a/internal/workspace/2024-03-12/parameters/user-agent.config.yaml +++ b/internal/workspace/2024-05-14/parameters/user-agent.config.yaml @@ -1,4 +1,4 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: diff --git a/internal/workspace/2024-03-12/spec.config.yaml b/internal/workspace/2024-05-14/spec.config.yaml similarity index 67% rename from internal/workspace/2024-03-12/spec.config.yaml rename to internal/workspace/2024-05-14/spec.config.yaml index 1eaea28..1ccef83 100644 --- a/internal/workspace/2024-03-12/spec.config.yaml +++ b/internal/workspace/2024-05-14/spec.config.yaml @@ -1,15 +1,15 @@ -package: v20240312 +package: v20240514 generate: client: true models: true output-options: skip-prune: true import-mapping: - ./common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/common - ./links/links.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/links - ./workspaces/workspaces.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces - ./parameters/orgs.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters - ./parameters/request-id.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters - ./parameters/user-agent.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters - ./parameters/content-type.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters + ./common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/common + ./links/links.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/links + ./workspaces/workspaces.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces + ./parameters/orgs.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters + ./parameters/request-id.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters + ./parameters/user-agent.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters + ./parameters/content-type.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters output: client.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/workspace.go b/internal/workspace/2024-05-14/workspace.go similarity index 94% rename from internal/workspace/2024-03-12/workspace.go rename to internal/workspace/2024-05-14/workspace.go index d34a476..133f15b 100644 --- a/internal/workspace/2024-03-12/workspace.go +++ b/internal/workspace/2024-05-14/workspace.go @@ -1,10 +1,10 @@ -package v20240312 +package v20240514 import ( "context" "io" - externalRef2 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters" + externalRef2 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters" ) //go:generate mockgen -destination=mocks/workspace.go -source=workspace.go -package mocks diff --git a/internal/workspace/2024-03-12/workspaces/workspaces.config.yaml b/internal/workspace/2024-05-14/workspaces/workspaces.config.yaml similarity index 76% rename from internal/workspace/2024-03-12/workspaces/workspaces.config.yaml rename to internal/workspace/2024-05-14/workspaces/workspaces.config.yaml index 281efe6..b2c29c8 100644 --- a/internal/workspace/2024-03-12/workspaces/workspaces.config.yaml +++ b/internal/workspace/2024-05-14/workspaces/workspaces.config.yaml @@ -1,9 +1,9 @@ -package: v20240312 +package: v20240514 generate: models: true output-options: skip-prune: true import-mapping: - ../common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/common - ../links/links.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/links + ../common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/common + ../links/links.yaml: github.com/snyk/code-client-go/internal/workspace/2024-05-14/links output: workspaces/workspaces.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/workspaces/workspaces.go b/internal/workspace/2024-05-14/workspaces/workspaces.go similarity index 65% rename from internal/workspace/2024-03-12/workspaces/workspaces.go rename to internal/workspace/2024-05-14/workspaces/workspaces.go index 76d1087..2d2b041 100644 --- a/internal/workspace/2024-03-12/workspaces/workspaces.go +++ b/internal/workspace/2024-05-14/workspaces/workspaces.go @@ -1,12 +1,12 @@ -// Package v20240312 provides primitives to interact with the openapi HTTP API. +// Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT. -package v20240312 +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 import ( - openapi_types "github.com/oapi-codegen/runtime/types" - externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/common" - externalRef1 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/links" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/common" + externalRef1 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/links" ) // Defines values for WorkspacePostRequestDataAttributesWorkspaceType. @@ -28,15 +28,23 @@ const ( type WorkspacePostRequest struct { Data struct { Attributes struct { - BundleId string `json:"bundle_id"` - RepositoryUri string `json:"repository_uri"` + // BundleId The bundle identifier + BundleId string `json:"bundle_id"` + + // RepositoryUri The repository URI + RepositoryUri string `json:"repository_uri"` + + // RootFolderId A consistent ID of the root folder path where the bundle was created (eg SHA-256 hash). + RootFolderId string `json:"root_folder_id"` + + // WorkspaceType The type of workspace to create WorkspaceType WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` } `json:"attributes"` Type WorkspacePostRequestDataType `json:"type"` } `json:"data"` } -// WorkspacePostRequestDataAttributesWorkspaceType defines model for WorkspacePostRequest.Data.Attributes.WorkspaceType. +// WorkspacePostRequestDataAttributesWorkspaceType The type of workspace to create type WorkspacePostRequestDataAttributesWorkspaceType string // WorkspacePostRequestDataType defines model for WorkspacePostRequest.Data.Type. @@ -45,12 +53,15 @@ type WorkspacePostRequestDataType string // WorkspacePostResponse defines model for WorkspacePostResponse. type WorkspacePostResponse struct { Data struct { - Id openapi_types.UUID `json:"id"` + // Id The workspace identifier + Id openapi_types.UUID `json:"id"` + + // Type The REST resource Type WorkspacePostResponseDataType `json:"type"` } `json:"data"` Jsonapi *externalRef0.JsonApi `json:"jsonapi,omitempty"` Links *externalRef1.LinkSelf `json:"links,omitempty"` } -// WorkspacePostResponseDataType defines model for WorkspacePostResponse.Data.Type. +// WorkspacePostResponseDataType The REST resource type WorkspacePostResponseDataType string diff --git a/scripts/download-orchestration-api.py b/scripts/download-orchestration-api.py index 5de5089..d162111 100755 --- a/scripts/download-orchestration-api.py +++ b/scripts/download-orchestration-api.py @@ -7,8 +7,12 @@ from utils import replaceInFile ORCHESTRATION_API_VERSION = "2024-02-16" -ORCHESTRATION_COMMIT_SHA = "c6a338190fa7260f8154d386589c5e42ea9c7479" +ORCHESTRATION_COMMIT_SHA = "a20671b" +mkDir(f"./internal/orchestration/{ORCHESTRATION_API_VERSION}") +mkDir(f"./internal/orchestration/{ORCHESTRATION_API_VERSION}/common") +mkDir(f"./internal/orchestration/{ORCHESTRATION_API_VERSION}/parameters") +mkDir(f"./internal/orchestration/{ORCHESTRATION_API_VERSION}/scans") mkDir(f"./internal/orchestration/{ORCHESTRATION_API_VERSION}") # Download the Common spec diff --git a/scripts/download-workspace-api.py b/scripts/download-workspace-api.py index 2c40eda..dbbd20a 100755 --- a/scripts/download-workspace-api.py +++ b/scripts/download-workspace-api.py @@ -6,10 +6,14 @@ from utils import formatSpecWithParameters from utils import replaceInFile -WORKSPACE_API_VERSION = "2024-03-12" -WORKSPACE_COMMIT_SHA = "cfd737cd917ab2c63840bd112d9eb2c9a9c101f6" +WORKSPACE_API_VERSION = "2024-05-14" +WORKSPACE_COMMIT_SHA = "2d8bd3b" mkDir(f"./internal/workspace/{WORKSPACE_API_VERSION}") +mkDir(f"./internal/workspace/{WORKSPACE_API_VERSION}/common") +mkDir(f"./internal/workspace/{WORKSPACE_API_VERSION}/links") +mkDir(f"./internal/workspace/{WORKSPACE_API_VERSION}/parameters") +mkDir(f"./internal/workspace/{WORKSPACE_API_VERSION}/workspaces") # Download the Common spec saveGitHubFile("sweater-comb", "components/common.yaml", f"./internal/workspace/{WORKSPACE_API_VERSION}/common/common.yaml", "main") diff --git a/scripts/utils.py b/scripts/utils.py index ac5d992..0b3c25c 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -58,4 +58,4 @@ def formatSpecWithParameters(file): with open(file, 'w') as f: nestedObj = {'parameters': obj} - yaml.dump(nestedObj, f, sort_keys=False) + yaml.dump(nestedObj, f, sort_keys=False) \ No newline at end of file From dbcd1973489aa42c899d9785f237f2be713bc573 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Mon, 3 Jun 2024 11:38:31 +0200 Subject: [PATCH 03/19] chore: update APIs --- internal/workspace/2024-05-14/client.go | 395 ++++++++++++++++++ .../workspace/2024-05-14/common/common.go | 239 +++++++++++ internal/workspace/2024-05-14/links/links.go | 15 + .../workspace/2024-05-14/mocks/workspace.go | 78 ++++ .../2024-05-14/parameters/content-type.go | 12 + .../workspace/2024-05-14/parameters/orgs.go | 11 + .../2024-05-14/parameters/request-id.go | 11 + .../2024-05-14/parameters/user-agent.go | 7 + 8 files changed, 768 insertions(+) create mode 100644 internal/workspace/2024-05-14/client.go create mode 100644 internal/workspace/2024-05-14/common/common.go create mode 100644 internal/workspace/2024-05-14/links/links.go create mode 100644 internal/workspace/2024-05-14/mocks/workspace.go create mode 100644 internal/workspace/2024-05-14/parameters/content-type.go create mode 100644 internal/workspace/2024-05-14/parameters/orgs.go create mode 100644 internal/workspace/2024-05-14/parameters/request-id.go create mode 100644 internal/workspace/2024-05-14/parameters/user-agent.go diff --git a/internal/workspace/2024-05-14/client.go b/internal/workspace/2024-05-14/client.go new file mode 100644 index 0000000..744cb35 --- /dev/null +++ b/internal/workspace/2024-05-14/client.go @@ -0,0 +1,395 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/deepmap/oapi-codegen/pkg/runtime" + externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/common" + externalRef2 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters" + externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces" +) + +const ( + BearerAuthScopes = "bearerAuth.Scopes" +) + +// Defines values for CreateWorkspaceParamsContentType. +const ( + ApplicationvndApiJson CreateWorkspaceParamsContentType = "application/vnd.api+json" +) + +// CreateWorkspaceParams defines parameters for CreateWorkspace. +type CreateWorkspaceParams struct { + // Version The requested version of the endpoint to process the request + Version externalRef0.Version `form:"version" json:"version"` + + // SnykRequestId Unique ID used to track the request + SnykRequestId externalRef2.RequestId `json:"snyk-request-id"` + + // UserAgent The client that sent the request, as per RFC 7231. + UserAgent externalRef2.UserAgent `json:"user-agent"` + + // ContentType Content type header + ContentType CreateWorkspaceParamsContentType `json:"content-type"` +} + +// CreateWorkspaceParamsContentType defines parameters for CreateWorkspace. +type CreateWorkspaceParamsContentType string + +// CreateWorkspaceApplicationVndAPIPlusJSONRequestBody defines body for CreateWorkspace for application/vnd.api+json ContentType. +type CreateWorkspaceApplicationVndAPIPlusJSONRequestBody = externalRef3.WorkspacePostRequest + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // CreateWorkspaceWithBody request with any body + CreateWorkspaceWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) CreateWorkspaceWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateWorkspaceRequestWithBody(c.Server, orgId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody(c.Server, orgId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateWorkspace builder with application/vnd.api+json body +func NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateWorkspaceRequestWithBody(server, orgId, params, "application/vnd.api+json", bodyReader) +} + +// NewCreateWorkspaceRequestWithBody generates requests for CreateWorkspace with any type of body +func NewCreateWorkspaceRequestWithBody(server string, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "org_id", runtime.ParamLocationPath, orgId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/orgs/%s/workspaces", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, params.Version); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "snyk-request-id", runtime.ParamLocationHeader, params.SnykRequestId) + if err != nil { + return nil, err + } + + req.Header.Set("snyk-request-id", headerParam0) + + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "user-agent", runtime.ParamLocationHeader, params.UserAgent) + if err != nil { + return nil, err + } + + req.Header.Set("user-agent", headerParam1) + + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "content-type", runtime.ParamLocationHeader, params.ContentType) + if err != nil { + return nil, err + } + + req.Header.Set("content-type", headerParam2) + + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // CreateWorkspaceWithBodyWithResponse request with any body + CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) + + CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) +} + +type CreateWorkspaceResponse struct { + Body []byte + HTTPResponse *http.Response + ApplicationvndApiJSON201 *externalRef3.WorkspacePostResponse + ApplicationvndApiJSON400 *externalRef0.N400 + ApplicationvndApiJSON401 *externalRef0.N401 + ApplicationvndApiJSON403 *externalRef0.N403 + ApplicationvndApiJSON500 *externalRef0.N500 +} + +// Status returns HTTPResponse.Status +func (r CreateWorkspaceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateWorkspaceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// CreateWorkspaceWithBodyWithResponse request with arbitrary body returning *CreateWorkspaceResponse +func (c *ClientWithResponses) CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) { + rsp, err := c.CreateWorkspaceWithBody(ctx, orgId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateWorkspaceResponse(rsp) +} + +func (c *ClientWithResponses) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) { + rsp, err := c.CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx, orgId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateWorkspaceResponse(rsp) +} + +// ParseCreateWorkspaceResponse parses an HTTP response from a CreateWorkspaceWithResponse call +func ParseCreateWorkspaceResponse(rsp *http.Response) (*CreateWorkspaceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateWorkspaceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest externalRef3.WorkspacePostResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest externalRef0.N400 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest externalRef0.N401 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest externalRef0.N403 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest externalRef0.N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON500 = &dest + + } + + return response, nil +} diff --git a/internal/workspace/2024-05-14/common/common.go b/internal/workspace/2024-05-14/common/common.go new file mode 100644 index 0000000..0440d2f --- /dev/null +++ b/internal/workspace/2024-05-14/common/common.go @@ -0,0 +1,239 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +import ( + "encoding/json" + + "github.com/deepmap/oapi-codegen/pkg/runtime" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" +) + +// Defines values for MetaCount. +const ( + Only MetaCount = "only" + With MetaCount = "with" +) + +// ActualVersion Resolved API version +type ActualVersion = string + +// Error defines model for Error. +type Error struct { + // Code An application-specific error code, expressed as a string value. + Code *string `json:"code,omitempty"` + + // Detail A human-readable explanation specific to this occurrence of the problem. + Detail string `json:"detail"` + + // Id A unique identifier for this particular occurrence of the problem. + Id *openapi_types.UUID `json:"id,omitempty"` + + // Links A link that leads to further details about this particular occurrance of the problem. + Links *ErrorLink `json:"links,omitempty"` + Meta *map[string]interface{} `json:"meta,omitempty"` + Source *struct { + // Parameter A string indicating which URI query parameter caused the error. + Parameter *string `json:"parameter,omitempty"` + + // Pointer A JSON Pointer [RFC6901] to the associated entity in the request document. + Pointer *string `json:"pointer,omitempty"` + } `json:"source,omitempty"` + + // Status The HTTP status code applicable to this problem, expressed as a string value. + Status string `json:"status"` + + // Title A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. + Title *string `json:"title,omitempty"` +} + +// ErrorDocument defines model for ErrorDocument. +type ErrorDocument struct { + Errors []Error `json:"errors"` + Jsonapi JsonApi `json:"jsonapi"` +} + +// ErrorLink A link that leads to further details about this particular occurrance of the problem. +type ErrorLink struct { + About *LinkProperty `json:"about,omitempty"` +} + +// JsonApi defines model for JsonApi. +type JsonApi struct { + // Version Version of the JSON API specification this server supports. + Version string `json:"version"` +} + +// LinkProperty defines model for LinkProperty. +type LinkProperty struct { + union json.RawMessage +} + +// LinkProperty0 A string containing the link’s URL. +type LinkProperty0 = string + +// LinkProperty1 defines model for . +type LinkProperty1 struct { + // Href A string containing the link’s URL. + Href string `json:"href"` + + // Meta Free-form object that may contain non-standard information. + Meta *Meta `json:"meta,omitempty"` +} + +// Links defines model for Links. +type Links struct { + First *LinkProperty `json:"first,omitempty"` + Last *LinkProperty `json:"last,omitempty"` + Next *LinkProperty `json:"next,omitempty"` + Prev *LinkProperty `json:"prev,omitempty"` + Related *LinkProperty `json:"related,omitempty"` + Self *LinkProperty `json:"self,omitempty"` +} + +// Meta Free-form object that may contain non-standard information. +type Meta map[string]interface{} + +// PaginatedLinks defines model for PaginatedLinks. +type PaginatedLinks struct { + First *LinkProperty `json:"first,omitempty"` + Last *LinkProperty `json:"last,omitempty"` + Next *LinkProperty `json:"next,omitempty"` + Prev *LinkProperty `json:"prev,omitempty"` + Self *LinkProperty `json:"self,omitempty"` +} + +// QueryVersion Requested API version +type QueryVersion = string + +// RelatedLink defines model for RelatedLink. +type RelatedLink struct { + Related *LinkProperty `json:"related,omitempty"` +} + +// Relationship defines model for Relationship. +type Relationship struct { + Data struct { + Id openapi_types.UUID `json:"id"` + + // Type Type of the related resource + Type string `json:"type"` + } `json:"data"` + Links RelatedLink `json:"links"` + + // Meta Free-form object that may contain non-standard information. + Meta *Meta `json:"meta,omitempty"` +} + +// SelfLink defines model for SelfLink. +type SelfLink struct { + Self *LinkProperty `json:"self,omitempty"` +} + +// Tag defines model for Tag. +type Tag struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// Types defines model for Types. +type Types = string + +// EndingBefore defines model for EndingBefore. +type EndingBefore = string + +// Limit defines model for Limit. +type Limit = int32 + +// MetaCount defines model for MetaCount. +type MetaCount string + +// StartingAfter defines model for StartingAfter. +type StartingAfter = string + +// Version Requested API version +type Version = QueryVersion + +// N400 defines model for 400. +type N400 = ErrorDocument + +// N401 defines model for 401. +type N401 = ErrorDocument + +// N403 defines model for 403. +type N403 = ErrorDocument + +// N404 defines model for 404. +type N404 = ErrorDocument + +// N409 defines model for 409. +type N409 = ErrorDocument + +// N410 defines model for 410. +type N410 = ErrorDocument + +// N500 defines model for 500. +type N500 = ErrorDocument + +// AsLinkProperty0 returns the union data inside the LinkProperty as a LinkProperty0 +func (t LinkProperty) AsLinkProperty0() (LinkProperty0, error) { + var body LinkProperty0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLinkProperty0 overwrites any union data inside the LinkProperty as the provided LinkProperty0 +func (t *LinkProperty) FromLinkProperty0(v LinkProperty0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLinkProperty0 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty0 +func (t *LinkProperty) MergeLinkProperty0(v LinkProperty0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsLinkProperty1 returns the union data inside the LinkProperty as a LinkProperty1 +func (t LinkProperty) AsLinkProperty1() (LinkProperty1, error) { + var body LinkProperty1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLinkProperty1 overwrites any union data inside the LinkProperty as the provided LinkProperty1 +func (t *LinkProperty) FromLinkProperty1(v LinkProperty1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLinkProperty1 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty1 +func (t *LinkProperty) MergeLinkProperty1(v LinkProperty1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +func (t LinkProperty) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *LinkProperty) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} diff --git a/internal/workspace/2024-05-14/links/links.go b/internal/workspace/2024-05-14/links/links.go new file mode 100644 index 0000000..b65e48e --- /dev/null +++ b/internal/workspace/2024-05-14/links/links.go @@ -0,0 +1,15 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +// Link defines model for Link. +type Link struct { + // Href A string containing the link’s URL. + Href string `json:"href"` +} + +// LinkSelf defines model for LinkSelf. +type LinkSelf struct { + Self Link `json:"self"` +} diff --git a/internal/workspace/2024-05-14/mocks/workspace.go b/internal/workspace/2024-05-14/mocks/workspace.go new file mode 100644 index 0000000..65fd1a8 --- /dev/null +++ b/internal/workspace/2024-05-14/mocks/workspace.go @@ -0,0 +1,78 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: workspace.go + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + io "io" + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v20240514 "github.com/snyk/code-client-go/internal/workspace/2024-05-14" + v202405140 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters" +) + +// MockWorkspace is a mock of Workspace interface. +type MockWorkspace struct { + ctrl *gomock.Controller + recorder *MockWorkspaceMockRecorder +} + +// MockWorkspaceMockRecorder is the mock recorder for MockWorkspace. +type MockWorkspaceMockRecorder struct { + mock *MockWorkspace +} + +// NewMockWorkspace creates a new mock instance. +func NewMockWorkspace(ctrl *gomock.Controller) *MockWorkspace { + mock := &MockWorkspace{ctrl: ctrl} + mock.recorder = &MockWorkspaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockWorkspace) EXPECT() *MockWorkspaceMockRecorder { + return m.recorder +} + +// CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse mocks base method. +func (m *MockWorkspace) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId v202405140.OrgId, params *v20240514.CreateWorkspaceParams, body v20240514.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...v20240514.RequestEditorFn) (*v20240514.CreateWorkspaceResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, orgId, params, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse", varargs...) + ret0, _ := ret[0].(*v20240514.CreateWorkspaceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse indicates an expected call of CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse. +func (mr *MockWorkspaceMockRecorder) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx, orgId, params, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, orgId, params, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse", reflect.TypeOf((*MockWorkspace)(nil).CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse), varargs...) +} + +// CreateWorkspaceWithBodyWithResponse mocks base method. +func (m *MockWorkspace) CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId v202405140.OrgId, params *v20240514.CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...v20240514.RequestEditorFn) (*v20240514.CreateWorkspaceResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, orgId, params, contentType, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateWorkspaceWithBodyWithResponse", varargs...) + ret0, _ := ret[0].(*v20240514.CreateWorkspaceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateWorkspaceWithBodyWithResponse indicates an expected call of CreateWorkspaceWithBodyWithResponse. +func (mr *MockWorkspaceMockRecorder) CreateWorkspaceWithBodyWithResponse(ctx, orgId, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, orgId, params, contentType, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWorkspaceWithBodyWithResponse", reflect.TypeOf((*MockWorkspace)(nil).CreateWorkspaceWithBodyWithResponse), varargs...) +} diff --git a/internal/workspace/2024-05-14/parameters/content-type.go b/internal/workspace/2024-05-14/parameters/content-type.go new file mode 100644 index 0000000..ca772ee --- /dev/null +++ b/internal/workspace/2024-05-14/parameters/content-type.go @@ -0,0 +1,12 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +// Defines values for ContentTypeHeader. +const ( + ApplicationvndApiJson ContentTypeHeader = "application/vnd.api+json" +) + +// ContentTypeHeader defines model for ContentTypeHeader. +type ContentTypeHeader string diff --git a/internal/workspace/2024-05-14/parameters/orgs.go b/internal/workspace/2024-05-14/parameters/orgs.go new file mode 100644 index 0000000..59ec96e --- /dev/null +++ b/internal/workspace/2024-05-14/parameters/orgs.go @@ -0,0 +1,11 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +import ( + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" +) + +// OrgId defines model for OrgId. +type OrgId = openapi_types.UUID diff --git a/internal/workspace/2024-05-14/parameters/request-id.go b/internal/workspace/2024-05-14/parameters/request-id.go new file mode 100644 index 0000000..b61f119 --- /dev/null +++ b/internal/workspace/2024-05-14/parameters/request-id.go @@ -0,0 +1,11 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +import ( + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" +) + +// RequestId defines model for RequestId. +type RequestId = openapi_types.UUID diff --git a/internal/workspace/2024-05-14/parameters/user-agent.go b/internal/workspace/2024-05-14/parameters/user-agent.go new file mode 100644 index 0000000..72fa00d --- /dev/null +++ b/internal/workspace/2024-05-14/parameters/user-agent.go @@ -0,0 +1,7 @@ +// Package v20240514 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240514 + +// UserAgent defines model for UserAgent. +type UserAgent = string From 20ee7668f29b0f3628fe54c4da505c906924fbc5 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Mon, 3 Jun 2024 11:51:45 +0200 Subject: [PATCH 04/19] chore: update go.sum --- go.sum | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/go.sum b/go.sum index f502bbd..5f68367 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,7 @@ github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4s github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= @@ -33,6 +34,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjA github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= @@ -93,6 +96,8 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= @@ -130,6 +135,8 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -143,6 +150,8 @@ github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QX github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -187,6 +196,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -203,6 +214,8 @@ github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.2.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -233,10 +246,14 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hasura/go-graphql-client v0.6.3/go.mod h1:kvaJsDhxGbkIJ1jgebkrnt9EDIELZHpsAMint56v+2I= +github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/iris-contrib/httpexpect/v2 v2.15.1 h1:G2/TW0EZ5UhNNdljNDBBQDfdfumLlV6ljRqdTk3cAmc= +github.com/iris-contrib/httpexpect/v2 v2.15.1/go.mod h1:cUwf1Mm5CWs5ahZNHtDq82WuGOitAWBg/eMGevX9ilg= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -312,8 +329,6 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= -github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58= github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -321,6 +336,8 @@ github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceT github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -345,7 +362,6 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/pact-foundation/pact-go v1.7.0 h1:5iyVyg+avkWz9Jn7cefRmlPbXu+KMZvWblIe15v4fc8= github.com/pact-foundation/pact-go v1.7.0/go.mod h1:NcAbRqIE0cjRF+JKl2vcLlzjvrgcZrnq4SwQu2o4PeA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= @@ -385,6 +401,8 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -434,12 +452,12 @@ github.com/tdewolff/minify/v2 v2.12.8 h1:Q2BqOTmlMjoutkuD/OPCnJUpIqrzT3nRPkw+q+K github.com/tdewolff/minify/v2 v2.12.8/go.mod h1:YRgk7CC21LZnbuke2fmYnCTq+zhCgpb0yJACOTUNJ1E= github.com/tdewolff/parse/v2 v2.6.7 h1:WrFllrqmzAcrKHzoYgMupqgUBIfBVOb0yscFzDf8bBg= github.com/tdewolff/parse/v2 v2.6.7/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= +github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= @@ -456,9 +474,21 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -703,6 +733,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh 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= +moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= +moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 3fabb8ebf285da779c9ba8dac77c84bd2b0d8fdc Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Mon, 3 Jun 2024 17:25:01 +0200 Subject: [PATCH 05/19] fix: test instrumentor --- internal/util/testutil/test_instrumentor.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/internal/util/testutil/test_instrumentor.go b/internal/util/testutil/test_instrumentor.go index 72fd9ac..991d38a 100644 --- a/internal/util/testutil/test_instrumentor.go +++ b/internal/util/testutil/test_instrumentor.go @@ -27,7 +27,16 @@ func (i *localInstrumentor) ClearSpans() { } func (i *localInstrumentor) StartSpan(ctx context.Context, operation string) observability.Span { - return &testSpan{} + type traceId string + span := testSpan{} + const key traceId = "traceId" + value := ctx.Value(key) + if value == nil { + value = uuid.NewString() + } + span.traceId = value.(string) + span.ctx = context.WithValue(ctx, key, span.traceId) + return &span } func (i *localInstrumentor) NewTransaction(ctx context.Context, txName string, operation string) observability.Span { @@ -38,6 +47,8 @@ func (i *localInstrumentor) Finish(span observability.Span) { } type testSpan struct { + traceId string + ctx context.Context } func (n *testSpan) GetDurationMs() int64 { return 0 } @@ -55,9 +66,9 @@ func (n *testSpan) GetTxName() string { return "test" } func (n *testSpan) GetTraceId() string { - return uuid.New().String() + return n.traceId } func (n *testSpan) Context() context.Context { - return context.Background() + return n.ctx } From be8d78728eb8fee04242ef2d5248b1d30cdc7d71 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Mon, 3 Jun 2024 17:25:23 +0200 Subject: [PATCH 06/19] fix: use incremental scans --- internal/analysis/analysis.go | 60 +++++++++++-------- internal/analysis/mocks/analysis.go | 15 +++++ .../2024-02-16/client_pact_test.go | 5 +- scan_smoke_test.go | 23 +++++-- 4 files changed, 71 insertions(+), 32 deletions(-) diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index c4d1611..75abd7b 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -47,6 +47,7 @@ import ( type AnalysisOrchestrator interface { CreateWorkspace(ctx context.Context, orgId string, requestId string, path scan.Target, bundleHash string) (string, error) RunAnalysis(ctx context.Context, orgId string, rootPath string, workspaceId string) (*sarif.SarifResponse, error) + RunIncrementalAnalysis(ctx context.Context, orgId string, rootPath string, workspaceId string, limitToFiles []string) (*sarif.SarifResponse, error) } type analysisOrchestrator struct { @@ -192,6 +193,10 @@ func (a *analysisOrchestrator) CreateWorkspace(ctx context.Context, orgId string } func (a *analysisOrchestrator) RunAnalysis(ctx context.Context, orgId string, rootPath string, workspaceId string) (*sarif.SarifResponse, error) { + return a.RunIncrementalAnalysis(ctx, orgId, rootPath, workspaceId, []string{}) +} + +func (a *analysisOrchestrator) RunIncrementalAnalysis(ctx context.Context, orgId string, rootPath string, workspaceId string, limitToFiles []string) (*sarif.SarifResponse, error) { method := "analysis.RunAnalysis" logger := a.logger.With().Str("method", method).Logger() logger.Debug().Msg("API: Creating the scan") @@ -210,7 +215,7 @@ func (a *analysisOrchestrator) RunAnalysis(ctx context.Context, orgId string, ro return nil, fmt.Errorf("failed to create orchestrationClient: %w", err) } - scanJobId, err := a.triggerScan(ctx, client, org, workspaceId) + scanJobId, err := a.triggerScan(ctx, client, org, workspaceId, limitToFiles) if err != nil { tracker.End(fmt.Sprintf("Analysis failed: %v", err)) return nil, err @@ -226,52 +231,55 @@ func (a *analysisOrchestrator) RunAnalysis(ctx context.Context, orgId string, ro return response, nil } -func (a *analysisOrchestrator) triggerScan(ctx context.Context, client *orchestrationClient.ClientWithResponses, org uuid.UUID, workspaceId string) (*openapi_types.UUID, error) { +func (a *analysisOrchestrator) triggerScan( + ctx context.Context, + client *orchestrationClient.ClientWithResponses, + org uuid.UUID, + workspaceId string, + limitToFiles []string, +) (*openapi_types.UUID, error) { + workspaceUUID := uuid.MustParse(workspaceId) + flow := scans.Flow{} - err := flow.UnmarshalJSON([]byte(`{"name": "ide"}`)) + err := flow.UnmarshalJSON([]byte(`{"name": "ide_test"}`)) if err != nil { - return nil, fmt.Errorf("failed to create scan request: %w", err) + return nil, errors.Wrap(err, "cannot create test flow element") } - workspaceUUID := uuid.MustParse(workspaceId) + scanOptions := &struct { + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + }{ + LimitScanToFiles: &limitToFiles, + } + + if len(limitToFiles) == 0 { + scanOptions = nil + } data := struct { Attributes struct { - Flow scans.Flow `json:"flow"` - - // ScanOptions Additional options for the scan + Flow scans.Flow `json:"flow"` ScanOptions *struct { - // LimitScanToFiles The findings will be limited to a subset of files only. LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` } `json:"scan_options,omitempty"` - - // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. - WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` - - // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. - WorkspaceUrl string `json:"workspace_url"` + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + WorkspaceUrl string `json:"workspace_url"` } `json:"attributes"` Id *openapi_types.UUID `json:"id,omitempty"` Type scans.PostScanRequestDataType `json:"type"` }{ Attributes: struct { - Flow scans.Flow `json:"flow"` - - // ScanOptions Additional options for the scan + Flow scans.Flow `json:"flow"` ScanOptions *struct { - // LimitScanToFiles The findings will be limited to a subset of files only. LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` } `json:"scan_options,omitempty"` - - // WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL. - WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` - - // WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service. - WorkspaceUrl string `json:"workspace_url"` + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + WorkspaceUrl string `json:"workspace_url"` }{ Flow: flow, - WorkspaceId: &workspaceUUID, WorkspaceUrl: fmt.Sprintf("http://workspace-service/workspaces/%s", workspaceId), + WorkspaceId: &workspaceUUID, + ScanOptions: scanOptions, }, Type: "workspace", } diff --git a/internal/analysis/mocks/analysis.go b/internal/analysis/mocks/analysis.go index 2c63fcd..be90fb8 100644 --- a/internal/analysis/mocks/analysis.go +++ b/internal/analysis/mocks/analysis.go @@ -65,3 +65,18 @@ func (mr *MockAnalysisOrchestratorMockRecorder) RunAnalysis(ctx, orgId, rootPath mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunAnalysis", reflect.TypeOf((*MockAnalysisOrchestrator)(nil).RunAnalysis), ctx, orgId, rootPath, workspaceId) } + +// RunIncrementalAnalysis mocks base method. +func (m *MockAnalysisOrchestrator) RunIncrementalAnalysis(ctx context.Context, orgId, rootPath, workspaceId string, limitToFiles []string) (*sarif.SarifResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RunIncrementalAnalysis", ctx, orgId, rootPath, workspaceId, limitToFiles) + ret0, _ := ret[0].(*sarif.SarifResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RunIncrementalAnalysis indicates an expected call of RunIncrementalAnalysis. +func (mr *MockAnalysisOrchestratorMockRecorder) RunIncrementalAnalysis(ctx, orgId, rootPath, workspaceId, limitToFiles interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunIncrementalAnalysis", reflect.TypeOf((*MockAnalysisOrchestrator)(nil).RunIncrementalAnalysis), ctx, orgId, rootPath, workspaceId, limitToFiles) +} diff --git a/internal/orchestration/2024-02-16/client_pact_test.go b/internal/orchestration/2024-02-16/client_pact_test.go index 2cf5941..b120af0 100644 --- a/internal/orchestration/2024-02-16/client_pact_test.go +++ b/internal/orchestration/2024-02-16/client_pact_test.go @@ -21,10 +21,11 @@ package v20240216_test import ( "context" "fmt" - v20240216 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16" "net/http" "testing" + v20240216 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16" + "github.com/google/uuid" openapi_types "github.com/oapi-codegen/runtime/types" "github.com/pact-foundation/pact-go/dsl" @@ -216,7 +217,7 @@ func getBodyMatcher() dsl.Matcher { "data": dsl.Like(map[string]interface{}{ "attributes": dsl.Like(map[string]interface{}{ "flow": dsl.MapMatcher{ - "name": dsl.String("cli_test"), + "name": dsl.String("ide"), }, "workspace_url": getWorkspaceIDMatcher(), }), diff --git a/scan_smoke_test.go b/scan_smoke_test.go index aaac61f..fffa440 100644 --- a/scan_smoke_test.go +++ b/scan_smoke_test.go @@ -48,7 +48,6 @@ func Test_SmokeScan_HTTPS(t *testing.T) { target, err := scan.NewRepositoryTarget(cloneTargetDir) assert.NoError(t, err) - defer func(path string) { _ = os.RemoveAll(path) }(cloneTargetDir) if err != nil { t.Fatal(err, "Couldn't setup test repo") } @@ -68,6 +67,7 @@ func Test_SmokeScan_HTTPS(t *testing.T) { }, codeClientHTTP.WithRetryCount(3), codeClientHTTP.WithLogger(&logger), + codeClientHTTP.WithInstrumentor(instrumentor), ) trackerFactory := scan.NewNoopTrackerFactory() @@ -79,7 +79,12 @@ func Test_SmokeScan_HTTPS(t *testing.T) { codeClient.WithInstrumentor(instrumentor), codeClient.WithErrorReporter(errorReporter), ) - response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(context.Background(), uuid.New().String(), target, files, map[string]bool{}) + + // let's have a requestID that does not change + span := instrumentor.StartSpan(context.Background(), "UploadAndAnalyze") + defer span.Finish() + + response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(span.Context(), uuid.New().String(), target, files, map[string]bool{}) require.NoError(t, scanErr) require.NotEmpty(t, bundleHash) require.NotNil(t, response) @@ -130,7 +135,12 @@ func Test_SmokeScan_SSH(t *testing.T) { codeClient.WithErrorReporter(errorReporter), codeClient.WithLogger(&logger), ) - response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(context.Background(), uuid.New().String(), target, files, map[string]bool{}) + + // let's have a requestID that does not change + span := instrumentor.StartSpan(context.Background(), "UploadAndAnalyze") + defer span.Finish() + + response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(span.Context(), uuid.New().String(), target, files, map[string]bool{}) require.NoError(t, scanErr) require.NotEmpty(t, bundleHash) require.NotNil(t, response) @@ -173,7 +183,12 @@ func Test_SmokeScan_SubFolder(t *testing.T) { codeClient.WithErrorReporter(errorReporter), codeClient.WithLogger(&logger), ) - response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(context.Background(), uuid.New().String(), target, files, map[string]bool{}) + + // let's have a requestID that does not change + span := instrumentor.StartSpan(context.Background(), "UploadAndAnalyze") + defer span.Finish() + + response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(span.Context(), uuid.New().String(), target, files, map[string]bool{}) require.NoError(t, scanErr) require.NotEmpty(t, bundleHash) require.NotNil(t, response) From ce036aa1fa7bbfee2b4f5526144982e65bdf9bb5 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Tue, 4 Jun 2024 13:27:57 +0200 Subject: [PATCH 07/19] fix: update to pact2, fix orchestration pact test --- Makefile | 13 +- go.mod | 23 +- go.sum | 286 +++--------------- .../2024-02-16/client_pact_test.go | 278 +++++++++++------ .../code-client-go-orchestrationapi.json | 185 ++++++----- tools.go | 1 + 6 files changed, 361 insertions(+), 425 deletions(-) diff --git a/Makefile b/Makefile index 3ac23ac..8636930 100644 --- a/Makefile +++ b/Makefile @@ -5,22 +5,18 @@ GOARCH = $(shell go env GOARCH) TOOLS_BIN := $(shell pwd)/.bin OVERRIDE_GOCI_LINT_V := v1.55.2 -PACT_V := 2.4.2 - -SHELL:=env PATH=$(TOOLS_BIN)/go:$(TOOLS_BIN)/pact/bin:$(PATH) $(SHELL) +SHELL:=env PATH=$(TOOLS_BIN)/go:$(PATH) $(SHELL) ## tools: Install required tooling. .PHONY: tools -tools: $(TOOLS_BIN)/golangci-lint $(TOOLS_BIN)/go $(TOOLS_BIN)/pact/bin/pact +tools: $(TOOLS_BIN)/golangci-lint $(TOOLS_BIN)/go $(TOOLS_BIN)/golangci-lint: @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/$(OVERRIDE_GOCI_LINT_V)/install.sh | sh -s -- -b $(TOOLS_BIN)/ $(OVERRIDE_GOCI_LINT_V) $(TOOLS_BIN)/go: mkdir -p ${TOOLS_BIN}/go @cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % sh -c 'GOBIN=${TOOLS_BIN}/go go install %' - -$(TOOLS_BIN)/pact/bin/pact: - cd $(TOOLS_BIN); curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-ruby-standalone/v$(PACT_V)/install.sh | PACT_CLI_VERSION=v$(PACT_V) bash + @${TOOLS_BIN}/go/pact-go -l DEBUG install .PHONY: format format: @@ -45,6 +41,7 @@ build: clean: @echo "Cleaning up..." @GOOS=$(GOOS) GOARCH=$(GOARCH) go clean -testcache + @rm -rf $(TOOLS_BIN) .PHONY: test test: @@ -57,7 +54,7 @@ testv: @go test -v .PHONY: contract-test -contract-test: $(TOOLS_BIN)/pact +contract-test: $(TOOLS_BIN) @echo "Contract testing..." @go test -tags=CONTRACT ./... diff --git a/go.mod b/go.mod index ad18629..ad14380 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,18 @@ module github.com/snyk/code-client-go go 1.21 require ( - github.com/deepmap/oapi-codegen v1.14.0 + github.com/deepmap/oapi-codegen v1.16.3 github.com/go-git/go-git/v5 v5.11.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/oapi-codegen/runtime v1.0.0 - github.com/pact-foundation/pact-go v1.7.0 + github.com/pact-foundation/pact-go v1.8.0 + github.com/pact-foundation/pact-go/v2 v2.0.5 github.com/pkg/errors v0.9.1 github.com/puzpuzpuz/xsync v1.5.2 github.com/rs/zerolog v1.32.0 github.com/stretchr/testify v1.9.0 - golang.org/x/net v0.22.0 + golang.org/x/net v0.23.0 ) require ( @@ -55,6 +56,7 @@ require ( github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/yaml v0.2.0 // indirect github.com/iris-contrib/schema v0.0.6 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -62,7 +64,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kataras/blocks v0.0.7 // indirect github.com/kataras/golog v0.1.9 // indirect - github.com/kataras/iris/v12 v12.2.5 // indirect + github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 // indirect github.com/kataras/pio v0.0.12 // indirect github.com/kataras/sitemap v0.0.6 // indirect github.com/kataras/tunnel v0.0.4 // indirect @@ -89,9 +91,12 @@ require ( github.com/sergi/go-diff v1.3.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/skeema/knownhosts v1.2.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/tdewolff/minify/v2 v2.12.8 // indirect - github.com/tdewolff/parse/v2 v2.6.7 // indirect + github.com/tdewolff/minify/v2 v2.12.9 // indirect + github.com/tdewolff/parse/v2 v2.6.8 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect @@ -105,9 +110,11 @@ require ( golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.19.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 5f68367..994314d 100644 --- a/go.sum +++ b/go.sum @@ -1,22 +1,9 @@ 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/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -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/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= @@ -28,7 +15,6 @@ github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKd github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= @@ -36,25 +22,16 @@ github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= @@ -62,7 +39,6 @@ github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ github.com/bytedance/sonic v1.10.0-rc3 h1:uNSnscRapXTwUgTyOF0GVljYD08p9X/Lbr9MweSV3V0= github.com/bytedance/sonic v1.10.0-rc3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= @@ -72,13 +48,9 @@ github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLI github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -87,27 +59,24 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.14.0 h1:b51/kQwH69rjN5pu+8j/Q5fUGD/rUclLAcGLQWQwa3E= github.com/deepmap/oapi-codegen v1.14.0/go.mod h1:QcEpzjVDwJEH3Fq6I7XYkI0M/JwvoL82ToYveaeVMAw= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/deepmap/oapi-codegen v1.16.3 h1:GT9G86SbQtT1r8ZB+4Cybi9VGdu1P5ieNvNdEoCSbrA= +github.com/deepmap/oapi-codegen v1.16.3/go.mod h1:JD6ErqeX0nYnhdciLc61Konj3NBASREMlkHOgHn8WAM= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= @@ -124,10 +93,9 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= @@ -147,7 +115,6 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -158,19 +125,13 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/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.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= 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.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= @@ -181,34 +142,24 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= -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.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -216,66 +167,44 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v1.2.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/graph-gophers/graphql-go v1.4.0/go.mod h1:YtmJZDLbF1YYNrlNAuiO5zAStUWc3XZT07iGsVqe1Os= +github.com/graph-gophers/graphql-transport-ws v0.0.2/go.mod h1:5BVKvFzOd2BalVIBFfnfmHjpJi/MZ5rOj8G55mXvZ8g= github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hasura/go-graphql-client v0.6.3/go.mod h1:kvaJsDhxGbkIJ1jgebkrnt9EDIELZHpsAMint56v+2I= +github.com/hasura/go-graphql-client v0.8.1/go.mod h1:NVifIwv+YFIUYGLQ7SM2/vBbzS/9rFP4vmIf/vf/zXM= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/iris-contrib/httpexpect/v2 v2.15.1 h1:G2/TW0EZ5UhNNdljNDBBQDfdfumLlV6ljRqdTk3cAmc= github.com/iris-contrib/httpexpect/v2 v2.15.1/go.mod h1:cUwf1Mm5CWs5ahZNHtDq82WuGOitAWBg/eMGevX9ilg= +github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= github.com/kataras/iris/v12 v12.2.5 h1:R5UzUW4MIByBM6tKMG3UqJ7hL1JCEE+dkqQ8L72f6PU= github.com/kataras/iris/v12 v12.2.5/go.mod h1:bf3oblPF8tQmRgyPCzPZr0mLazvEDFgImdaGZYuN4hw= +github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 h1:Vx8kDVhO2qepK8w44lBtp+RzN3ld743i+LYPzODJSpQ= +github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9/go.mod h1:ldkoR3iXABBeqlTibQ3MYaviA1oSlPvim6f55biwBh4= github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w= github.com/kataras/pio v0.0.12/go.mod h1:ODK/8XBhhQ5WqrAhKy+9lTPS7sBf6O3KcLhc9klfRcY= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= @@ -284,8 +213,6 @@ github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= @@ -294,8 +221,6 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -310,38 +235,25 @@ github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3 github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58= github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -351,18 +263,16 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pact-foundation/pact-go v1.7.0 h1:5iyVyg+avkWz9Jn7cefRmlPbXu+KMZvWblIe15v4fc8= -github.com/pact-foundation/pact-go v1.7.0/go.mod h1:NcAbRqIE0cjRF+JKl2vcLlzjvrgcZrnq4SwQu2o4PeA= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pact-foundation/pact-go v1.8.0 h1:On9JjJZrzwqmT2UICedWqLpcAtqVyd/ktt0SVJFTdL4= +github.com/pact-foundation/pact-go v1.8.0/go.mod h1:YLt/uSQGo9x5ZUjynLzNy3IiORlA4BtbR9p2yxgD2as= +github.com/pact-foundation/pact-go/v2 v2.0.5 h1:t7Ngeug5TYYREKYBLAb+jmNUB84mJdBNTYRAfPLyY90= +github.com/pact-foundation/pact-go/v2 v2.0.5/go.mod h1:OO003128Co8mczCV7UrD6kmeCdyxFOAv4dt3BFvqy5E= github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= @@ -370,66 +280,42 @@ github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY= github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 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/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= @@ -440,21 +326,22 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tdewolff/minify/v2 v2.12.8 h1:Q2BqOTmlMjoutkuD/OPCnJUpIqrzT3nRPkw+q+KpXS0= github.com/tdewolff/minify/v2 v2.12.8/go.mod h1:YRgk7CC21LZnbuke2fmYnCTq+zhCgpb0yJACOTUNJ1E= +github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= +github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= github.com/tdewolff/parse/v2 v2.6.7 h1:WrFllrqmzAcrKHzoYgMupqgUBIfBVOb0yscFzDf8bBg= github.com/tdewolff/parse/v2 v2.6.7/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= +github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= +github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -480,7 +367,6 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= @@ -492,20 +378,12 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI= +go.opentelemetry.io/otel/trace v1.6.3/go.mod h1:GNJQusJlUgZl9/TQBPKU/Y/ty+0iVB5fjhKeJGZPGFs= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-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/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -515,25 +393,11 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= 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/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-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -542,18 +406,10 @@ golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-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-20190327091125-710a502c58a2/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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -563,34 +419,20 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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/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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-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-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -622,7 +464,6 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= 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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -632,29 +473,14 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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-20190328211700-ab21143f2384/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-20191112195655-aa38f8e97acc/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.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= @@ -666,30 +492,18 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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/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/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/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-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -699,27 +513,19 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -729,13 +535,9 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/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= moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/internal/orchestration/2024-02-16/client_pact_test.go b/internal/orchestration/2024-02-16/client_pact_test.go index b120af0..0ffb9bd 100644 --- a/internal/orchestration/2024-02-16/client_pact_test.go +++ b/internal/orchestration/2024-02-16/client_pact_test.go @@ -24,11 +24,13 @@ import ( "net/http" "testing" + "github.com/pact-foundation/pact-go/v2/consumer" + "github.com/pact-foundation/pact-go/v2/matchers" + v20240216 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16" "github.com/google/uuid" openapi_types "github.com/oapi-codegen/runtime/types" - "github.com/pact-foundation/pact-go/dsl" "github.com/rs/zerolog" "github.com/stretchr/testify/require" @@ -38,101 +40,143 @@ import ( ) const ( - consumer = "code-client-go" + consumerName = "code-client-go" pactDir = "./pacts" pactProvider = "OrchestrationApi" - orgUUID = "e7ea34c9-de0f-422c-bf2c-4654c2e2da90" - workspaceId = "b6ea34c9-de0f-422c-bf2c-4654c2e2da90" - uuidMatcher = "^.+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + orgUUID = "e7ea34c9-de0f-422c-bf2c-4654c2e2da90" + workspaceId = "b6ea34c9-de0f-422c-bf2c-4654c2e2da90" + uuidRegex = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + uuidTailRegex = "^.+" + uuidRegex +) + +var ( + workspaceUUID = uuid.MustParse(workspaceId) + scanOptions *struct { + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } + scanOptionsIncrementalScan = &struct { + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + }{ + LimitScanToFiles: &[]string{"fileA", "fileB"}, + } ) // Common test data -var pact dsl.Pact -var client *v20240216.ClientWithResponses +var ( + pact *consumer.V2HTTPMockProvider + httpClient v20240216.HttpRequestDoer +) func TestOrchestrationClientPact(t *testing.T) { setupPact(t) - defer pact.Teardown() - defer func() { - if err := pact.WritePact(); err != nil { - t.Fatal(err) - } - }() + flow := scans.Flow{} + flowErr := flow.UnmarshalJSON([]byte(`{"name": "ide_test"}`)) + require.NoError(t, flowErr) + + createScanData := struct { + Attributes struct { + Flow scans.Flow `json:"flow"` + ScanOptions *struct { + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + WorkspaceUrl string `json:"workspace_url"` + } `json:"attributes"` + Id *openapi_types.UUID `json:"id,omitempty"` + Type scans.PostScanRequestDataType `json:"type"` + }{ + Attributes: struct { + Flow scans.Flow `json:"flow"` + ScanOptions *struct { + LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` + } `json:"scan_options,omitempty"` + WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` + WorkspaceUrl string `json:"workspace_url"` + }{ + Flow: flow, + WorkspaceUrl: fmt.Sprintf("http://workspace-service/workspaces/%s", workspaceId), + WorkspaceId: &workspaceUUID, + ScanOptions: scanOptions, + }, + Type: "workspace", + } // https://snyk.roadie.so/catalog/default/api/orchestration-service_2024-02-16_experimental t.Run("Create scan", func(t *testing.T) { - pact.AddInteraction().Given("New scan").UponReceiving("Trigger scan").WithRequest(dsl.Request{ + pact.AddInteraction().Given("New scan").UponReceiving("Trigger scan").WithCompleteRequest(consumer.Request{ Method: "POST", - Path: dsl.String(fmt.Sprintf("/orgs/%s/scans", orgUUID)), - Query: dsl.MapMatcher{ - "version": dsl.String("2024-02-16~experimental"), + Path: matchers.String(fmt.Sprintf("/orgs/%s/scans", orgUUID)), + Query: matchers.MapMatcher{ + "version": matchers.String("2024-02-16~experimental"), }, Headers: getHeaderMatcher(), Body: getBodyMatcher(), - }).WillRespondWith(dsl.Response{ - Status: 201, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/vnd.api+json"), + }).WithCompleteResponse(consumer.Response{ + Status: 201, + Headers: getResponseHeaderMatcher(), + Body: getResponseBodyMatcher(), + }) + + test := func(config consumer.MockServerConfig) error { + client, err := v20240216.NewClientWithResponses(fmt.Sprintf("http://localhost:%d", config.Port), v20240216.WithHTTPClient(httpClient)) + require.NoError(t, err) + _, err = client.CreateScanWorkspaceJobForUserWithApplicationVndAPIPlusJSONBodyWithResponse( + context.Background(), + uuid.MustParse(orgUUID), + &v20240216.CreateScanWorkspaceJobForUserParams{ + Version: "2024-02-16~experimental", + }, + v20240216.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: createScanData}) + if err != nil { + return err + } + return nil + } + + err := pact.ExecuteTest(t, test) + + if err != nil { + t.Fatalf("Error on verify: %v", err) + } + }) + + t.Run("Create incremental scan", func(t *testing.T) { + pact.AddInteraction().Given("New incremental scan").UponReceiving("Trigger new incremental scan").WithCompleteRequest(consumer.Request{ + Method: "POST", + Path: matchers.String(fmt.Sprintf("/orgs/%s/scans", orgUUID)), + Query: matchers.MapMatcher{ + "version": matchers.String("2024-02-16~experimental"), }, - Body: dsl.Like(map[string]interface{}{ - "data": dsl.Like(map[string]interface{}{ - "attributes": dsl.Like(map[string]interface{}{ - "created_at": dsl.Timestamp(), - "status": dsl.String("success"), - }), - "type": dsl.String("workspace"), - }), - }), + Headers: getHeaderMatcher(), + Body: getBodyMatcherForIncrementalScan(), + }).WithCompleteResponse(consumer.Response{ + Status: 201, + Headers: getResponseHeaderMatcher(), + Body: getResponseBodyMatcher(), }) - flow := scans.Flow{} - err := flow.UnmarshalJSON([]byte(`{"name": "cli_test"}`)) - require.NoError(t, err) + data := createScanData + data.Attributes.ScanOptions = scanOptionsIncrementalScan - test := func() error { + test := func(config consumer.MockServerConfig) error { + client, err := v20240216.NewClientWithResponses(fmt.Sprintf("http://localhost:%d", config.Port), v20240216.WithHTTPClient(httpClient)) + require.NoError(t, err) _, err = client.CreateScanWorkspaceJobForUserWithApplicationVndAPIPlusJSONBodyWithResponse( context.Background(), uuid.MustParse(orgUUID), &v20240216.CreateScanWorkspaceJobForUserParams{ Version: "2024-02-16~experimental", }, - v20240216.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{ - Data: struct { - Attributes struct { - Flow scans.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } `json:"attributes"` - Id *openapi_types.UUID `json:"id,omitempty"` - Type scans.PostScanRequestDataType `json:"type"` - }(struct { - Attributes struct { - Flow scans.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - } - Id *openapi_types.UUID - Type scans.PostScanRequestDataType - }{ - Attributes: struct { - Flow scans.Flow `json:"flow"` - WorkspaceUrl string `json:"workspace_url"` - }(struct { - Flow scans.Flow - WorkspaceUrl string - }{ - Flow: flow, - WorkspaceUrl: fmt.Sprintf("http://workspace-service/workspaces/%s", workspaceId), - }), - Type: "cli", - })}) + v20240216.CreateScanWorkspaceJobForUserApplicationVndAPIPlusJSONRequestBody{Data: data}) if err != nil { return err } return nil } - err = pact.Verify(test) + err := pact.ExecuteTest(t, test) if err != nil { t.Fatalf("Error on verify: %v", err) @@ -142,23 +186,24 @@ func TestOrchestrationClientPact(t *testing.T) { t.Run("Get scan", func(t *testing.T) { id := uuid.New() - pact.AddInteraction().Given("Scan ID").UponReceiving("Retrieve scan").WithRequest(dsl.Request{ + pact.AddInteraction().Given("Scan ID").UponReceiving("Retrieve scan").WithCompleteRequest(consumer.Request{ Method: "GET", - Path: dsl.String(fmt.Sprintf("/orgs/%s/scans/%s", orgUUID, id.String())), - Query: dsl.MapMatcher{ - "version": dsl.String("2024-02-16~experimental"), + Path: matchers.String(fmt.Sprintf("/orgs/%s/scans/%s", orgUUID, id.String())), + Query: matchers.MapMatcher{ + "version": matchers.String("2024-02-16~experimental"), }, - Headers: dsl.MapMatcher{}, - }).WillRespondWith(dsl.Response{ + Headers: matchers.MapMatcher{}, + }).WithCompleteResponse(consumer.Response{ Status: 201, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String(" application/vnd.api+json"), }, - Body: dsl.Match(scans.ScanResultsResponse{}), + Body: scans.ScanResultsResponse{}, }) - test := func() error { - _, err := client.GetScanWorkspaceJobForUserWithResponse( + test := func(config consumer.MockServerConfig) error { + client, err := v20240216.NewClientWithResponses(fmt.Sprintf("http://localhost:%d", config.Port), v20240216.WithHTTPClient(httpClient)) + _, err = client.GetScanWorkspaceJobForUserWithResponse( context.Background(), uuid.MustParse(orgUUID), id, @@ -169,7 +214,7 @@ func TestOrchestrationClientPact(t *testing.T) { return nil } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) if err != nil { t.Fatalf("Error on verify: %v", err) @@ -177,24 +222,42 @@ func TestOrchestrationClientPact(t *testing.T) { }) } +func getResponseHeaderMatcher() matchers.MapMatcher { + return matchers.MapMatcher{ + "Content-Type": matchers.String("application/vnd.api+json"), + } +} + +func getResponseBodyMatcher() matchers.Matcher { + return matchers.Like(map[string]interface{}{ + "data": matchers.Like(map[string]interface{}{ + "attributes": matchers.Like(map[string]interface{}{ + "created_at": matchers.Timestamp(), + "status": matchers.String("success"), + }), + "type": matchers.String("workspace"), + }), + }) +} + func setupPact(t *testing.T) { t.Helper() // Proactively start service to get access to the port - pact = dsl.Pact{ - Consumer: consumer, + config := consumer.MockHTTPProviderConfig{ + Consumer: consumerName, Provider: pactProvider, PactDir: pactDir, } + var err error + pact, err = consumer.NewV2Pact(config) - pact.Setup(true) - - restApi := fmt.Sprintf("http://localhost:%d", pact.Server.Port) + require.NoError(t, err) logger := zerolog.New(zerolog.NewTestWriter(t)) instrumentor := testutil.NewTestInstrumentor() errorReporter := testutil.NewTestErrorReporter() - httpClient := codeClientHTTP.NewHTTPClient( + httpClient = codeClientHTTP.NewHTTPClient( func() *http.Client { return http.DefaultClient }, @@ -203,29 +266,56 @@ func setupPact(t *testing.T) { codeClientHTTP.WithErrorReporter(errorReporter), codeClientHTTP.WithLogger(&logger), ) - var err error - client, err = v20240216.NewClientWithResponses(restApi, v20240216.WithHTTPClient(httpClient)) require.NoError(t, err) } -func getHeaderMatcher() dsl.MapMatcher { - return dsl.MapMatcher{} +func getHeaderMatcher() matchers.MapMatcher { + return matchers.MapMatcher{ + "Content-Type": matchers.S("application/vnd.api+json"), + } +} + +func getBodyMatcher() matchers.Matcher { + return matchers.Like(map[string]interface{}{ + "data": matchers.Like(map[string]interface{}{ + "attributes": matchers.Like(map[string]interface{}{ + "flow": matchers.MapMatcher{ + "name": matchers.String("ide_test"), + }, + "workspace_id": getWorkspaceUUIDMatcher(), + "workspace_url": getWorkspaceIDMatcher(), + }), + "type": matchers.String("ide"), + }), + }) } -func getBodyMatcher() dsl.Matcher { - return dsl.Like(map[string]interface{}{ - "data": dsl.Like(map[string]interface{}{ - "attributes": dsl.Like(map[string]interface{}{ - "flow": dsl.MapMatcher{ - "name": dsl.String("ide"), +func getBodyMatcherForIncrementalScan() matchers.Matcher { + return matchers.Like(map[string]interface{}{ + "data": matchers.Like(map[string]interface{}{ + "attributes": matchers.Like(map[string]interface{}{ + "flow": matchers.MapMatcher{ + "name": matchers.String("ide_test"), }, + "scan_options": matchers.MapMatcher{ + "limit_scan_to_files": getIncrementalScanOptionsMatcher(), + }, + "workspace_id": getWorkspaceUUIDMatcher(), "workspace_url": getWorkspaceIDMatcher(), }), - "type": dsl.String("cli"), + "type": matchers.String("ide"), }), }) } -func getWorkspaceIDMatcher() dsl.Matcher { - return dsl.Regex("http://workspace-service/workspaces/fc763eba-0905-41c5-a27f-3934ab26786c", uuidMatcher) +func getIncrementalScanOptionsMatcher() matchers.Matcher { + return matchers.ArrayMinLike("fileA", 2) +} + +func getWorkspaceIDMatcher() matchers.Matcher { + return matchers.Regex("http://workspace-service/workspaces/fc763eba-0905-41c5-a27f-3934ab26786c", uuidTailRegex) +} + +func getWorkspaceUUIDMatcher() matchers.Matcher { + return matchers.Regex("fc763eba-0905-41c5-a27f-3934ab26786c", uuidRegex) } diff --git a/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json b/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json index 72f9450..be83d51 100644 --- a/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json +++ b/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json @@ -2,28 +2,32 @@ "consumer": { "name": "code-client-go" }, - "provider": { - "name": "OrchestrationApi" - }, "interactions": [ { - "description": "Trigger scan", - "providerState": "New scan", + "description": "Trigger new incremental scan", + "providerState": "New incremental scan", "request": { - "method": "POST", - "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans", - "query": "version=2024-02-16%7Eexperimental", "body": { "data": { "attributes": { "flow": { - "name": "cli_test" + "name": "ide_test" }, + "scan_options": { + "limit_scan_to_files": [ + "fileA", + "fileA" + ] + }, + "workspace_id": "fc763eba-0905-41c5-a27f-3934ab26786c", "workspace_url": "http://workspace-service/workspaces/fc763eba-0905-41c5-a27f-3934ab26786c" }, - "type": "cli" + "type": "ide" } }, + "headers": { + "Content-Type": "application/vnd.api+json" + }, "matchingRules": { "$.body": { "match": "type" @@ -34,17 +38,24 @@ "$.body.data.attributes": { "match": "type" }, + "$.body.data.attributes.scan_options.limit_scan_to_files": { + "match": "type", + "min": 2 + }, + "$.body.data.attributes.workspace_id": { + "match": "regex", + "regex": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + }, "$.body.data.attributes.workspace_url": { "match": "regex", "regex": "^.+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" } - } + }, + "method": "POST", + "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans", + "query": "version=2024-02-16%7eexperimental" }, "response": { - "status": 201, - "headers": { - "Content-Type": "application/vnd.api+json" - }, "body": { "data": { "attributes": { @@ -54,6 +65,9 @@ "type": "workspace" } }, + "headers": { + "Content-Type": "application/vnd.api+json" + }, "matchingRules": { "$.body": { "match": "type" @@ -68,96 +82,121 @@ "match": "regex", "regex": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" } - } + }, + "status": 201 } }, { - "description": "Retrieve scan", - "providerState": "Scan ID", + "description": "Trigger scan", + "providerState": "New scan", "request": { - "method": "GET", - "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans/9c6ec15d-4d21-4a9b-9de8-b53672446ee3", - "query": "version=2024-02-16%7Eexperimental" - }, - "response": { - "status": 201, - "headers": { - "Content-Type": "application/json" - }, "body": { "data": { "attributes": { - "components": [ - { - "created_at": { - }, - "findings_url": "string", - "id": "string", - "name": "string", - "type": "string" - } - ], - "created_at": { + "flow": { + "name": "ide_test" }, - "status": "string" + "workspace_id": "fc763eba-0905-41c5-a27f-3934ab26786c", + "workspace_url": "http://workspace-service/workspaces/fc763eba-0905-41c5-a27f-3934ab26786c" }, - "id": [ - 1 - ], - "type": "string" - }, - "jsonapi": { - "version": "string" - }, - "links": { - "self": { - } + "type": "ide" } }, + "headers": { + "Content-Type": "application/vnd.api+json" + }, "matchingRules": { - "$.body.data.attributes.components": { - "min": 1 - }, - "$.body.data.attributes.components[*].*": { - "match": "type" - }, - "$.body.data.attributes.components[*].findings_url": { - "match": "type" - }, - "$.body.data.attributes.components[*].id": { - "match": "type" - }, - "$.body.data.attributes.components[*].name": { + "$.body": { "match": "type" }, - "$.body.data.attributes.components[*].type": { + "$.body.data": { "match": "type" }, - "$.body.data.attributes.status": { + "$.body.data.attributes": { "match": "type" }, - "$.body.data.id": { - "min": 1 + "$.body.data.attributes.workspace_id": { + "match": "regex", + "regex": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" }, - "$.body.data.id[*].*": { + "$.body.data.attributes.workspace_url": { + "match": "regex", + "regex": "^.+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + } + }, + "method": "POST", + "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans", + "query": "version=2024-02-16%7eexperimental" + }, + "response": { + "body": { + "data": { + "attributes": { + "created_at": "2000-02-01T12:30:00Z", + "status": "success" + }, + "type": "workspace" + } + }, + "headers": { + "Content-Type": "application/vnd.api+json" + }, + "matchingRules": { + "$.body": { "match": "type" }, - "$.body.data.id[*]": { + "$.body.data": { "match": "type" }, - "$.body.data.type": { + "$.body.data.attributes": { "match": "type" }, - "$.body.jsonapi.version": { - "match": "type" + "$.body.data.attributes.created_at": { + "match": "regex", + "regex": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" } - } + }, + "status": 201 + } + }, + { + "description": "Retrieve scan", + "providerState": "Scan ID", + "request": { + "method": "GET", + "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans/dc0d9f32-3081-4694-8052-1f4465b4ff43", + "query": "version=2024-02-16%7eexperimental" + }, + "response": { + "body": { + "data": { + "attributes": { + "components": null, + "created_at": "0001-01-01T00:00:00Z", + "status": "" + }, + "id": "00000000-0000-0000-0000-000000000000", + "type": "" + } + }, + "headers": { + "Content-Type": " application/vnd.api+json" + }, + "status": 201 } } ], "metadata": { + "pactRust": { + "ffi": "0.4.16", + "mockserver": "1.2.5", + "models": "1.1.19" + }, "pactSpecification": { "version": "2.0.0" } + }, + "provider": { + "name": "OrchestrationApi" } } \ No newline at end of file diff --git a/tools.go b/tools.go index eab80ce..eb5800c 100644 --- a/tools.go +++ b/tools.go @@ -5,4 +5,5 @@ package codeClient import ( _ "github.com/deepmap/oapi-codegen/cmd/oapi-codegen" _ "github.com/golang/mock/mockgen" + _ "github.com/pact-foundation/pact-go/v2" ) From d75574d1a9607ab0a3383a23de3fc52af1aeb604 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Tue, 4 Jun 2024 13:52:46 +0200 Subject: [PATCH 08/19] fix: typo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c50a594..d1a9484 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ jobs: name: Install tools command: make tools - run: - name: Run smoke tests + name: Run contract tests command: make contract-test build: executor: default From 294cdddb6cb3af0af4f0f6d668bbd22a19870e64 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Tue, 4 Jun 2024 15:32:08 +0200 Subject: [PATCH 09/19] fix: pact tests and smoke tests --- Makefile | 2 +- go.mod | 1 - go.sum | 117 +------------ internal/analysis/analysis.go | 1 + internal/deepcode/client_pact_test.go | 161 +++++++++--------- .../2024-02-16/client_pact_test.go | 5 +- .../workspace/2024-05-14/client_pact_test.go | 76 ++++----- 7 files changed, 121 insertions(+), 242 deletions(-) diff --git a/Makefile b/Makefile index 8636930..5a04c99 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ $(TOOLS_BIN)/golangci-lint: $(TOOLS_BIN)/go: mkdir -p ${TOOLS_BIN}/go @cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % sh -c 'GOBIN=${TOOLS_BIN}/go go install %' - @${TOOLS_BIN}/go/pact-go -l DEBUG install + @GOBIN=${TOOLS_BIN}/go ${TOOLS_BIN}/go/pact-go -l DEBUG install -d /tmp .PHONY: format format: diff --git a/go.mod b/go.mod index ad14380..0a0ae28 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/oapi-codegen/runtime v1.0.0 - github.com/pact-foundation/pact-go v1.8.0 github.com/pact-foundation/pact-go/v2 v2.0.5 github.com/pkg/errors v0.9.1 github.com/puzpuzpuz/xsync v1.5.2 diff --git a/go.sum b/go.sum index 994314d..c7d25df 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= @@ -38,18 +36,15 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1 github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/bytedance/sonic v1.10.0-rc3 h1:uNSnscRapXTwUgTyOF0GVljYD08p9X/Lbr9MweSV3V0= github.com/bytedance/sonic v1.10.0-rc3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -57,16 +52,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.14.0 h1:b51/kQwH69rjN5pu+8j/Q5fUGD/rUclLAcGLQWQwa3E= -github.com/deepmap/oapi-codegen v1.14.0/go.mod h1:QcEpzjVDwJEH3Fq6I7XYkI0M/JwvoL82ToYveaeVMAw= github.com/deepmap/oapi-codegen v1.16.3 h1:GT9G86SbQtT1r8ZB+4Cybi9VGdu1P5ieNvNdEoCSbrA= github.com/deepmap/oapi-codegen v1.16.3/go.mod h1:JD6ErqeX0nYnhdciLc61Konj3NBASREMlkHOgHn8WAM= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -79,8 +70,6 @@ github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFd github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= @@ -93,107 +82,66 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/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.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/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v1.4.0/go.mod h1:YtmJZDLbF1YYNrlNAuiO5zAStUWc3XZT07iGsVqe1Os= -github.com/graph-gophers/graphql-transport-ws v0.0.2/go.mod h1:5BVKvFzOd2BalVIBFfnfmHjpJi/MZ5rOj8G55mXvZ8g= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hasura/go-graphql-client v0.8.1/go.mod h1:NVifIwv+YFIUYGLQ7SM2/vBbzS/9rFP4vmIf/vf/zXM= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= -github.com/iris-contrib/httpexpect/v2 v2.15.1 h1:G2/TW0EZ5UhNNdljNDBBQDfdfumLlV6ljRqdTk3cAmc= -github.com/iris-contrib/httpexpect/v2 v2.15.1/go.mod h1:cUwf1Mm5CWs5ahZNHtDq82WuGOitAWBg/eMGevX9ilg= github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= +github.com/iris-contrib/httpexpect/v2 v2.15.2/go.mod h1:JLDgIqnFy5loDSUv1OA2j0mb6p/rDhiCqigP22Uq9xE= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= @@ -201,8 +149,6 @@ github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= -github.com/kataras/iris/v12 v12.2.5 h1:R5UzUW4MIByBM6tKMG3UqJ7hL1JCEE+dkqQ8L72f6PU= -github.com/kataras/iris/v12 v12.2.5/go.mod h1:bf3oblPF8tQmRgyPCzPZr0mLazvEDFgImdaGZYuN4hw= github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 h1:Vx8kDVhO2qepK8w44lBtp+RzN3ld743i+LYPzODJSpQ= github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9/go.mod h1:ldkoR3iXABBeqlTibQ3MYaviA1oSlPvim6f55biwBh4= github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w= @@ -213,8 +159,6 @@ github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -232,7 +176,6 @@ github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUU github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= @@ -244,7 +187,6 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -257,8 +199,6 @@ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTS github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= @@ -268,9 +208,6 @@ github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7o github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pact-foundation/pact-go v1.8.0 h1:On9JjJZrzwqmT2UICedWqLpcAtqVyd/ktt0SVJFTdL4= -github.com/pact-foundation/pact-go v1.8.0/go.mod h1:YLt/uSQGo9x5ZUjynLzNy3IiORlA4BtbR9p2yxgD2as= github.com/pact-foundation/pact-go/v2 v2.0.5 h1:t7Ngeug5TYYREKYBLAb+jmNUB84mJdBNTYRAfPLyY90= github.com/pact-foundation/pact-go/v2 v2.0.5/go.mod h1:OO003128Co8mczCV7UrD6kmeCdyxFOAv4dt3BFvqy5E= github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= @@ -285,7 +222,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY= github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= @@ -309,7 +245,6 @@ github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2 github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -332,21 +267,15 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tdewolff/minify/v2 v2.12.8 h1:Q2BqOTmlMjoutkuD/OPCnJUpIqrzT3nRPkw+q+KpXS0= -github.com/tdewolff/minify/v2 v2.12.8/go.mod h1:YRgk7CC21LZnbuke2fmYnCTq+zhCgpb0yJACOTUNJ1E= github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= -github.com/tdewolff/parse/v2 v2.6.7 h1:WrFllrqmzAcrKHzoYgMupqgUBIfBVOb0yscFzDf8bBg= -github.com/tdewolff/parse/v2 v2.6.7/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -378,24 +307,17 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI= -go.opentelemetry.io/otel/trace v1.6.3/go.mod h1:GNJQusJlUgZl9/TQBPKU/Y/ty+0iVB5fjhKeJGZPGFs= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -404,10 +326,6 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -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-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-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -421,20 +339,15 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -464,7 +377,6 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -473,14 +385,9 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= @@ -490,29 +397,11 @@ golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -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.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -526,7 +415,6 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -534,10 +422,7 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index 75abd7b..a64ab89 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -163,6 +163,7 @@ func (a *analysisOrchestrator) CreateWorkspace(ctx context.Context, orgId string BundleId: bundleHash, RepositoryUri: repositoryTarget.GetRepositoryUrl(), WorkspaceType: "file_bundle_workspace", + RootFolderId: target.GetPath(), }), Type: "workspace", }), diff --git a/internal/deepcode/client_pact_test.go b/internal/deepcode/client_pact_test.go index c868ac1..19abbeb 100644 --- a/internal/deepcode/client_pact_test.go +++ b/internal/deepcode/client_pact_test.go @@ -21,12 +21,15 @@ package deepcode_test import ( "context" "fmt" - "github.com/golang/mock/gomock" - "github.com/pact-foundation/pact-go/dsl" - "github.com/stretchr/testify/assert" "net/http" "testing" + "github.com/golang/mock/gomock" + "github.com/pact-foundation/pact-go/v2/consumer" + "github.com/pact-foundation/pact-go/v2/matchers" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + confMocks "github.com/snyk/code-client-go/config/mocks" codeClientHTTP "github.com/snyk/code-client-go/http" "github.com/snyk/code-client-go/internal/deepcode" @@ -35,7 +38,7 @@ import ( ) const ( - consumer = "code-client-go" + consumerName = "code-client-go" pactDir = "./pacts" pactProvider = "SnykCodeApi" @@ -44,34 +47,29 @@ const ( ) // Common test data -var pact dsl.Pact -var client deepcode.DeepcodeClient +var ( + pact *consumer.V2HTTPMockProvider +) func TestSnykCodeClientPact(t *testing.T) { setupPact(t) - defer pact.Teardown() - - defer func() { - if err := pact.WritePact(); err != nil { - t.Fatal(err) - } - }() t.Run("Create bundle", func(t *testing.T) { - pact.AddInteraction().Given("New bundle").UponReceiving("Create bundle").WithRequest(dsl.Request{ + pact.AddInteraction().Given("New bundle").UponReceiving("Create bundle").WithCompleteRequest(consumer.Request{ Method: "POST", - Path: dsl.String("/bundle"), + Path: matchers.String("/bundle"), Headers: getPutPostHeaderMatcher(), Body: getPutPostBodyMatcher(), - }).WillRespondWith(dsl.Response{ + }).WithCompleteResponse(consumer.Response{ Status: 200, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json"), }, - Body: dsl.Match(deepcode.BundleResponse{}), + Body: matchers.MatchV2(deepcode.BundleResponse{}), }) - test := func() error { + test := func(config consumer.MockServerConfig) error { + client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) files := make(map[string]string) files[path1] = util.Hash([]byte(content)) bundleHash, missingFiles, err := client.CreateBundle(context.Background(), files) @@ -89,7 +87,7 @@ func TestSnykCodeClientPact(t *testing.T) { return nil } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) if err != nil { t.Fatalf("Error on verify: %v", err) @@ -97,22 +95,23 @@ func TestSnykCodeClientPact(t *testing.T) { }) t.Run("Create bundle with invalid token", func(t *testing.T) { - pact.AddInteraction().Given("New bundle and invalid token").UponReceiving("Create bundle").WithRequest(dsl.Request{ + pact.AddInteraction().Given("New bundle and invalid token").UponReceiving("Create bundle").WithCompleteRequest(consumer.Request{ Method: "POST", - Path: dsl.String("/bundle"), + Path: matchers.String("/bundle"), Headers: getPutPostHeaderMatcher(), Body: getPutPostBodyMatcher(), - }).WillRespondWith(dsl.Response{ + }).WithCompleteResponse(consumer.Response{ Status: 401, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json; charset=utf-8"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json; charset=utf-8"), }, Body: map[string]string{ "message": "Invalid auth token provided", }, }) - test := func() error { + test := func(config consumer.MockServerConfig) error { + client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) files := make(map[string]string) files[path1] = util.Hash([]byte(content)) _, _, err := client.CreateBundle(context.Background(), files) @@ -124,7 +123,7 @@ func TestSnykCodeClientPact(t *testing.T) { return fmt.Errorf("no error returned") } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) if err != nil { t.Fatalf("Error on verify: %v", err) @@ -134,20 +133,21 @@ func TestSnykCodeClientPact(t *testing.T) { t.Run("Extend bundle", func(*testing.T) { bundleHash := "faa6b7161c14f933ef4ca79a18ad9283eab362d5e6d3a977125eb95b37c377d8" - pact.AddInteraction().Given("Existing bundle").UponReceiving("Extend bundle").WithRequest(dsl.Request{ + pact.AddInteraction().Given("Existing bundle").UponReceiving("Extend bundle").WithCompleteRequest(consumer.Request{ Method: "PUT", - Path: dsl.Term("/bundle/"+bundleHash, "/bundle/[A-Fa-f0-9]{64}"), + Path: matchers.Term("/bundle/"+bundleHash, "/bundle/[A-Fa-f0-9]{64}"), Headers: getPutPostHeaderMatcher(), Body: getPutPostBodyMatcher(), - }).WillRespondWith(dsl.Response{ + }).WithCompleteResponse(consumer.Response{ Status: 200, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json"), }, - Body: dsl.Match(deepcode.BundleResponse{}), + Body: matchers.MatchV2(deepcode.BundleResponse{}), }) - test := func() error { + test := func(config consumer.MockServerConfig) error { + client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) filesExtend := createTestExtendMap() var removedFiles []string @@ -166,7 +166,7 @@ func TestSnykCodeClientPact(t *testing.T) { return nil } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) if err != nil { t.Fatalf("Error on verify: %v", err) @@ -174,22 +174,23 @@ func TestSnykCodeClientPact(t *testing.T) { }) t.Run("Get filters", func(*testing.T) { - pact.AddInteraction().UponReceiving("Get filters").WithRequest(dsl.Request{ + pact.AddInteraction().UponReceiving("Get filters").WithCompleteRequest(consumer.Request{ Method: "GET", - Path: dsl.String("/filters"), - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Path: matchers.String("/filters"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json"), "snyk-request-id": getSnykRequestIdMatcher(), }, - }).WillRespondWith(dsl.Response{ + }).WithCompleteResponse(consumer.Response{ Status: 200, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json"), }, - Body: dsl.Match(deepcode.FiltersResponse{}), + Body: matchers.MatchV2(deepcode.FiltersResponse{}), }) - test := func() error { + test := func(config consumer.MockServerConfig) error { + client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) if _, err := client.GetFilters(context.Background()); err != nil { return err } @@ -197,7 +198,7 @@ func TestSnykCodeClientPact(t *testing.T) { return nil } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) assert.NoError(t, err) }) @@ -206,21 +207,18 @@ func TestSnykCodeClientPact(t *testing.T) { func setupPact(t *testing.T) { t.Helper() - // Proactively start service to get access to the port - pact = dsl.Pact{ - Consumer: consumer, + pactConfig := consumer.MockHTTPProviderConfig{ + Consumer: consumerName, Provider: pactProvider, PactDir: pactDir, } + var err error + pact, err = consumer.NewV2Pact(pactConfig) + require.NoError(t, err) +} - pact.Setup(true) - ctrl := gomock.NewController(t) - config := confMocks.NewMockConfig(ctrl) - config.EXPECT().IsFedramp().AnyTimes().Return(false) - config.EXPECT().Organization().AnyTimes().Return(orgUUID) - snykCodeApiUrl := fmt.Sprintf("http://localhost:%d", pact.Server.Port) - config.EXPECT().SnykCodeApi().AnyTimes().Return(snykCodeApiUrl) - +func getDeepCodeClient(t *testing.T, snykCodeApiUrl string) deepcode.DeepcodeClient { + t.Helper() instrumentor := testutil.NewTestInstrumentor() errorReporter := testutil.NewTestErrorReporter() httpClient := codeClientHTTP.NewHTTPClient( @@ -232,54 +230,59 @@ func setupPact(t *testing.T) { codeClientHTTP.WithErrorReporter(errorReporter), codeClientHTTP.WithLogger(newLogger(t)), ) - client = deepcode.NewDeepcodeClient(config, httpClient, newLogger(t), instrumentor, errorReporter) + + ctrl := gomock.NewController(t) + config := confMocks.NewMockConfig(ctrl) + config.EXPECT().IsFedramp().AnyTimes().Return(false) + config.EXPECT().Organization().AnyTimes().Return(orgUUID) + config.EXPECT().SnykCodeApi().AnyTimes().Return(snykCodeApiUrl) + return deepcode.NewDeepcodeClient(config, httpClient, newLogger(t), instrumentor, errorReporter) } -func getPutPostHeaderMatcher() dsl.MapMatcher { - return dsl.MapMatcher{ - "Content-Type": dsl.String("application/octet-stream"), - "Content-Encoding": dsl.String("gzip"), - "snyk-org-name": dsl.Regex(orgUUID, uuidMatcher), +func getPutPostHeaderMatcher() matchers.MapMatcher { + return matchers.MapMatcher{ + "Content-Type": matchers.S("application/octet-stream"), + "Content-Encoding": matchers.S("gzip"), + "snyk-org-name": matchers.Regex(orgUUID, uuidMatcher), "snyk-request-id": getSnykRequestIdMatcher(), } } -func getPutPostBodyMatcher() dsl.Matcher { - return dsl.Like(make([]byte, 1)) +func getPutPostBodyMatcher() matchers.Matcher { + return matchers.Like(make([]byte, 1)) } -func getSnykRequestIdMatcher() dsl.Matcher { - return dsl.Regex("fc763eba-0905-41c5-a27f-3934ab26786c", uuidMatcher) +func getSnykRequestIdMatcher() matchers.Matcher { + return matchers.Regex("fc763eba-0905-41c5-a27f-3934ab26786c", uuidMatcher) } func TestSnykCodeClientPact_LocalCodeEngine(t *testing.T) { setupPact(t) - defer pact.Teardown() - - pact.AddInteraction().UponReceiving("Get filters").WithRequest(dsl.Request{ + pact.AddInteraction().UponReceiving("Get filters").WithCompleteRequest(consumer.Request{ Method: "GET", - Path: dsl.String("/filters"), - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Path: matchers.String("/filters"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json"), "snyk-request-id": getSnykRequestIdMatcher(), }, - }).WillRespondWith(dsl.Response{ + }).WithCompleteResponse(consumer.Response{ Status: 200, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/json"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/json"), }, - Body: dsl.Match(deepcode.FiltersResponse{}), + Body: matchers.MatchV2(deepcode.FiltersResponse{}), }) - test := func() error { + test := func(config consumer.MockServerConfig) error { + client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) if _, err := client.GetFilters(context.Background()); err != nil { return err } return nil } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) assert.NoError(t, err) } diff --git a/internal/orchestration/2024-02-16/client_pact_test.go b/internal/orchestration/2024-02-16/client_pact_test.go index 0ffb9bd..2f7c949 100644 --- a/internal/orchestration/2024-02-16/client_pact_test.go +++ b/internal/orchestration/2024-02-16/client_pact_test.go @@ -60,10 +60,7 @@ var ( }{ LimitScanToFiles: &[]string{"fileA", "fileB"}, } -) -// Common test data -var ( pact *consumer.V2HTTPMockProvider httpClient v20240216.HttpRequestDoer ) @@ -203,6 +200,7 @@ func TestOrchestrationClientPact(t *testing.T) { test := func(config consumer.MockServerConfig) error { client, err := v20240216.NewClientWithResponses(fmt.Sprintf("http://localhost:%d", config.Port), v20240216.WithHTTPClient(httpClient)) + require.NoError(t, err) _, err = client.GetScanWorkspaceJobForUserWithResponse( context.Background(), uuid.MustParse(orgUUID), @@ -243,7 +241,6 @@ func getResponseBodyMatcher() matchers.Matcher { func setupPact(t *testing.T) { t.Helper() - // Proactively start service to get access to the port config := consumer.MockHTTPProviderConfig{ Consumer: consumerName, Provider: pactProvider, diff --git a/internal/workspace/2024-05-14/client_pact_test.go b/internal/workspace/2024-05-14/client_pact_test.go index b91ce9d..1857e39 100644 --- a/internal/workspace/2024-05-14/client_pact_test.go +++ b/internal/workspace/2024-05-14/client_pact_test.go @@ -25,60 +25,59 @@ import ( "testing" "github.com/google/uuid" - "github.com/pact-foundation/pact-go/dsl" + "github.com/pact-foundation/pact-go/v2/consumer" + "github.com/pact-foundation/pact-go/v2/matchers" "github.com/rs/zerolog" "github.com/stretchr/testify/require" codeClientHTTP "github.com/snyk/code-client-go/http" + v20240216 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16" "github.com/snyk/code-client-go/internal/util/testutil" v20240514 "github.com/snyk/code-client-go/internal/workspace/2024-05-14" workspaces "github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces" ) const ( - consumer = "code-client-go" + consumerName = "code-client-go" pactDir = "./pacts" pactProvider = "WorkspaceApi" - orgUUID = "e7ea34c9-de0f-422c-bf2c-4654c2e2da90" - requestId = "b6ea34c9-de0f-422c-bf2c-4654c2e2da90" - uuidMatcher = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + orgUUID = "e7ea34c9-de0f-422c-bf2c-4654c2e2da90" + requestId = "b6ea34c9-de0f-422c-bf2c-4654c2e2da90" + uuidRegex = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" ) // Common test data -var pact dsl.Pact -var client *v20240514.ClientWithResponses +var ( + pact *consumer.V2HTTPMockProvider + httpClient v20240216.HttpRequestDoer +) func TestWorkspaceClientPact(t *testing.T) { setupPact(t) - defer pact.Teardown() - - defer func() { - if err := pact.WritePact(); err != nil { - t.Fatal(err) - } - }() // https://snyk.roadie.so/catalog/default/api/workspace-service_2024-05-14_experimental t.Run("Create workspace", func(t *testing.T) { - pact.AddInteraction().Given("New workspace").UponReceiving("Create workspace").WithRequest(dsl.Request{ + pact.AddInteraction().Given("New workspace").UponReceiving("Create workspace").WithCompleteRequest(consumer.Request{ Method: "POST", - Path: dsl.String(fmt.Sprintf("/orgs/%s/workspaces", orgUUID)), - Query: dsl.MapMatcher{ - "version": dsl.String("2024-05-14~experimental"), + Path: matchers.String(fmt.Sprintf("/orgs/%s/workspaces", orgUUID)), + Query: matchers.MapMatcher{ + "version": matchers.String("2024-05-14~experimental"), }, Headers: getHeaderMatcher(), Body: getBodyMatcher(), - }).WillRespondWith(dsl.Response{ + }).WithCompleteResponse(consumer.Response{ Status: 200, - Headers: dsl.MapMatcher{ - "Content-Type": dsl.String("application/vnd.api+json"), + Headers: matchers.MapMatcher{ + "Content-Type": matchers.String("application/vnd.api+json"), }, - Body: dsl.Match(workspaces.WorkspacePostResponse{}), + Body: matchers.MatchV2(workspaces.WorkspacePostResponse{}), }) - test := func() error { - _, err := client.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse( + test := func(config consumer.MockServerConfig) error { + client, err := v20240514.NewClientWithResponses(fmt.Sprintf("http://localhost:%d", config.Port), v20240514.WithHTTPClient(httpClient)) + require.NoError(t, err) + _, err = client.CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse( context.Background(), uuid.MustParse(orgUUID), &v20240514.CreateWorkspaceParams{ @@ -115,7 +114,7 @@ func TestWorkspaceClientPact(t *testing.T) { return nil } - err := pact.Verify(test) + err := pact.ExecuteTest(t, test) if err != nil { t.Fatalf("Error on verify: %v", err) @@ -126,21 +125,18 @@ func TestWorkspaceClientPact(t *testing.T) { func setupPact(t *testing.T) { t.Helper() - // Proactively start service to get access to the port - pact = dsl.Pact{ - Consumer: consumer, + config := consumer.MockHTTPProviderConfig{ + Consumer: consumerName, Provider: pactProvider, PactDir: pactDir, } - - pact.Setup(true) - - restApi := fmt.Sprintf("http://localhost:%d", pact.Server.Port) + var err error + pact, err = consumer.NewV2Pact(config) logger := zerolog.New(zerolog.NewTestWriter(t)) instrumentor := testutil.NewTestInstrumentor() errorReporter := testutil.NewTestErrorReporter() - httpClient := codeClientHTTP.NewHTTPClient( + httpClient = codeClientHTTP.NewHTTPClient( func() *http.Client { return http.DefaultClient }, @@ -149,21 +145,19 @@ func setupPact(t *testing.T) { codeClientHTTP.WithErrorReporter(errorReporter), codeClientHTTP.WithLogger(&logger), ) - var err error - client, err = v20240514.NewClientWithResponses(restApi, v20240514.WithHTTPClient(httpClient)) require.NoError(t, err) } -func getHeaderMatcher() dsl.MapMatcher { - return dsl.MapMatcher{ +func getHeaderMatcher() matchers.MapMatcher { + return matchers.MapMatcher{ "Snyk-Request-Id": getSnykRequestIdMatcher(), } } -func getSnykRequestIdMatcher() dsl.Matcher { - return dsl.Regex("fc763eba-0905-41c5-a27f-3934ab26786c", uuidMatcher) +func getSnykRequestIdMatcher() matchers.Matcher { + return matchers.Regex("fc763eba-0905-41c5-a27f-3934ab26786c", uuidRegex) } -func getBodyMatcher() dsl.Matcher { - return dsl.Like(make([]byte, 1)) +func getBodyMatcher() matchers.Matcher { + return matchers.Like(make([]byte, 1)) } From 9b2c6925c569c0be8a2bf390252812501df60459 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Tue, 4 Jun 2024 17:03:01 +0200 Subject: [PATCH 10/19] fix: workspace pact test --- http/http.go | 1 + internal/deepcode/client.go | 7 +- internal/deepcode/client_pact_test.go | 16 +++-- .../pacts/code-client-go-snykcodeapi.json | 37 ++++++----- .../code-client-go-orchestrationapi.json | 2 +- .../workspace/2024-05-14/client_pact_test.go | 6 +- .../pacts/code-client-go-workspaceapi.json | 66 +++++++++++++------ 7 files changed, 85 insertions(+), 50 deletions(-) diff --git a/http/http.go b/http/http.go index c7fa726..0595f3d 100644 --- a/http/http.go +++ b/http/http.go @@ -144,6 +144,7 @@ func (s *httpClient) httpCall(req *http.Request) (*http.Response, error) { req.Body = reqBody log.Debug().Msg("SEND TO REMOTE") } + response, err := s.httpClientFactory().Do(req) req.Body = copyReqBody if response != nil { diff --git a/internal/deepcode/client.go b/internal/deepcode/client.go index c948adb..6958bd8 100644 --- a/internal/deepcode/client.go +++ b/internal/deepcode/client.go @@ -22,14 +22,15 @@ import ( "encoding/json" "errors" "fmt" - "github.com/snyk/code-client-go/config" - "github.com/snyk/code-client-go/internal/util/encoding" "io" "net/http" "net/url" "regexp" "strconv" + "github.com/snyk/code-client-go/config" + "github.com/snyk/code-client-go/internal/util/encoding" + "github.com/rs/zerolog" codeClientHTTP "github.com/snyk/code-client-go/http" @@ -295,5 +296,5 @@ func (s *deepcodeClient) checkResponseCode(r *http.Response) error { if r.StatusCode >= 200 && r.StatusCode <= 299 { return nil } - return fmt.Errorf("Unexpected response code: %s", r.Status) + return fmt.Errorf("unexpected response code: %s (%s)", r.Status, r.Body) } diff --git a/internal/deepcode/client_pact_test.go b/internal/deepcode/client_pact_test.go index 19abbeb..2a670a9 100644 --- a/internal/deepcode/client_pact_test.go +++ b/internal/deepcode/client_pact_test.go @@ -69,7 +69,7 @@ func TestSnykCodeClientPact(t *testing.T) { }) test := func(config consumer.MockServerConfig) error { - client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) + client := getDeepCodeClient(t, getLocalMockserver(config)) files := make(map[string]string) files[path1] = util.Hash([]byte(content)) bundleHash, missingFiles, err := client.CreateBundle(context.Background(), files) @@ -111,7 +111,7 @@ func TestSnykCodeClientPact(t *testing.T) { }) test := func(config consumer.MockServerConfig) error { - client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) + client := getDeepCodeClient(t, getLocalMockserver(config)) files := make(map[string]string) files[path1] = util.Hash([]byte(content)) _, _, err := client.CreateBundle(context.Background(), files) @@ -147,7 +147,7 @@ func TestSnykCodeClientPact(t *testing.T) { }) test := func(config consumer.MockServerConfig) error { - client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) + client := getDeepCodeClient(t, getLocalMockserver(config)) filesExtend := createTestExtendMap() var removedFiles []string @@ -190,7 +190,7 @@ func TestSnykCodeClientPact(t *testing.T) { }) test := func(config consumer.MockServerConfig) error { - client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) + client := getDeepCodeClient(t, getLocalMockserver(config)) if _, err := client.GetFilters(context.Background()); err != nil { return err } @@ -204,6 +204,10 @@ func TestSnykCodeClientPact(t *testing.T) { }) } +func getLocalMockserver(config consumer.MockServerConfig) string { + return fmt.Sprintf("http://%s:%d", config.Host, config.Port) +} + func setupPact(t *testing.T) { t.Helper() @@ -225,7 +229,7 @@ func getDeepCodeClient(t *testing.T, snykCodeApiUrl string) deepcode.DeepcodeCli func() *http.Client { return http.DefaultClient }, - codeClientHTTP.WithRetryCount(3), + codeClientHTTP.WithRetryCount(1), codeClientHTTP.WithInstrumentor(instrumentor), codeClientHTTP.WithErrorReporter(errorReporter), codeClientHTTP.WithLogger(newLogger(t)), @@ -275,7 +279,7 @@ func TestSnykCodeClientPact_LocalCodeEngine(t *testing.T) { }) test := func(config consumer.MockServerConfig) error { - client := getDeepCodeClient(t, fmt.Sprintf("%s:%d", config.Host, config.Port)) + client := getDeepCodeClient(t, getLocalMockserver(config)) if _, err := client.GetFilters(context.Background()); err != nil { return err } diff --git a/internal/deepcode/pacts/code-client-go-snykcodeapi.json b/internal/deepcode/pacts/code-client-go-snykcodeapi.json index f7d00b0..32248f2 100644 --- a/internal/deepcode/pacts/code-client-go-snykcodeapi.json +++ b/internal/deepcode/pacts/code-client-go-snykcodeapi.json @@ -2,31 +2,24 @@ "consumer": { "name": "code-client-go" }, - "provider": { - "name": "SnykCodeApi" - }, "interactions": [ { "description": "Get filters", "request": { - "method": "GET", - "path": "/filters", "headers": { "Content-Type": "application/json", "snyk-request-id": "fc763eba-0905-41c5-a27f-3934ab26786c" }, "matchingRules": { - "$.headers.snyk-request-id": { + "$.header['snyk-request-id']": { "match": "regex", "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" } - } + }, + "method": "GET", + "path": "/filters" }, "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, "body": { "configFiles": [ "string" @@ -35,32 +28,40 @@ "string" ] }, + "headers": { + "Content-Type": "application/json" + }, "matchingRules": { "$.body.configFiles": { + "match": "type", "min": 1 }, - "$.body.configFiles[*].*": { - "match": "type" - }, "$.body.configFiles[*]": { "match": "type" }, "$.body.extensions": { + "match": "type", "min": 1 }, - "$.body.extensions[*].*": { - "match": "type" - }, "$.body.extensions[*]": { "match": "type" } - } + }, + "status": 200 } } ], "metadata": { + "pactRust": { + "ffi": "0.4.16", + "mockserver": "1.2.5", + "models": "1.1.19" + }, "pactSpecification": { "version": "2.0.0" } + }, + "provider": { + "name": "SnykCodeApi" } } \ No newline at end of file diff --git a/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json b/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json index be83d51..61c087f 100644 --- a/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json +++ b/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json @@ -164,7 +164,7 @@ "providerState": "Scan ID", "request": { "method": "GET", - "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans/dc0d9f32-3081-4694-8052-1f4465b4ff43", + "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans/5be49f72-a11f-4670-9657-5f5a9c92cdd7", "query": "version=2024-02-16%7eexperimental" }, "response": { diff --git a/internal/workspace/2024-05-14/client_pact_test.go b/internal/workspace/2024-05-14/client_pact_test.go index 1857e39..1e65a6b 100644 --- a/internal/workspace/2024-05-14/client_pact_test.go +++ b/internal/workspace/2024-05-14/client_pact_test.go @@ -83,6 +83,7 @@ func TestWorkspaceClientPact(t *testing.T) { &v20240514.CreateWorkspaceParams{ Version: "2024-05-14~experimental", SnykRequestId: uuid.MustParse(requestId), + ContentType: "application/vnd.api+json", }, v20240514.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ Data: struct { @@ -140,7 +141,7 @@ func setupPact(t *testing.T) { func() *http.Client { return http.DefaultClient }, - codeClientHTTP.WithRetryCount(3), + codeClientHTTP.WithRetryCount(1), codeClientHTTP.WithInstrumentor(instrumentor), codeClientHTTP.WithErrorReporter(errorReporter), codeClientHTTP.WithLogger(&logger), @@ -151,6 +152,7 @@ func setupPact(t *testing.T) { func getHeaderMatcher() matchers.MapMatcher { return matchers.MapMatcher{ "Snyk-Request-Id": getSnykRequestIdMatcher(), + "Content-Type": matchers.S("application/vnd.api+json"), } } @@ -159,5 +161,5 @@ func getSnykRequestIdMatcher() matchers.Matcher { } func getBodyMatcher() matchers.Matcher { - return matchers.Like(make([]byte, 1)) + return matchers.MatchV2(v20240514.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{}) } diff --git a/internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json b/internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json index be8213d..5b0bf3f 100644 --- a/internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json +++ b/internal/workspace/2024-05-14/pacts/code-client-go-workspaceapi.json @@ -2,36 +2,52 @@ "consumer": { "name": "code-client-go" }, - "provider": { - "name": "WorkspaceApi" - }, "interactions": [ { "description": "Create workspace", "providerState": "New workspace", "request": { - "method": "POST", - "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces", - "query": "version=2024-05-14%7Eexperimental", + "body": { + "data": { + "attributes": { + "bundle_id": "string", + "repository_uri": "string", + "root_folder_id": "string", + "workspace_type": "string" + }, + "type": "string" + } + }, "headers": { + "Content-Type": "application/vnd.api+json", "Snyk-Request-Id": "fc763eba-0905-41c5-a27f-3934ab26786c" }, - "body": "AA==", "matchingRules": { - "$.headers.Snyk-Request-Id": { - "match": "regex", - "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + "$.body.data.attributes.bundle_id": { + "match": "type" + }, + "$.body.data.attributes.repository_uri": { + "match": "type" + }, + "$.body.data.attributes.root_folder_id": { + "match": "type" + }, + "$.body.data.attributes.workspace_type": { + "match": "type" }, - "$.body": { + "$.body.data.type": { "match": "type" + }, + "$.header['Snyk-Request-Id']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" } - } + }, + "method": "POST", + "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces", + "query": "version=2024-05-14%7eexperimental" }, "response": { - "status": 200, - "headers": { - "Content-Type": "application/vnd.api+json" - }, "body": { "data": { "id": [ @@ -48,13 +64,14 @@ } } }, + "headers": { + "Content-Type": "application/vnd.api+json" + }, "matchingRules": { "$.body.data.id": { + "match": "type", "min": 1 }, - "$.body.data.id[*].*": { - "match": "type" - }, "$.body.data.id[*]": { "match": "type" }, @@ -67,13 +84,22 @@ "$.body.links.self.href": { "match": "type" } - } + }, + "status": 200 } } ], "metadata": { + "pactRust": { + "ffi": "0.4.16", + "mockserver": "1.2.5", + "models": "1.1.19" + }, "pactSpecification": { "version": "2.0.0" } + }, + "provider": { + "name": "WorkspaceApi" } } \ No newline at end of file From 96176796b6a278cce97654e9b345eef10fcef92b Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Tue, 4 Jun 2024 17:40:44 +0200 Subject: [PATCH 11/19] fix: pact tests --- internal/deepcode/client_pact_test.go | 12 +- .../pacts/code-client-go-snykcodeapi.json | 133 ++++++++++++++++++ 2 files changed, 136 insertions(+), 9 deletions(-) diff --git a/internal/deepcode/client_pact_test.go b/internal/deepcode/client_pact_test.go index 2a670a9..b320377 100644 --- a/internal/deepcode/client_pact_test.go +++ b/internal/deepcode/client_pact_test.go @@ -55,11 +55,13 @@ func TestSnykCodeClientPact(t *testing.T) { setupPact(t) t.Run("Create bundle", func(t *testing.T) { + files := make(map[string]string) + files[path1] = util.Hash([]byte(content)) + pact.AddInteraction().Given("New bundle").UponReceiving("Create bundle").WithCompleteRequest(consumer.Request{ Method: "POST", Path: matchers.String("/bundle"), Headers: getPutPostHeaderMatcher(), - Body: getPutPostBodyMatcher(), }).WithCompleteResponse(consumer.Response{ Status: 200, Headers: matchers.MapMatcher{ @@ -70,8 +72,6 @@ func TestSnykCodeClientPact(t *testing.T) { test := func(config consumer.MockServerConfig) error { client := getDeepCodeClient(t, getLocalMockserver(config)) - files := make(map[string]string) - files[path1] = util.Hash([]byte(content)) bundleHash, missingFiles, err := client.CreateBundle(context.Background(), files) if err != nil { @@ -99,7 +99,6 @@ func TestSnykCodeClientPact(t *testing.T) { Method: "POST", Path: matchers.String("/bundle"), Headers: getPutPostHeaderMatcher(), - Body: getPutPostBodyMatcher(), }).WithCompleteResponse(consumer.Response{ Status: 401, Headers: matchers.MapMatcher{ @@ -137,7 +136,6 @@ func TestSnykCodeClientPact(t *testing.T) { Method: "PUT", Path: matchers.Term("/bundle/"+bundleHash, "/bundle/[A-Fa-f0-9]{64}"), Headers: getPutPostHeaderMatcher(), - Body: getPutPostBodyMatcher(), }).WithCompleteResponse(consumer.Response{ Status: 200, Headers: matchers.MapMatcher{ @@ -252,10 +250,6 @@ func getPutPostHeaderMatcher() matchers.MapMatcher { } } -func getPutPostBodyMatcher() matchers.Matcher { - return matchers.Like(make([]byte, 1)) -} - func getSnykRequestIdMatcher() matchers.Matcher { return matchers.Regex("fc763eba-0905-41c5-a27f-3934ab26786c", uuidMatcher) } diff --git a/internal/deepcode/pacts/code-client-go-snykcodeapi.json b/internal/deepcode/pacts/code-client-go-snykcodeapi.json index 32248f2..153f819 100644 --- a/internal/deepcode/pacts/code-client-go-snykcodeapi.json +++ b/internal/deepcode/pacts/code-client-go-snykcodeapi.json @@ -49,6 +49,139 @@ }, "status": 200 } + }, + { + "description": "Extend bundle", + "providerState": "Existing bundle", + "request": { + "headers": { + "Content-Encoding": "gzip", + "Content-Type": "application/octet-stream", + "snyk-org-name": "00000000-0000-0000-0000-000000000023", + "snyk-request-id": "fc763eba-0905-41c5-a27f-3934ab26786c" + }, + "matchingRules": { + "$.header['snyk-org-name']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + }, + "$.header['snyk-request-id']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + }, + "$.path": { + "match": "regex", + "regex": "/bundle/[A-Fa-f0-9]{64}" + } + }, + "method": "PUT", + "path": "/bundle/faa6b7161c14f933ef4ca79a18ad9283eab362d5e6d3a977125eb95b37c377d8" + }, + "response": { + "body": { + "bundleHash": "string", + "missingFiles": [ + "string" + ] + }, + "headers": { + "Content-Type": "application/json" + }, + "matchingRules": { + "$.body.bundleHash": { + "match": "type" + }, + "$.body.missingFiles": { + "match": "type", + "min": 1 + }, + "$.body.missingFiles[*]": { + "match": "type" + } + }, + "status": 200 + } + }, + { + "description": "Create bundle", + "providerState": "New bundle", + "request": { + "headers": { + "Content-Encoding": "gzip", + "Content-Type": "application/octet-stream", + "snyk-org-name": "00000000-0000-0000-0000-000000000023", + "snyk-request-id": "fc763eba-0905-41c5-a27f-3934ab26786c" + }, + "matchingRules": { + "$.header['snyk-org-name']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + }, + "$.header['snyk-request-id']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + } + }, + "method": "POST", + "path": "/bundle" + }, + "response": { + "body": { + "bundleHash": "string", + "missingFiles": [ + "string" + ] + }, + "headers": { + "Content-Type": "application/json" + }, + "matchingRules": { + "$.body.bundleHash": { + "match": "type" + }, + "$.body.missingFiles": { + "match": "type", + "min": 1 + }, + "$.body.missingFiles[*]": { + "match": "type" + } + }, + "status": 200 + } + }, + { + "description": "Create bundle", + "providerState": "New bundle and invalid token", + "request": { + "headers": { + "Content-Encoding": "gzip", + "Content-Type": "application/octet-stream", + "snyk-org-name": "00000000-0000-0000-0000-000000000023", + "snyk-request-id": "fc763eba-0905-41c5-a27f-3934ab26786c" + }, + "matchingRules": { + "$.header['snyk-org-name']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + }, + "$.header['snyk-request-id']": { + "match": "regex", + "regex": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + } + }, + "method": "POST", + "path": "/bundle" + }, + "response": { + "body": { + "message": "Invalid auth token provided" + }, + "headers": { + "Content-Type": "application/json; charset=utf-8" + }, + "status": 401 + } } ], "metadata": { From 5c50c3b5953e8fb7836b79a1b8b7279becebddab Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 5 Jun 2024 11:37:56 +0200 Subject: [PATCH 12/19] fix: allow flow to be injected to orchestrationClient, add func options --- internal/analysis/analysis.go | 59 ++++++--- internal/analysis/analysis_test.go | 119 +++++++++++++++--- .../2024-02-16/client_pact_test.go | 4 +- scan.go | 20 ++- 4 files changed, 169 insertions(+), 33 deletions(-) diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index a64ab89..cb23b0f 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -58,34 +58,69 @@ type analysisOrchestrator struct { trackerFactory scan.TrackerFactory config config.Config timeoutInSeconds time.Duration + flow scans.Flow } type OptionFunc func(*analysisOrchestrator) +func WithInstrumentor(instrumentor observability.Instrumentor) func(*analysisOrchestrator) { + return func(a *analysisOrchestrator) { + a.instrumentor = instrumentor + } +} + +func WithErrorReporter(errorReporter observability.ErrorReporter) func(*analysisOrchestrator) { + return func(a *analysisOrchestrator) { + a.errorReporter = errorReporter + } +} + +func WithLogger(logger *zerolog.Logger) func(*analysisOrchestrator) { + return func(a *analysisOrchestrator) { + a.logger = logger + } +} + +func WithTrackerFactory(factory scan.TrackerFactory) func(*analysisOrchestrator) { + return func(a *analysisOrchestrator) { + a.trackerFactory = factory + } +} + func WithTimeoutInSeconds(timeoutInSeconds time.Duration) func(*analysisOrchestrator) { return func(a *analysisOrchestrator) { a.timeoutInSeconds = timeoutInSeconds } } +func WithFlow(flow string) func(*analysisOrchestrator) { + return func(a *analysisOrchestrator) { + a.flow = scans.Flow{} + _ = a.flow.UnmarshalJSON([]byte(fmt.Sprintf(`{"name": %s}`, flow))) + } +} + func NewAnalysisOrchestrator( config config.Config, - logger *zerolog.Logger, httpClient codeClientHTTP.HTTPClient, - instrumentor observability.Instrumentor, - errorReporter observability.ErrorReporter, - trackerFactory scan.TrackerFactory, options ...OptionFunc, ) AnalysisOrchestrator { + + nopLogger := zerolog.Nop() + flow := scans.Flow{} + _ = flow.UnmarshalJSON([]byte(`{"name": "ide_test"}`)) + a := &analysisOrchestrator{ httpClient: httpClient, - instrumentor: instrumentor, - errorReporter: errorReporter, - logger: logger, - trackerFactory: trackerFactory, config: config, + instrumentor: observability.NewInstrumentor(), + trackerFactory: scan.NewNoopTrackerFactory(), + errorReporter: observability.NewErrorReporter(&nopLogger), + logger: &nopLogger, timeoutInSeconds: 120 * time.Second, + flow: flow, } + for _, option := range options { option(a) } @@ -241,12 +276,6 @@ func (a *analysisOrchestrator) triggerScan( ) (*openapi_types.UUID, error) { workspaceUUID := uuid.MustParse(workspaceId) - flow := scans.Flow{} - err := flow.UnmarshalJSON([]byte(`{"name": "ide_test"}`)) - if err != nil { - return nil, errors.Wrap(err, "cannot create test flow element") - } - scanOptions := &struct { LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"` }{ @@ -277,7 +306,7 @@ func (a *analysisOrchestrator) triggerScan( WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"` WorkspaceUrl string `json:"workspace_url"` }{ - Flow: flow, + Flow: a.flow, WorkspaceUrl: fmt.Sprintf("http://workspace-service/workspaces/%s", workspaceId), WorkspaceId: &workspaceUUID, ScanOptions: scanOptions, diff --git a/internal/analysis/analysis_test.go b/internal/analysis/analysis_test.go index d8bbc3d..3821384 100644 --- a/internal/analysis/analysis_test.go +++ b/internal/analysis/analysis_test.go @@ -91,7 +91,14 @@ func TestAnalysis_CreateWorkspace(t *testing.T) { target, err := scan.NewRepositoryTarget("../../") assert.NoError(t, err) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) _, err = analysisOrchestrator.CreateWorkspace( context.Background(), "4a72d1db-b465-4764-99e1-ecedad03b06a", @@ -112,7 +119,15 @@ func TestAnalysis_CreateWorkspace_NotARepository(t *testing.T) { target, err := scan.NewRepositoryTarget(repoDir) assert.ErrorContains(t, err, "open local repository") - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err = analysisOrchestrator.CreateWorkspace( context.Background(), "4a72d1db-b465-4764-99e1-ecedad03b06a", @@ -149,7 +164,15 @@ func TestAnalysis_CreateWorkspace_Failure(t *testing.T) { target, err := scan.NewRepositoryTarget("../../") assert.NoError(t, err) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err = analysisOrchestrator.CreateWorkspace( context.Background(), "4a72d1db-b465-4764-99e1-ecedad03b06a", @@ -227,7 +250,15 @@ func TestAnalysis_CreateWorkspace_KnownErrors(t *testing.T) { target, err := scan.NewRepositoryTarget("../../") assert.NoError(t, err) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err = analysisOrchestrator.CreateWorkspace( context.Background(), "4a72d1db-b465-4764-99e1-ecedad03b06a", @@ -282,7 +313,15 @@ func TestAnalysis_RunAnalysis(t *testing.T) { Body: io.NopCloser(bytes.NewReader(fakeResponse)), }, nil) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + analysis.WithTimeoutInSeconds(120 * time.Second) actual, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") @@ -302,7 +341,15 @@ func TestAnalysis_RunAnalysis_TriggerFunctionError(t *testing.T) { req.Method == "POST" })).Times(1).Return(nil, errors.New("error")) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") assert.ErrorContains(t, err, "error") } @@ -360,7 +407,15 @@ func TestAnalysis_RunAnalysis_TriggerFunctionErrorCodes(t *testing.T) { req.Method == "POST" })).Times(1).Return(nil, errors.New(strconv.Itoa(tc.expectedStatus))) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") assert.ErrorContains(t, err, tc.expectedError) }) @@ -391,7 +446,15 @@ func TestAnalysis_RunAnalysis_PollingFunctionError(t *testing.T) { req.Method == "GET" })).Times(1).Return(nil, errors.New("error")) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") assert.ErrorContains(t, err, "error") } @@ -461,7 +524,15 @@ func TestAnalysis_RunAnalysis_PollingFunctionErrorCodes(t *testing.T) { req.Method == "GET" })).Times(1).Return(nil, errors.New(strconv.Itoa(tc.expectedStatus))) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") assert.ErrorContains(t, err, tc.expectedError) }) @@ -498,15 +569,17 @@ func TestAnalysis_RunAnalysis_PollingFunctionTimeout(t *testing.T) { }, Body: io.NopCloser(bytes.NewReader([]byte(`{"data":{"attributes": {"status": "in_progress"}, "id": "a6fb2742-b67f-4dc3-bb27-42b67f1dc344"}}`))), }, nil) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( mockConfig, - &logger, mockHTTPClient, - mockInstrumentor, - mockErrorReporter, - mockTrackerFactory, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), analysis.WithTimeoutInSeconds(1*time.Second), ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") assert.ErrorContains(t, err, "Snyk Code analysis timed out") } @@ -547,7 +620,15 @@ func TestAnalysis_RunAnalysis_GetFindingsError(t *testing.T) { req.Method == "GET" })).Times(1).Return(nil, errors.New("error")) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") require.ErrorContains(t, err, "error") } @@ -590,7 +671,15 @@ func TestAnalysis_RunAnalysis_GetFindingsNotSuccessful(t *testing.T) { Body: io.NopCloser(bytes.NewReader([]byte{})), }, nil) - analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockTrackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + mockConfig, + mockHTTPClient, + analysis.WithLogger(&logger), + analysis.WithInstrumentor(mockInstrumentor), + analysis.WithTrackerFactory(mockTrackerFactory), + analysis.WithErrorReporter(mockErrorReporter), + ) + _, err := analysisOrchestrator.RunAnalysis(context.Background(), "b6fc8954-5918-45ce-bc89-54591815ce1b", "rootPath", "c172d1db-b465-4764-99e1-ecedad03b06a") require.ErrorContains(t, err, "failed to retrieve findings from findings URL") } diff --git a/internal/orchestration/2024-02-16/client_pact_test.go b/internal/orchestration/2024-02-16/client_pact_test.go index 2f7c949..764a6a9 100644 --- a/internal/orchestration/2024-02-16/client_pact_test.go +++ b/internal/orchestration/2024-02-16/client_pact_test.go @@ -282,7 +282,7 @@ func getBodyMatcher() matchers.Matcher { "workspace_id": getWorkspaceUUIDMatcher(), "workspace_url": getWorkspaceIDMatcher(), }), - "type": matchers.String("ide"), + "type": matchers.String("workspace"), }), }) } @@ -300,7 +300,7 @@ func getBodyMatcherForIncrementalScan() matchers.Matcher { "workspace_id": getWorkspaceUUIDMatcher(), "workspace_url": getWorkspaceIDMatcher(), }), - "type": matchers.String("ide"), + "type": matchers.String("workspace"), }), }) } diff --git a/scan.go b/scan.go index c2dd8dc..54cac5f 100644 --- a/scan.go +++ b/scan.go @@ -19,8 +19,10 @@ package codeclient import ( "context" + "github.com/pkg/errors" "github.com/rs/zerolog" + "github.com/snyk/code-client-go/config" codeClientHTTP "github.com/snyk/code-client-go/http" "github.com/snyk/code-client-go/internal/analysis" @@ -40,6 +42,7 @@ type codeScanner struct { trackerFactory scan.TrackerFactory logger *zerolog.Logger config config.Config + flow string } type CodeScanner interface { @@ -62,6 +65,12 @@ func WithInstrumentor(instrumentor observability.Instrumentor) OptionFunc { } } +func WithFlow(flow string) OptionFunc { + return func(c *codeScanner) { + c.flow = flow + } +} + func WithErrorReporter(errorReporter observability.ErrorReporter) OptionFunc { return func(c *codeScanner) { c.errorReporter = errorReporter @@ -100,6 +109,8 @@ func NewCodeScanner( trackerFactory: trackerFactory, } + scanner.flow = "ide_test" + for _, option := range options { option(scanner) } @@ -108,7 +119,14 @@ func NewCodeScanner( deepcodeClient := deepcode.NewDeepcodeClient(scanner.config, httpClient, scanner.logger, scanner.instrumentor, scanner.errorReporter) bundleManager := bundle.NewBundleManager(deepcodeClient, scanner.logger, scanner.instrumentor, scanner.errorReporter, scanner.trackerFactory) scanner.bundleManager = bundleManager - analysisOrchestrator := analysis.NewAnalysisOrchestrator(scanner.config, scanner.logger, httpClient, scanner.instrumentor, scanner.errorReporter, scanner.trackerFactory) + analysisOrchestrator := analysis.NewAnalysisOrchestrator( + scanner.config, + httpClient, + analysis.WithInstrumentor(scanner.instrumentor), + analysis.WithErrorReporter(scanner.errorReporter), + analysis.WithTrackerFactory(scanner.trackerFactory), + analysis.WithFlow(scanner.flow), + ) scanner.analysisOrchestrator = analysisOrchestrator return scanner From 56125504be6238c2847c49d2b0717337f823cd62 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 5 Jun 2024 11:45:10 +0200 Subject: [PATCH 13/19] fix: add smoke tests for flows --- scan_smoke_test.go | 59 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/scan_smoke_test.go b/scan_smoke_test.go index fffa440..4c40f43 100644 --- a/scan_smoke_test.go +++ b/scan_smoke_test.go @@ -38,7 +38,7 @@ import ( "github.com/snyk/code-client-go/scan" ) -func Test_SmokeScan_HTTPS(t *testing.T) { +func Test_SmokeScan_HTTPS_IDE(t *testing.T) { if os.Getenv("SMOKE_TESTS") != "true" { t.Skip() } @@ -94,6 +94,63 @@ func Test_SmokeScan_HTTPS(t *testing.T) { require.NotNil(t, response.Sarif.Runs[0].Results[0].Locations[0].PhysicalLocation.ArtifactLocation.URI) } +func Test_SmokeScan_HTTPS_CLI(t *testing.T) { + if os.Getenv("SMOKE_TESTS") != "true" { + t.Skip() + } + var cloneTargetDir, err = testutil.SetupCustomTestRepo(t, "https://github.com/snyk-labs/nodejs-goof", "0336589", "", "") + assert.NoError(t, err) + + target, err := scan.NewRepositoryTarget(cloneTargetDir) + assert.NoError(t, err) + + if err != nil { + t.Fatal(err, "Couldn't setup test repo") + } + files := sliceToChannel([]string{filepath.Join(cloneTargetDir, "app.js"), filepath.Join(cloneTargetDir, "utils.js")}) + + logger := zerolog.New(os.Stdout).Level(zerolog.TraceLevel) + instrumentor := testutil.NewTestInstrumentor() + errorReporter := testutil.NewTestErrorReporter() + config := testutil.NewTestConfig() + httpClient := codeClientHTTP.NewHTTPClient( + func() *http.Client { + client := http.Client{ + Timeout: time.Duration(180) * time.Second, + Transport: TestAuthRoundTripper{http.DefaultTransport}, + } + return &client + }, + codeClientHTTP.WithRetryCount(3), + codeClientHTTP.WithLogger(&logger), + codeClientHTTP.WithInstrumentor(instrumentor), + ) + trackerFactory := scan.NewNoopTrackerFactory() + + codeScanner := codeClient.NewCodeScanner( + config, + httpClient, + codeClient.WithTrackerFactory(trackerFactory), + codeClient.WithLogger(&logger), + codeClient.WithInstrumentor(instrumentor), + codeClient.WithErrorReporter(errorReporter), + codeClient.WithFlow("cli_test"), + ) + + // let's have a requestID that does not change + span := instrumentor.StartSpan(context.Background(), "UploadAndAnalyze") + defer span.Finish() + + response, bundleHash, scanErr := codeScanner.UploadAndAnalyze(span.Context(), uuid.New().String(), target, files, map[string]bool{}) + require.NoError(t, scanErr) + require.NotEmpty(t, bundleHash) + require.NotNil(t, response) + require.Greater(t, len(response.Sarif.Runs), 0) + require.Greater(t, len(response.Sarif.Runs[0].Results), 0) + require.Greater(t, len(response.Sarif.Runs[0].Results[0].Locations), 0) + require.NotNil(t, response.Sarif.Runs[0].Results[0].Locations[0].PhysicalLocation.ArtifactLocation.URI) +} + func Test_SmokeScan_SSH(t *testing.T) { if os.Getenv("SMOKE_TESTS") != "true" { t.Skip() From 11c5b33e1af0d89f45900302264ff2a37c7a6c45 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 5 Jun 2024 11:51:33 +0200 Subject: [PATCH 14/19] fix: linting message --- internal/analysis/analysis.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index cb23b0f..e842d99 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -105,7 +105,6 @@ func NewAnalysisOrchestrator( httpClient codeClientHTTP.HTTPClient, options ...OptionFunc, ) AnalysisOrchestrator { - nopLogger := zerolog.Nop() flow := scans.Flow{} _ = flow.UnmarshalJSON([]byte(`{"name": "ide_test"}`)) From 6a7ca112eb60e87765f75f216464a5a8b37bd5e6 Mon Sep 17 00:00:00 2001 From: Teodora Sandu Date: Wed, 5 Jun 2024 11:05:21 +0100 Subject: [PATCH 15/19] refactor: generated oapi files with latest version --- internal/orchestration/2024-02-16/client.go | 4 ++-- internal/orchestration/2024-02-16/common/common.go | 6 +++--- internal/orchestration/2024-02-16/parameters/orgs.go | 4 ++-- internal/orchestration/2024-02-16/parameters/scans.go | 4 ++-- internal/orchestration/2024-02-16/scans/scans.go | 6 +++--- internal/workspace/2024-05-14/client.go | 4 ++-- internal/workspace/2024-05-14/common/common.go | 6 +++--- internal/workspace/2024-05-14/links/links.go | 2 +- internal/workspace/2024-05-14/parameters/content-type.go | 2 +- internal/workspace/2024-05-14/parameters/orgs.go | 4 ++-- internal/workspace/2024-05-14/parameters/request-id.go | 4 ++-- internal/workspace/2024-05-14/parameters/user-agent.go | 2 +- internal/workspace/2024-05-14/workspaces/workspaces.go | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/internal/orchestration/2024-02-16/client.go b/internal/orchestration/2024-02-16/client.go index b75250e..c38749f 100644 --- a/internal/orchestration/2024-02-16/client.go +++ b/internal/orchestration/2024-02-16/client.go @@ -1,6 +1,6 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240216 import ( @@ -13,7 +13,7 @@ import ( "net/url" "strings" - "github.com/deepmap/oapi-codegen/pkg/runtime" + "github.com/oapi-codegen/runtime" externalRef0 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/common" externalRef1 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/parameters" externalRef2 "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" diff --git a/internal/orchestration/2024-02-16/common/common.go b/internal/orchestration/2024-02-16/common/common.go index 49cd43f..e6e2ef0 100644 --- a/internal/orchestration/2024-02-16/common/common.go +++ b/internal/orchestration/2024-02-16/common/common.go @@ -1,13 +1,13 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240216 import ( "encoding/json" - "github.com/deepmap/oapi-codegen/pkg/runtime" - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" ) // Defines values for MetaCount. diff --git a/internal/orchestration/2024-02-16/parameters/orgs.go b/internal/orchestration/2024-02-16/parameters/orgs.go index 0b982c1..3b79643 100644 --- a/internal/orchestration/2024-02-16/parameters/orgs.go +++ b/internal/orchestration/2024-02-16/parameters/orgs.go @@ -1,10 +1,10 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240216 import ( - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + openapi_types "github.com/oapi-codegen/runtime/types" ) // OrgId defines model for OrgId. diff --git a/internal/orchestration/2024-02-16/parameters/scans.go b/internal/orchestration/2024-02-16/parameters/scans.go index 39b6af3..3d3f04a 100644 --- a/internal/orchestration/2024-02-16/parameters/scans.go +++ b/internal/orchestration/2024-02-16/parameters/scans.go @@ -1,10 +1,10 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240216 import ( - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + openapi_types "github.com/oapi-codegen/runtime/types" ) // ScanJobId defines model for ScanJobId. diff --git a/internal/orchestration/2024-02-16/scans/scans.go b/internal/orchestration/2024-02-16/scans/scans.go index 5928969..93d2013 100644 --- a/internal/orchestration/2024-02-16/scans/scans.go +++ b/internal/orchestration/2024-02-16/scans/scans.go @@ -1,6 +1,6 @@ // Package v20240216 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240216 import ( @@ -8,8 +8,8 @@ import ( "errors" "time" - "github.com/deepmap/oapi-codegen/pkg/runtime" - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/common" ) diff --git a/internal/workspace/2024-05-14/client.go b/internal/workspace/2024-05-14/client.go index 744cb35..811981a 100644 --- a/internal/workspace/2024-05-14/client.go +++ b/internal/workspace/2024-05-14/client.go @@ -1,6 +1,6 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 import ( @@ -13,7 +13,7 @@ import ( "net/url" "strings" - "github.com/deepmap/oapi-codegen/pkg/runtime" + "github.com/oapi-codegen/runtime" externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/common" externalRef2 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/parameters" externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/workspaces" diff --git a/internal/workspace/2024-05-14/common/common.go b/internal/workspace/2024-05-14/common/common.go index 0440d2f..afb7dd0 100644 --- a/internal/workspace/2024-05-14/common/common.go +++ b/internal/workspace/2024-05-14/common/common.go @@ -1,13 +1,13 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 import ( "encoding/json" - "github.com/deepmap/oapi-codegen/pkg/runtime" - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" ) // Defines values for MetaCount. diff --git a/internal/workspace/2024-05-14/links/links.go b/internal/workspace/2024-05-14/links/links.go index b65e48e..fcffa76 100644 --- a/internal/workspace/2024-05-14/links/links.go +++ b/internal/workspace/2024-05-14/links/links.go @@ -1,6 +1,6 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 // Link defines model for Link. diff --git a/internal/workspace/2024-05-14/parameters/content-type.go b/internal/workspace/2024-05-14/parameters/content-type.go index ca772ee..9c91fbc 100644 --- a/internal/workspace/2024-05-14/parameters/content-type.go +++ b/internal/workspace/2024-05-14/parameters/content-type.go @@ -1,6 +1,6 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 // Defines values for ContentTypeHeader. diff --git a/internal/workspace/2024-05-14/parameters/orgs.go b/internal/workspace/2024-05-14/parameters/orgs.go index 59ec96e..63d8bfe 100644 --- a/internal/workspace/2024-05-14/parameters/orgs.go +++ b/internal/workspace/2024-05-14/parameters/orgs.go @@ -1,10 +1,10 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 import ( - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + openapi_types "github.com/oapi-codegen/runtime/types" ) // OrgId defines model for OrgId. diff --git a/internal/workspace/2024-05-14/parameters/request-id.go b/internal/workspace/2024-05-14/parameters/request-id.go index b61f119..b2336e7 100644 --- a/internal/workspace/2024-05-14/parameters/request-id.go +++ b/internal/workspace/2024-05-14/parameters/request-id.go @@ -1,10 +1,10 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 import ( - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + openapi_types "github.com/oapi-codegen/runtime/types" ) // RequestId defines model for RequestId. diff --git a/internal/workspace/2024-05-14/parameters/user-agent.go b/internal/workspace/2024-05-14/parameters/user-agent.go index 72fa00d..55eaf49 100644 --- a/internal/workspace/2024-05-14/parameters/user-agent.go +++ b/internal/workspace/2024-05-14/parameters/user-agent.go @@ -1,6 +1,6 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 // UserAgent defines model for UserAgent. diff --git a/internal/workspace/2024-05-14/workspaces/workspaces.go b/internal/workspace/2024-05-14/workspaces/workspaces.go index 2d2b041..8381505 100644 --- a/internal/workspace/2024-05-14/workspaces/workspaces.go +++ b/internal/workspace/2024-05-14/workspaces/workspaces.go @@ -1,10 +1,10 @@ // Package v20240514 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. package v20240514 import ( - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + openapi_types "github.com/oapi-codegen/runtime/types" externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/common" externalRef1 "github.com/snyk/code-client-go/internal/workspace/2024-05-14/links" ) From 975fcb9fa3b706e4ca0a76e4f3a1466563ee1f51 Mon Sep 17 00:00:00 2001 From: Teodora Sandu Date: Wed, 5 Jun 2024 11:06:03 +0100 Subject: [PATCH 16/19] test: update contract tests after changing type --- .../2024-02-16/pacts/code-client-go-orchestrationapi.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json b/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json index 61c087f..99b13cf 100644 --- a/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json +++ b/internal/orchestration/2024-02-16/pacts/code-client-go-orchestrationapi.json @@ -22,7 +22,7 @@ "workspace_id": "fc763eba-0905-41c5-a27f-3934ab26786c", "workspace_url": "http://workspace-service/workspaces/fc763eba-0905-41c5-a27f-3934ab26786c" }, - "type": "ide" + "type": "workspace" } }, "headers": { @@ -99,7 +99,7 @@ "workspace_id": "fc763eba-0905-41c5-a27f-3934ab26786c", "workspace_url": "http://workspace-service/workspaces/fc763eba-0905-41c5-a27f-3934ab26786c" }, - "type": "ide" + "type": "workspace" } }, "headers": { @@ -164,7 +164,7 @@ "providerState": "Scan ID", "request": { "method": "GET", - "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans/5be49f72-a11f-4670-9657-5f5a9c92cdd7", + "path": "/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/scans/c4a998ce-be47-4bca-b470-6a1f88becdda", "query": "version=2024-02-16%7eexperimental" }, "response": { From 7036ab327f7e2087793a378c5ddaf91d000c7da6 Mon Sep 17 00:00:00 2001 From: Teodora Sandu Date: Wed, 5 Jun 2024 11:13:34 +0100 Subject: [PATCH 17/19] fix: wrap flow name in quotes for valid json --- internal/analysis/analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index e842d99..f20a939 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -96,7 +96,7 @@ func WithTimeoutInSeconds(timeoutInSeconds time.Duration) func(*analysisOrchestr func WithFlow(flow string) func(*analysisOrchestrator) { return func(a *analysisOrchestrator) { a.flow = scans.Flow{} - _ = a.flow.UnmarshalJSON([]byte(fmt.Sprintf(`{"name": %s}`, flow))) + _ = a.flow.UnmarshalJSON([]byte(fmt.Sprintf(`{"name": "%s"}`, flow))) } } From 70ae17f57f09e8d9504c08dadef21628b9b5cc0a Mon Sep 17 00:00:00 2001 From: Teodora Sandu Date: Wed, 5 Jun 2024 11:16:40 +0100 Subject: [PATCH 18/19] chore: tidy go mod --- go.mod | 55 ------------------ go.sum | 177 +-------------------------------------------------------- 2 files changed, 1 insertion(+), 231 deletions(-) diff --git a/go.mod b/go.mod index 0a0ae28..49ad494 100644 --- a/go.mod +++ b/go.mod @@ -18,103 +18,48 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect - github.com/CloudyKit/jet/v6 v6.2.0 // indirect - github.com/Joker/jade v1.1.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/aymerick/douceur v0.2.0 // indirect - github.com/bytedance/sonic v1.10.0-rc3 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect - github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/fatih/structs v1.1.0 // indirect - github.com/flosch/pongo2/v4 v4.0.2 // indirect - github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/getkin/kin-openapi v0.118.0 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect - github.com/gin-gonic/gin v1.9.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.1 // indirect - github.com/goccy/go-json v0.10.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 // indirect - github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/yaml v0.2.0 // indirect - github.com/iris-contrib/schema v0.0.6 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kataras/blocks v0.0.7 // indirect - github.com/kataras/golog v0.1.9 // indirect - github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 // indirect - github.com/kataras/pio v0.0.12 // indirect - github.com/kataras/sitemap v0.0.6 // indirect - github.com/kataras/tunnel v0.0.4 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect - github.com/labstack/echo/v4 v4.11.1 // indirect - github.com/labstack/gommon v0.4.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect - github.com/mailgun/raymond/v2 v2.0.48 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/microcosm-cc/bluemonday v1.0.26 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/pelletier/go-toml/v2 v2.0.9 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/sergi/go-diff v1.3.1 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/tdewolff/minify/v2 v2.12.9 // indirect - github.com/tdewolff/parse/v2 v2.6.8 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect - github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.2 // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/yosssi/ace v0.0.5 // indirect - golang.org/x/arch v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.33.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index c7d25df..5f6ad05 100644 --- a/go.sum +++ b/go.sum @@ -1,47 +1,19 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= -github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= -github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= -github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= -github.com/bytedance/sonic v1.10.0-rc3 h1:uNSnscRapXTwUgTyOF0GVljYD08p9X/Lbr9MweSV3V0= -github.com/bytedance/sonic v1.10.0-rc3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= -github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -58,20 +30,8 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= -github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -88,83 +48,34 @@ github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwn github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= -github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= -github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= -github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= -github.com/iris-contrib/httpexpect/v2 v2.15.2/go.mod h1:JLDgIqnFy5loDSUv1OA2j0mb6p/rDhiCqigP22Uq9xE= -github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= -github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= -github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= -github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= -github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 h1:Vx8kDVhO2qepK8w44lBtp+RzN3ld743i+LYPzODJSpQ= -github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9/go.mod h1:ldkoR3iXABBeqlTibQ3MYaviA1oSlPvim6f55biwBh4= -github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w= -github.com/kataras/pio v0.0.12/go.mod h1:ODK/8XBhhQ5WqrAhKy+9lTPS7sBf6O3KcLhc9klfRcY= -github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= -github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= -github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= -github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -172,46 +83,24 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= -github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= -github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= -github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58= -github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= -github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= -github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pact-foundation/pact-go/v2 v2.0.5 h1:t7Ngeug5TYYREKYBLAb+jmNUB84mJdBNTYRAfPLyY90= github.com/pact-foundation/pact-go/v2 v2.0.5/go.mod h1:OO003128Co8mczCV7UrD6kmeCdyxFOAv4dt3BFvqy5E= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= @@ -229,18 +118,10 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= -github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= -github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -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/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= @@ -258,58 +139,20 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= -github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= -github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= -github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= -github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= -github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= -github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= -github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -321,17 +164,14 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= @@ -354,10 +194,6 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -385,12 +221,9 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= @@ -407,22 +240,14 @@ google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= -moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 506514f8a3e61147f7ca972f524fd877bd0c4a9b Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 5 Jun 2024 13:14:41 +0200 Subject: [PATCH 19/19] fix: actually call incremental analysis, if ide flow is used --- internal/analysis/analysis.go | 2 +- internal/orchestration/2024-02-16/client_pact_test.go | 4 ++-- scan.go | 10 +++++++--- scan_smoke_test.go | 3 ++- scan_test.go | 8 +++++++- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go index f20a939..03a8b56 100644 --- a/internal/analysis/analysis.go +++ b/internal/analysis/analysis.go @@ -107,7 +107,7 @@ func NewAnalysisOrchestrator( ) AnalysisOrchestrator { nopLogger := zerolog.Nop() flow := scans.Flow{} - _ = flow.UnmarshalJSON([]byte(`{"name": "ide_test"}`)) + _ = flow.UnmarshalJSON([]byte(fmt.Sprintf(`{"name": "%s"}`, scans.IdeTest))) a := &analysisOrchestrator{ httpClient: httpClient, diff --git a/internal/orchestration/2024-02-16/client_pact_test.go b/internal/orchestration/2024-02-16/client_pact_test.go index 764a6a9..3dbd897 100644 --- a/internal/orchestration/2024-02-16/client_pact_test.go +++ b/internal/orchestration/2024-02-16/client_pact_test.go @@ -277,7 +277,7 @@ func getBodyMatcher() matchers.Matcher { "data": matchers.Like(map[string]interface{}{ "attributes": matchers.Like(map[string]interface{}{ "flow": matchers.MapMatcher{ - "name": matchers.String("ide_test"), + "name": matchers.String(scans.IdeTest), }, "workspace_id": getWorkspaceUUIDMatcher(), "workspace_url": getWorkspaceIDMatcher(), @@ -292,7 +292,7 @@ func getBodyMatcherForIncrementalScan() matchers.Matcher { "data": matchers.Like(map[string]interface{}{ "attributes": matchers.Like(map[string]interface{}{ "flow": matchers.MapMatcher{ - "name": matchers.String("ide_test"), + "name": matchers.String(scans.IdeTest), }, "scan_options": matchers.MapMatcher{ "limit_scan_to_files": getIncrementalScanOptionsMatcher(), diff --git a/scan.go b/scan.go index 54cac5f..4a954cd 100644 --- a/scan.go +++ b/scan.go @@ -28,6 +28,7 @@ import ( "github.com/snyk/code-client-go/internal/analysis" "github.com/snyk/code-client-go/internal/bundle" "github.com/snyk/code-client-go/internal/deepcode" + scans "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" "github.com/snyk/code-client-go/observability" "github.com/snyk/code-client-go/sarif" "github.com/snyk/code-client-go/scan" @@ -107,10 +108,9 @@ func NewCodeScanner( logger: &nopLogger, instrumentor: instrumentor, trackerFactory: trackerFactory, + flow: string(scans.IdeTest), } - scanner.flow = "ide_test" - for _, option := range options { option(scanner) } @@ -214,8 +214,12 @@ func (c *codeScanner) UploadAndAnalyze( return nil, bundleHash, nil } } + var limitToFiles []string + for file := range changedFiles { + limitToFiles = append(limitToFiles, file) + } + response, err := c.analysisOrchestrator.RunIncrementalAnalysis(ctx, c.config.Organization(), b.GetRootPath(), workspaceId, limitToFiles) - response, err := c.analysisOrchestrator.RunAnalysis(ctx, c.config.Organization(), b.GetRootPath(), workspaceId) if ctx.Err() != nil { c.logger.Info().Msg("Canceling Code scan - Code scanner received cancellation signal") return nil, bundleHash, nil diff --git a/scan_smoke_test.go b/scan_smoke_test.go index 4c40f43..64e7ce6 100644 --- a/scan_smoke_test.go +++ b/scan_smoke_test.go @@ -34,6 +34,7 @@ import ( codeClient "github.com/snyk/code-client-go" codeClientHTTP "github.com/snyk/code-client-go/http" + scans "github.com/snyk/code-client-go/internal/orchestration/2024-02-16/scans" "github.com/snyk/code-client-go/internal/util/testutil" "github.com/snyk/code-client-go/scan" ) @@ -134,7 +135,7 @@ func Test_SmokeScan_HTTPS_CLI(t *testing.T) { codeClient.WithLogger(&logger), codeClient.WithInstrumentor(instrumentor), codeClient.WithErrorReporter(errorReporter), - codeClient.WithFlow("cli_test"), + codeClient.WithFlow(string(scans.CliTest)), ) // let's have a requestID that does not change diff --git a/scan_test.go b/scan_test.go index 937cce8..cfc7ac9 100644 --- a/scan_test.go +++ b/scan_test.go @@ -100,7 +100,13 @@ func Test_UploadAndAnalyze(t *testing.T) { mockAnalysisOrchestrator := mockAnalysis.NewMockAnalysisOrchestrator(ctrl) mockAnalysisOrchestrator.EXPECT().CreateWorkspace(gomock.Any(), "4a72d1db-b465-4764-99e1-ecedad03b06a", "b372d1db-b465-4764-99e1-ecedad03b06a", target, "testBundleHash").Return("c172d1db-b465-4764-99e1-ecedad03b06a", nil) - mockAnalysisOrchestrator.EXPECT().RunAnalysis(gomock.Any(), "4a72d1db-b465-4764-99e1-ecedad03b06a", "testRootPath", "c172d1db-b465-4764-99e1-ecedad03b06a").Return(&sarif.SarifResponse{Status: "COMPLETE"}, nil) + mockAnalysisOrchestrator.EXPECT().RunIncrementalAnalysis( + gomock.Any(), + "4a72d1db-b465-4764-99e1-ecedad03b06a", + "testRootPath", + "c172d1db-b465-4764-99e1-ecedad03b06a", + gomock.Any(), + ).Return(&sarif.SarifResponse{Status: "COMPLETE"}, nil) codeScanner := codeclient.NewCodeScanner( mockConfig,