From acde896a8620d7aca3d03fe7b62c4c9e77cf71b0 Mon Sep 17 00:00:00 2001 From: Mateo Hernandez Date: Mon, 4 Aug 2025 15:31:44 -0300 Subject: [PATCH] updating dependencies and files --- .github/PULL_REQUEST_TEMPLATE.md | 3 - .../workflows/capabilities_and_config.yaml | 40 + .github/workflows/ci.yaml | 55 +- .github/workflows/main.yaml | 56 +- .github/workflows/release.yaml | 66 +- baton-logo.png | Bin 0 -> 64445 bytes go.mod | 3 +- go.sum | 4 +- pkg/bcel/bcel_test.go | 3 +- pkg/bsql/entitlements.go | 2 +- pkg/bsql/provisioning.go | 2 +- pkg/bsql/query.go | 22 +- pkg/bsql/query_test.go | 34 +- pkg/bsql/resource_types_test.go | 3 +- pkg/bsql/resources.go | 4 +- pkg/bsql/user_syncer.go | 2 +- pkg/config/gen/gen.go | 10 + pkg/config/schema.gen.go | 83 ++ pkg/config/schema.go | 9 + pkg/database/database.go | 8 +- pkg/database/database_test.go | 12 +- .../baton-sdk/pb/c1/config/v1/config.pb.go | 48 +- .../pb/c1/config/v1/config.pb.validate.go | 4 + .../v2/annotation_external_ticket.pb.go | 74 +- .../annotation_external_ticket.pb.validate.go | 106 ++ .../pb/c1/connector/v2/connector.pb.go | 85 +- .../pb/c1/connector/v2/event_feed.pb.go | 545 +++++++--- .../c1/connector/v2/event_feed.pb.validate.go | 465 ++++++++ .../pb/c1/connector/v2/event_feed_grpc.pb.go | 40 +- .../pb/c1/connector/v2/resource.pb.go | 911 ++++++++-------- .../c1/connector/v2/resource.pb.validate.go | 140 +++ .../baton-sdk/pkg/cli/commands.go | 26 +- .../baton-sdk/pkg/cli/lambda_server__added.go | 21 +- .../baton-sdk/pkg/config/config.go | 2 +- .../pkg/connectorbuilder/connectorbuilder.go | 153 ++- .../baton-sdk/pkg/connectorrunner/runner.go | 49 +- .../pkg/connectorstore/connectorstore.go | 1 + .../baton-sdk/pkg/crypto/password.go | 73 +- .../baton-sdk/pkg/dotc1z/sync_runs.go | 13 + .../baton-sdk/pkg/field/defaults.go | 56 +- .../baton-sdk/pkg/field/field_options.go | 7 + .../baton-sdk/pkg/field/fields.go | 14 +- .../baton-sdk/pkg/field/marshal.go | 11 +- .../baton-sdk/pkg/field/struct.go | 90 +- .../baton-sdk/pkg/lambda/grpc/client.go | 56 +- .../baton-sdk/pkg/ratelimit/http.go | 2 +- .../baton-sdk/pkg/sdk/empty_connector.go | 143 ++- .../conductorone/baton-sdk/pkg/sdk/version.go | 2 +- .../conductorone/baton-sdk/pkg/sync/state.go | 34 +- .../conductorone/baton-sdk/pkg/sync/syncer.go | 203 +++- .../baton-sdk/pkg/synccompactor/compactor.go | 145 +-- .../pkg/tasks/local/action_invoker.go | 82 ++ .../baton-sdk/pkg/tasks/local/compactor.go | 6 +- .../baton-sdk/pkg/tasks/local/event_feed.go | 30 +- .../pkg/types/entitlement/entitlement.go | 25 + .../pkg/types/resource/role_trait.go | 2 +- .../baton-sdk/pkg/types/tasks/tasks.go | 1 + .../baton-sdk/pkg/uhttp/transport.go | 2 + .../baton-sdk/pkg/uhttp/wrapper.go | 123 ++- vendor/golang.org/x/sys/plan9/asm.s | 8 + vendor/golang.org/x/sys/plan9/asm_plan9_386.s | 30 + .../golang.org/x/sys/plan9/asm_plan9_amd64.s | 30 + vendor/golang.org/x/sys/plan9/asm_plan9_arm.s | 25 + vendor/golang.org/x/sys/plan9/const_plan9.go | 70 ++ vendor/golang.org/x/sys/plan9/dir_plan9.go | 212 ++++ vendor/golang.org/x/sys/plan9/env_plan9.go | 31 + vendor/golang.org/x/sys/plan9/errors_plan9.go | 50 + vendor/golang.org/x/sys/plan9/mkall.sh | 150 +++ vendor/golang.org/x/sys/plan9/mkerrors.sh | 246 +++++ .../golang.org/x/sys/plan9/mksysnum_plan9.sh | 23 + .../golang.org/x/sys/plan9/pwd_go15_plan9.go | 21 + vendor/golang.org/x/sys/plan9/pwd_plan9.go | 23 + vendor/golang.org/x/sys/plan9/race.go | 30 + vendor/golang.org/x/sys/plan9/race0.go | 25 + vendor/golang.org/x/sys/plan9/str.go | 22 + vendor/golang.org/x/sys/plan9/syscall.go | 109 ++ .../golang.org/x/sys/plan9/syscall_plan9.go | 361 +++++++ .../x/sys/plan9/zsyscall_plan9_386.go | 284 +++++ .../x/sys/plan9/zsyscall_plan9_amd64.go | 284 +++++ .../x/sys/plan9/zsyscall_plan9_arm.go | 284 +++++ .../golang.org/x/sys/plan9/zsysnum_plan9.go | 49 + vendor/golang.org/x/term/CONTRIBUTING.md | 26 + vendor/golang.org/x/term/LICENSE | 27 + vendor/golang.org/x/term/PATENTS | 22 + vendor/golang.org/x/term/README.md | 16 + vendor/golang.org/x/term/codereview.cfg | 1 + vendor/golang.org/x/term/term.go | 60 ++ vendor/golang.org/x/term/term_plan9.go | 42 + vendor/golang.org/x/term/term_unix.go | 91 ++ vendor/golang.org/x/term/term_unix_bsd.go | 12 + vendor/golang.org/x/term/term_unix_other.go | 12 + vendor/golang.org/x/term/term_unsupported.go | 38 + vendor/golang.org/x/term/term_windows.go | 80 ++ vendor/golang.org/x/term/terminal.go | 995 ++++++++++++++++++ vendor/modules.txt | 6 +- 95 files changed, 6959 insertions(+), 1047 deletions(-) create mode 100644 .github/workflows/capabilities_and_config.yaml create mode 100644 baton-logo.png create mode 100644 pkg/config/gen/gen.go create mode 100644 pkg/config/schema.gen.go create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/action_invoker.go create mode 100644 vendor/golang.org/x/sys/plan9/asm.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_386.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_arm.s create mode 100644 vendor/golang.org/x/sys/plan9/const_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/dir_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/env_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/errors_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/mkall.sh create mode 100644 vendor/golang.org/x/sys/plan9/mkerrors.sh create mode 100644 vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh create mode 100644 vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/pwd_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/race.go create mode 100644 vendor/golang.org/x/sys/plan9/race0.go create mode 100644 vendor/golang.org/x/sys/plan9/str.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go create mode 100644 vendor/golang.org/x/sys/plan9/zsysnum_plan9.go create mode 100644 vendor/golang.org/x/term/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/term/LICENSE create mode 100644 vendor/golang.org/x/term/PATENTS create mode 100644 vendor/golang.org/x/term/README.md create mode 100644 vendor/golang.org/x/term/codereview.cfg create mode 100644 vendor/golang.org/x/term/term.go create mode 100644 vendor/golang.org/x/term/term_plan9.go create mode 100644 vendor/golang.org/x/term/term_unix.go create mode 100644 vendor/golang.org/x/term/term_unix_bsd.go create mode 100644 vendor/golang.org/x/term/term_unix_other.go create mode 100644 vendor/golang.org/x/term/term_unsupported.go create mode 100644 vendor/golang.org/x/term/term_windows.go create mode 100644 vendor/golang.org/x/term/terminal.go diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c5facd9e..868f20da 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,9 +3,6 @@ - [ ] Bug fix - [ ] New feature - - - #### Useful links: - [Baton SDK coding guidelines](https://github.com/ConductorOne/baton-sdk/wiki/Coding-Guidelines) diff --git a/.github/workflows/capabilities_and_config.yaml b/.github/workflows/capabilities_and_config.yaml new file mode 100644 index 00000000..75d5f330 --- /dev/null +++ b/.github/workflows/capabilities_and_config.yaml @@ -0,0 +1,40 @@ +name: Generate capabilities and config schema + +on: + push: + branches: + - main + +jobs: + calculate-capabilities: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.RELENG_GITHUB_TOKEN }} + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + + - name: Build + run: go build -o connector ./cmd/baton-miro + + - name: Run and save config output + run: ./connector config > config_schema.json + + - name: Run and save capabilities output + run: ./connector capabilities > baton_capabilities.json + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: "Updating baton config schema and capabilities." + add: | + config_schema.json + baton_capabilities.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f1d4a5fd..3798c34e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,39 +4,38 @@ jobs: go-lint: runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: 1.23.x - - name: Checkout code - uses: actions/checkout@v4 - - name: Run linters - uses: golangci/golangci-lint-action@v8 - with: - version: latest - args: --timeout=3m + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.23.x + - name: Checkout code + uses: actions/checkout@v4 + - name: Run linters + uses: golangci/golangci-lint-action@v8 + with: + version: latest + args: --timeout=3m go-test: strategy: matrix: - go-version: [ 1.23.x ] - platform: [ ubuntu-latest ] + go-version: [1.23.x] + platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: - - name: Install Go - if: success() - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v4 - - name: go tests - run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json) - - name: annotate go tests - if: always() - uses: guyarb/golang-test-annotations@v0.5.1 - with: - test-results: test.json - + - name: Install Go + if: success() + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v4 + - name: go tests + run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json) + - name: annotate go tests + if: always() + uses: guyarb/golang-test-annotations@v0.6.0 + with: + test-results: test.json # test: # runs-on: ubuntu-latest # # Define any services needed for the test suite (or delete this section) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6abafa88..dc0e2dbd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -2,40 +2,40 @@ name: main ci on: push: branches: - - main + - main jobs: go-lint: runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: 1.23.x - - name: Checkout code - uses: actions/checkout@v4 - - name: Run linters - uses: golangci/golangci-lint-action@v8 - with: - version: latest - args: --timeout=3m + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.23.x + - name: Checkout code + uses: actions/checkout@v4 + - name: Run linters + uses: golangci/golangci-lint-action@v8 + with: + version: latest + args: --timeout=3m go-test: strategy: matrix: - go-version: [ 1.23.x ] - platform: [ ubuntu-latest ] + go-version: [1.23.x] + platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: - - name: Install Go - if: success() - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v4 - - name: go tests - run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json) - - name: annotate go tests - if: always() - uses: guyarb/golang-test-annotations@v0.5.1 - with: - test-results: test.json + - name: Install Go + if: success() + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v4 + - name: go tests + run: (set -o pipefail && go test -v -covermode=atomic -json -race ./... | tee test.json) + - name: annotate go tests + if: always() + uses: guyarb/golang-test-annotations@v0.6.0 + with: + test-results: test.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 647257b3..6e362d0f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,59 +3,17 @@ name: Release on: push: tags: - - '*' + - "*" jobs: - goreleaser: - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.23.x - - name: Set up Gon - run: brew tap conductorone/gon && brew install conductorone/gon/gon - - name: Import Keychain Certs - uses: apple-actions/import-codesign-certs@v1 - with: - p12-file-base64: ${{ secrets.APPLE_SIGNING_KEY_P12 }} - p12-password: ${{ secrets.APPLE_SIGNING_KEY_P12_PASSWORD }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - version: "~> v2" - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }} - AC_PASSWORD: ${{ secrets.AC_PASSWORD }} - AC_PROVIDER: ${{ secrets.AC_PROVIDER }} - goreleaser-docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.23.x - - name: Docker Login - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.RELENG_GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - version: "~> v2" - args: release --clean -f .goreleaser.docker.yaml - env: - GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }} + release: + uses: ConductorOne/github-workflows/.github/workflows/release.yaml@v2 + with: + tag: ${{ github.ref_name }} + secrets: + RELENG_GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }} + APPLE_SIGNING_KEY_P12: ${{ secrets.APPLE_SIGNING_KEY_P12 }} + APPLE_SIGNING_KEY_P12_PASSWORD: ${{ secrets.APPLE_SIGNING_KEY_P12_PASSWORD }} + AC_PASSWORD: ${{ secrets.AC_PASSWORD }} + AC_PROVIDER: ${{ secrets.AC_PROVIDER }} + DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} \ No newline at end of file diff --git a/baton-logo.png b/baton-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9daaea4de3f6cba506ee2826f3224a55abf654fa GIT binary patch literal 64445 zcmeFY^;Z<$7dAS^M?@qfL|VE*xUdPJOS27GR-}%v9G;M92RyZ-OAzB|dQm6|T(jFLLn1)vs z!mrLNrne-i=v1`7*GmpeB&nNA;%@lAfA4_$f+OMgg%4$EWg$Kb^mC_svwrc8WiQk! z;XueVAmSilhcyH!`u~3*kf6|RANI!Wu8ynazY^-ktkeIT;#(Bi|Gvoibbk#8CvUU` z6UCpON{xKzT&(fbvhk;8d_c!C?6vL(p#!Cly_-UB+_pY@d1f$dE{maKa?LC3IG@7K z1NogWXRf0%;sPfI_Rg5EcG4bJHXZxsx5m>>*Le-fO}g-+-R=gf^P@WIU+T_jrj5)e z#%k0)F&G`*TK2&#-RqpZK3lvxKZY((qDlKtzs#@@4@FfcxMX{%JQeoSXE0XD_(B_Q ze{PwuN@go`5IQ{@FoCu159wfZ^i(lBCftY}r6LcMnTBki<<49j4u%hRAFrJ1Wy>7&`^K3^}-xkdxm zH@U}t6U7T$pEq9y)-eo~XQV!M*5A3K9AaGxOWLVDNR zwjU(*w(?$Xloz{F&kfTMl#%(Ln%w>{H##P`ES#-H3fG=|fUgG}3Fk+!663pIZo6HQ zOen{)+4P*j!UOA?`@Dyn>#kxZx4jXkg)=C(JEWt`&@sPv>;eTc+t;{GdecP!z$68=p$A7|2ULQ7a#?##O&u3adtp z7oQbvDAjJ|6bm;GvyOs% zX%{Jg72U*`k71&%rT$(Syabsw^6e;M>TB{joqk%_>odaV>eV_(4>g`$XuM>& zl|FVa7~99Yji~6@FF&aBl$UoO>M1*xvwiYr#~Zzo7I)v@=t~L?g(6z)qw~Z;=a6^N zd2JI%7H91r@j3BwA8)0;8KtU7|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1ZdluO<^(-WLi;omV>POS6b-YGCn^g=hK^ zDc#gC-@$^OrS)A?%re-SG?QBo@efGF^-j>TrC(+I?tb+!E))a;(ep6rK+torYJdE1 z6ln>Dd}s@OP!BHprwQSfzE5Lp)WB6AvAjFVc0FM38^fX6O4@DC+s#IF(I*3Qcv5k4 zi%MJXDMR(WY1A&E&kX5`P>E#K>bwk+`bCExJN2kyPn}&XV6fycLHO25u5hTU#xDBm zp5s+^Nit=vDpK#(-GH3ASXJd{+ zsZ+4RbaRYCIVZqvB726wtEQLD1`xW93}ujii}xi}vw&c+ z!?^9s=4oi7kKH~ZA{VfZk39o^Q}8PPQfjd7S7c1SdV8_$cww$?tIusS3vsZ2GynBQx4SFuF@-@U+B@X;QT$pWGtsQr?TKdUsmP1wj#Stx^IL1g%AWz_0qsZE5%uc@ zJJ(KBce!w0nKes9DWfn;kzRyu9`! z4{SHoxY_9wT9&D>;}1~JV)`*6xC>Zlb91O*WvC8|E<|7CoV+%Nj4u%+sczUHX-xTv ztMblsYfO7y$0rGTpPiSxPswj?Nh5VPs(apP%@%vdlRY|{w5qmPKvKO9dTT_GN%E_8_JK>6-yqz4ElesW!#bg literal 0 HcmV?d00001 diff --git a/go.mod b/go.mod index bf2b9257..1d8bf29c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/conductorone/baton-sql go 1.24 require ( - github.com/conductorone/baton-sdk v0.3.7 + github.com/conductorone/baton-sdk v0.3.28 github.com/elliotchance/phpserialize v1.4.0 github.com/ennyjfrick/ruleguard-logfatal v0.0.2 github.com/go-sql-driver/mysql v1.9.2 @@ -124,6 +124,7 @@ require ( golang.org/x/oauth2 v0.29.0 // indirect golang.org/x/sync v0.13.0 // indirect golang.org/x/sys v0.32.0 // indirect + golang.org/x/term v0.31.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect google.golang.org/grpc v1.71.1 // indirect diff --git a/go.sum b/go.sum index c96e4612..98c4d5ad 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/conductorone/baton-sdk v0.3.7 h1:A6GNQtzsqPrupGsdFxA1/1kV4dMrGpP9n1r3Ahqpsjw= -github.com/conductorone/baton-sdk v0.3.7/go.mod h1:lWZHgu025Rsgs5jvBrhilGti0zWF2+YfaFY/bWOS/g0= +github.com/conductorone/baton-sdk v0.3.28 h1:tvOpgWr9MjBaG/eXj17oGl9EGGe1/yC5MMQTCcfQPhI= +github.com/conductorone/baton-sdk v0.3.28/go.mod h1:L55WO3ERMx1mfpjDgwK3jWNRGRF2E76WrQHmW6ev8VY= github.com/conductorone/dpop v0.2.4 h1:PaiDOX1gAIXtOJPxXf08GsGkpCuT/iECEjSJzLpi0zU= github.com/conductorone/dpop v0.2.4/go.mod h1:gyo8TtzB9SCFCsjsICH4IaLZ7y64CcrDXMOPBwfq/3s= github.com/conductorone/dpop/integrations/dpop_grpc v0.2.4 h1:lYxYi9/WTSL9sE96CO0QF2BY3kehs8dTTApI134TGCA= diff --git a/pkg/bcel/bcel_test.go b/pkg/bcel/bcel_test.go index 721e0e4d..dcf95367 100644 --- a/pkg/bcel/bcel_test.go +++ b/pkg/bcel/bcel_test.go @@ -1,7 +1,6 @@ package bcel import ( - "context" "fmt" "testing" @@ -11,7 +10,7 @@ import ( ) func TestTemplateEnv_Evaluate(tt *testing.T) { - ctx := context.Background() + ctx := tt.Context() for _, fn := range functions.GetAllFunctions() { for _, op := range fn.Overloads { diff --git a/pkg/bsql/entitlements.go b/pkg/bsql/entitlements.go index 77423b66..6c1b7e89 100644 --- a/pkg/bsql/entitlements.go +++ b/pkg/bsql/entitlements.go @@ -19,7 +19,7 @@ func (s *SQLSyncer) Entitlements(ctx context.Context, resource *v2.Resource, pTo return s.dynamicEntitlements(ctx, resource, pToken) } -func (s *SQLSyncer) staticEntitlements(ctx context.Context, resource *v2.Resource, pToken *pagination.Token) ([]*v2.Entitlement, string, annotations.Annotations, error) { +func (s *SQLSyncer) staticEntitlements(ctx context.Context, resource *v2.Resource, _ *pagination.Token) ([]*v2.Entitlement, string, annotations.Annotations, error) { inputs := s.env.SyncInputsWithResource(nil, resource) var ret []*v2.Entitlement diff --git a/pkg/bsql/provisioning.go b/pkg/bsql/provisioning.go index 03a0cd4c..c4317020 100644 --- a/pkg/bsql/provisioning.go +++ b/pkg/bsql/provisioning.go @@ -150,7 +150,7 @@ func (s *SQLSyncer) prepareProvisioningVars(ctx context.Context, vars map[string return ret, nil } -func (s *SQLSyncer) prepareSchemaVars(ctx context.Context, accountProvisioning *AccountProvisioning, accountInfo *v2.AccountInfo) (map[string]any, error) { +func (s *SQLSyncer) prepareSchemaVars(accountProvisioning *AccountProvisioning, accountInfo *v2.AccountInfo) (map[string]any, error) { inputs := make(map[string]any) for _, field := range accountProvisioning.Schema { diff --git a/pkg/bsql/query.go b/pkg/bsql/query.go index baa5597e..2511b105 100644 --- a/pkg/bsql/query.go +++ b/pkg/bsql/query.go @@ -95,7 +95,7 @@ func parseToken(token string) (*queryTokenOpts, error) { return opts, nil } -func (s *SQLSyncer) parseQueryOpts(ctx context.Context, pCtx *paginationContext, query string, vars map[string]any) (string, []interface{}, bool, error) { +func (s *SQLSyncer) parseQueryOpts(pCtx *paginationContext, query string, vars map[string]any) (string, []interface{}, bool, error) { if vars == nil { vars = make(map[string]any) } @@ -161,13 +161,13 @@ func clampPageSize(pageSize int) int64 { return int64(pageSize) } -func (s *SQLSyncer) prepareQuery(ctx context.Context, pToken *pagination.Token, query string, pOpts *Pagination, vars map[string]any) (string, []interface{}, *paginationContext, error) { - pCtx, err := s.setupPagination(ctx, pToken, pOpts) +func (s *SQLSyncer) prepareQuery(pToken *pagination.Token, query string, pOpts *Pagination, vars map[string]any) (string, []interface{}, *paginationContext, error) { + pCtx, err := s.setupPagination(pToken, pOpts) if err != nil { return "", nil, nil, err } - q, qArgs, paginationUsed, err := s.parseQueryOpts(ctx, pCtx, query, vars) + q, qArgs, paginationUsed, err := s.parseQueryOpts(pCtx, query, vars) if err != nil { return "", nil, nil, err } @@ -179,7 +179,7 @@ func (s *SQLSyncer) prepareQuery(ctx context.Context, pToken *pagination.Token, return q, qArgs, pCtx, nil } -func (s *SQLSyncer) nextPageToken(ctx context.Context, pCtx *paginationContext, lastRowID any) (string, error) { +func (s *SQLSyncer) nextPageToken(pCtx *paginationContext, lastRowID any) (string, error) { if pCtx == nil { return "", nil } @@ -227,7 +227,7 @@ func (s *SQLSyncer) nextPageToken(ctx context.Context, pCtx *paginationContext, return ret, nil } -func (s *SQLSyncer) setupPagination(ctx context.Context, pToken *pagination.Token, pOpts *Pagination) (*paginationContext, error) { +func (s *SQLSyncer) setupPagination(pToken *pagination.Token, pOpts *Pagination) (*paginationContext, error) { if pOpts == nil { return nil, nil } @@ -261,7 +261,7 @@ func (s *SQLSyncer) setupPagination(ctx context.Context, pToken *pagination.Toke return ret, nil } -func (s *SQLSyncer) prepareProvisioningQuery(ctx context.Context, query string, vars map[string]any) (string, []interface{}, error) { +func (s *SQLSyncer) prepareProvisioningQuery(query string, vars map[string]any) (string, []interface{}, error) { var qArgs []interface{} var parseErr error @@ -299,7 +299,7 @@ func (s *SQLSyncer) runProvisioningQueries(ctx context.Context, queries []string var executor executor = s.db if useTx { - tx, err := s.db.Begin() + tx, err := s.db.BeginTx(ctx, nil) if err != nil { return err } @@ -315,7 +315,7 @@ func (s *SQLSyncer) runProvisioningQueries(ctx context.Context, queries []string } for _, q := range queries { - q, qArgs, err := s.prepareProvisioningQuery(ctx, q, vars) + q, qArgs, err := s.prepareProvisioningQuery(q, vars) if err != nil { return err } @@ -387,7 +387,7 @@ func (s *SQLSyncer) runQuery( ) (string, error) { l := ctxzap.Extract(ctx) - q, qArgs, pCtx, err := s.prepareQuery(ctx, pToken, query, pOpts, vars) + q, qArgs, pCtx, err := s.prepareQuery(pToken, query, pOpts, vars) if err != nil { return "", err } @@ -454,7 +454,7 @@ func (s *SQLSyncer) runQuery( nextPageToken := "" if pCtx != nil && rowCount > int(pCtx.Limit) { - nextPageToken, err = s.nextPageToken(ctx, pCtx, lastRowID) + nextPageToken, err = s.nextPageToken(pCtx, lastRowID) if err != nil { return "", err } diff --git a/pkg/bsql/query_test.go b/pkg/bsql/query_test.go index 2135db03..4fcae4a7 100644 --- a/pkg/bsql/query_test.go +++ b/pkg/bsql/query_test.go @@ -99,7 +99,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with no replacements", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table", nil, nil, @@ -113,7 +113,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with same case replacement", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ?", &paginationContext{ Limit: 10, @@ -129,7 +129,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with different case replacement", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ?", &paginationContext{ Limit: 10, @@ -145,7 +145,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with multiple replacements (Postgres)", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ? OFFSET ?", &paginationContext{ Limit: 10, @@ -162,7 +162,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with multiple replacements (Postgres)", database.PostgreSQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ? OFFSET ?", &paginationContext{ Limit: 10, @@ -179,7 +179,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with multiple replacements (SQLite)", database.SQLite, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ? OFFSET ?", &paginationContext{ Limit: 10, @@ -196,7 +196,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with multiple replacements (MSSQL)", database.MSSQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ? OFFSET ?", &paginationContext{ Limit: 10, @@ -213,7 +213,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with multiple replacements (Oracle)", database.Oracle, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ? OFFSET ?", &paginationContext{ Limit: 10, @@ -230,7 +230,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with unknown token", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM ? LIMIT ? OFFSET ?", &paginationContext{ Limit: 10, @@ -247,7 +247,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with unquoted limit", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ?", &paginationContext{ Limit: 10, @@ -263,7 +263,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with unquoted offset", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table OFFSET ?", &paginationContext{ Offset: 123, @@ -279,7 +279,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with unquoted cursor", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table WHERE id > ?", &paginationContext{ Cursor: "abc123", @@ -295,7 +295,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with mixed quoted and unquoted options", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table WHERE id > ? LIMIT ?", &paginationContext{ Cursor: "abc123", @@ -312,7 +312,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test invalid unquoted option", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table LIMIT ?", &paginationContext{ Limit: 10, @@ -328,7 +328,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with var substitution", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM table WHERE test = ? and answer = ?", nil, map[string]any{ @@ -345,7 +345,7 @@ func Test_parseQueryOpts(t *testing.T) { "Test valid query with unquoted table name var substitution", database.MySQL, args{ - context.Background(), + t.Context(), "SELECT * FROM ? WHERE test = ?", nil, map[string]any{ @@ -364,7 +364,7 @@ func Test_parseQueryOpts(t *testing.T) { ss := &SQLSyncer{ dbEngine: tt.dbEngine, } - query, queryArgs, paginationUsed, err := ss.parseQueryOpts(tt.args.ctx, tt.args.pCtx, tt.args.query, tt.args.vars) + query, queryArgs, paginationUsed, err := ss.parseQueryOpts(tt.args.pCtx, tt.args.query, tt.args.vars) if (err != nil) != tt.wantErr { t.Errorf("parseQueryOpts() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/pkg/bsql/resource_types_test.go b/pkg/bsql/resource_types_test.go index 0169170a..951f7e91 100644 --- a/pkg/bsql/resource_types_test.go +++ b/pkg/bsql/resource_types_test.go @@ -1,7 +1,6 @@ package bsql import ( - "context" "testing" v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" @@ -9,7 +8,7 @@ import ( ) func TestConfig_GetResourceTypes_wordpress(t *testing.T) { - ctx := context.Background() + ctx := t.Context() wordpressConfig := loadExampleConfig(t, "wordpress") c, err := Parse([]byte(wordpressConfig)) require.NoError(t, err) diff --git a/pkg/bsql/resources.go b/pkg/bsql/resources.go index 1f251931..33e81bd8 100644 --- a/pkg/bsql/resources.go +++ b/pkg/bsql/resources.go @@ -41,7 +41,7 @@ func (s *SQLSyncer) List(ctx context.Context, parentResourceID *v2.ResourceId, p return ret, npt, nil, nil } -func (s *SQLSyncer) fetchTraits(ctx context.Context) map[string]bool { +func (s *SQLSyncer) fetchTraits() map[string]bool { traits := make(map[string]bool) mapTraits := s.config.List.Map.Traits if mapTraits != nil { @@ -373,7 +373,7 @@ func (s *SQLSyncer) mapRoleTrait(ctx context.Context, r *v2.Resource, rowMap map func (s *SQLSyncer) mapTraits(ctx context.Context, r *v2.Resource, rowMap map[string]any) error { l := ctxzap.Extract(ctx) - for trait, enabled := range s.fetchTraits(ctx) { + for trait, enabled := range s.fetchTraits() { if !enabled { continue } diff --git a/pkg/bsql/user_syncer.go b/pkg/bsql/user_syncer.go index cc60278d..60bf077f 100644 --- a/pkg/bsql/user_syncer.go +++ b/pkg/bsql/user_syncer.go @@ -121,7 +121,7 @@ func (s *userSyncer) CreateAccount( var ptds []*v2.PlaintextData - inputs, err := s.prepareSchemaVars(ctx, accountProvisioning, accountInfo) + inputs, err := s.prepareSchemaVars(accountProvisioning, accountInfo) if err != nil { return nil, nil, nil, err } diff --git a/pkg/config/gen/gen.go b/pkg/config/gen/gen.go new file mode 100644 index 00000000..3f5b3b94 --- /dev/null +++ b/pkg/config/gen/gen.go @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/conductorone/baton-sdk/pkg/config" + cfg "github.com/conductorone/baton-sql/pkg/config" +) + +func main() { + config.Generate("sql", cfg.Config) +} diff --git a/pkg/config/schema.gen.go b/pkg/config/schema.gen.go new file mode 100644 index 00000000..fdc22f1e --- /dev/null +++ b/pkg/config/schema.gen.go @@ -0,0 +1,83 @@ +// Code generated by baton-sdk. DO NOT EDIT!!! +package config + +import "reflect" + +type SQL struct { + ConfigPath string `mapstructure:"config-path"` +} + +func (c *SQL) findFieldByTag(tagValue string) (any, bool) { + v := reflect.ValueOf(c).Elem() // Dereference pointer to struct + t := v.Type() + + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + tag := field.Tag.Get("mapstructure") + + if tag == tagValue { + return v.Field(i).Interface(), true + } + } + return nil, false +} + +func (c *SQL) GetStringSlice(fieldName string) []string { + v, ok := c.findFieldByTag(fieldName) + if !ok { + return []string{} + } + t, ok := v.([]string) + if !ok { + panic("wrong type") + } + return t +} + +func (c *SQL) GetString(fieldName string) string { + v, ok := c.findFieldByTag(fieldName) + if !ok { + return "" + } + t, ok := v.(string) + if !ok { + panic("wrong type") + } + return t +} + +func (c *SQL) GetInt(fieldName string) int { + v, ok := c.findFieldByTag(fieldName) + if !ok { + return 0 + } + t, ok := v.(int) + if !ok { + panic("wrong type") + } + return t +} + +func (c *SQL) GetBool(fieldName string) bool { + v, ok := c.findFieldByTag(fieldName) + if !ok { + return false + } + t, ok := v.(bool) + if !ok { + panic("wrong type") + } + return t +} + +func (c *SQL) GetStringMap(fieldName string) map[string]any { + v, ok := c.findFieldByTag(fieldName) + if !ok { + return map[string]any{} + } + t, ok := v.(map[string]any) + if !ok { + panic("wrong type") + } + return t +} diff --git a/pkg/config/schema.go b/pkg/config/schema.go index 49cab541..514bb709 100644 --- a/pkg/config/schema.go +++ b/pkg/config/schema.go @@ -15,3 +15,12 @@ var ( } ConfigurationSchema = field.NewConfiguration(ConfigurationFields) ) + +var ( + Config = field.NewConfiguration( + ConfigurationFields, + field.WithConnectorDisplayName("SQL"), + field.WithHelpUrl("/docs/baton/sql"), + field.WithIconUrl("/static/app-icons/sql.svg"), + ) +) diff --git a/pkg/database/database.go b/pkg/database/database.go index f6174b0a..8d33c4d2 100644 --- a/pkg/database/database.go +++ b/pkg/database/database.go @@ -28,7 +28,7 @@ const ( Oracle ) -func updateFromEnv(ctx context.Context, dsn string) (string, error) { +func updateFromEnv(dsn string) (string, error) { var err error result := DSNREnvRegex.ReplaceAllStringFunc(dsn, func(match string) string { @@ -49,7 +49,7 @@ func updateFromEnv(ctx context.Context, dsn string) (string, error) { } func Connect(ctx context.Context, dsn string, user string, password string) (*sql.DB, DbEngine, error) { - populatedDSN, err := updateFromEnv(ctx, dsn) + populatedDSN, err := updateFromEnv(dsn) if err != nil { return nil, Unknown, err } @@ -64,12 +64,12 @@ func Connect(ctx context.Context, dsn string, user string, password string) (*sq return nil, Unknown, errors.New("user and password must be set in DSN or in the configuration") } - populatedUser, err := updateFromEnv(ctx, user) + populatedUser, err := updateFromEnv(user) if err != nil { return nil, Unknown, err } - populatedPassword, err := updateFromEnv(ctx, password) + populatedPassword, err := updateFromEnv(password) if err != nil { return nil, Unknown, err } diff --git a/pkg/database/database_test.go b/pkg/database/database_test.go index 8c091d79..9949957e 100644 --- a/pkg/database/database_test.go +++ b/pkg/database/database_test.go @@ -22,7 +22,7 @@ func Test_updateDSNFromEnv(t *testing.T) { "Test valid DSN with no replacements", map[string]string{}, args{ - context.Background(), + t.Context(), "mysql://user:password@localhost:3306/dbname", }, "mysql://user:password@localhost:3306/dbname", @@ -38,7 +38,7 @@ func Test_updateDSNFromEnv(t *testing.T) { "DB_NAME": "dbname", }, args{ - context.Background(), + t.Context(), "mysql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}", }, "mysql://user:password@localhost:3306/dbname", @@ -53,7 +53,7 @@ func Test_updateDSNFromEnv(t *testing.T) { "DB_NAME": "dbname", }, args{ - context.Background(), + t.Context(), "mysql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}", }, "", @@ -64,11 +64,9 @@ func Test_updateDSNFromEnv(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { for k, v := range tt.env { - if err := os.Setenv(k, v); err != nil { - t.Fatalf("failed to set env var %s: %v", k, err) - } + t.Setenv(k, v) } - got, err := updateFromEnv(tt.args.ctx, tt.args.dsn) + got, err := updateFromEnv(tt.args.dsn) if (err != nil) != tt.wantErr { t.Errorf("updateFromEnv() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go index ac5856b5..ebbf484a 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go @@ -133,16 +133,18 @@ func (StringFieldType) EnumDescriptor() ([]byte, []int) { } type Configuration struct { - state protoimpl.MessageState `protogen:"open.v1"` - Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` - Constraints []*Constraint `protobuf:"bytes,2,rep,name=constraints,proto3" json:"constraints,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - HelpUrl string `protobuf:"bytes,4,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"` - IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` - IsDirectory bool `protobuf:"varint,7,opt,name=is_directory,json=isDirectory,proto3" json:"is_directory,omitempty"` - CatalogId string `protobuf:"bytes,8,opt,name=catalog_id,json=catalogId,proto3" json:"catalog_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` + Constraints []*Constraint `protobuf:"bytes,2,rep,name=constraints,proto3" json:"constraints,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + HelpUrl string `protobuf:"bytes,4,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"` + IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` + IsDirectory bool `protobuf:"varint,7,opt,name=is_directory,json=isDirectory,proto3" json:"is_directory,omitempty"` + CatalogId string `protobuf:"bytes,8,opt,name=catalog_id,json=catalogId,proto3" json:"catalog_id,omitempty"` + SupportsExternalResources bool `protobuf:"varint,9,opt,name=supports_external_resources,json=supportsExternalResources,proto3" json:"supports_external_resources,omitempty"` + RequiresExternalConnector bool `protobuf:"varint,10,opt,name=requires_external_connector,json=requiresExternalConnector,proto3" json:"requires_external_connector,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -224,6 +226,20 @@ func (x *Configuration) GetCatalogId() string { return "" } +func (x *Configuration) GetSupportsExternalResources() bool { + if x != nil { + return x.SupportsExternalResources + } + return false +} + +func (x *Configuration) GetRequiresExternalConnector() bool { + if x != nil { + return x.RequiresExternalConnector + } + return false +} + type Constraint struct { state protoimpl.MessageState `protogen:"open.v1"` Kind ConstraintKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c1.config.v1.ConstraintKind" json:"kind,omitempty"` @@ -849,7 +865,7 @@ var file_c1_config_v1_config_proto_rawDesc = string([]byte{ 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, - 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x03, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x3a, 0x0a, @@ -866,7 +882,15 @@ var file_c1_config_v1_config_proto_rawDesc = string([]byte{ 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x49, 0x64, 0x22, 0xea, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x6f, 0x67, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x1b, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, + 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x22, 0xea, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go index c97b1e8f..e2114f8d 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go @@ -135,6 +135,10 @@ func (m *Configuration) validate(all bool) error { // no validation rules for CatalogId + // no validation rules for SupportsExternalResources + + // no validation rules for RequiresExternalConnector + if len(errors) > 0 { return ConfigurationMultiError(errors) } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go index c4d64910..2803d103 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go @@ -65,6 +65,58 @@ func (x *ExternalTicketSettings) GetEnabled() bool { return false } +type ExternalTicketRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExternalTicketProvisionerConfigId string `protobuf:"bytes,2,opt,name=external_ticket_provisioner_config_id,json=externalTicketProvisionerConfigId,proto3" json:"external_ticket_provisioner_config_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalTicketRef) Reset() { + *x = ExternalTicketRef{} + mi := &file_c1_connector_v2_annotation_external_ticket_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalTicketRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalTicketRef) ProtoMessage() {} + +func (x *ExternalTicketRef) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_external_ticket_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalTicketRef.ProtoReflect.Descriptor instead. +func (*ExternalTicketRef) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_external_ticket_proto_rawDescGZIP(), []int{1} +} + +func (x *ExternalTicketRef) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ExternalTicketRef) GetExternalTicketProvisionerConfigId() string { + if x != nil { + return x.ExternalTicketProvisionerConfigId + } + return "" +} + var File_c1_connector_v2_annotation_external_ticket_proto protoreflect.FileDescriptor var file_c1_connector_v2_annotation_external_ticket_proto_rawDesc = string([]byte{ @@ -75,11 +127,18 @@ var file_c1_connector_v2_annotation_external_ticket_proto_rawDesc = string([]byt 0x2e, 0x76, 0x32, 0x22, 0x32, 0x0a, 0x16, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, - 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, - 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x75, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x50, 0x0a, 0x25, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x21, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x42, 0x36, + 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, + 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -94,9 +153,10 @@ func file_c1_connector_v2_annotation_external_ticket_proto_rawDescGZIP() []byte return file_c1_connector_v2_annotation_external_ticket_proto_rawDescData } -var file_c1_connector_v2_annotation_external_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_c1_connector_v2_annotation_external_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_c1_connector_v2_annotation_external_ticket_proto_goTypes = []any{ (*ExternalTicketSettings)(nil), // 0: c1.connector.v2.ExternalTicketSettings + (*ExternalTicketRef)(nil), // 1: c1.connector.v2.ExternalTicketRef } var file_c1_connector_v2_annotation_external_ticket_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -117,7 +177,7 @@ func file_c1_connector_v2_annotation_external_ticket_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_external_ticket_proto_rawDesc), len(file_c1_connector_v2_annotation_external_ticket_proto_rawDesc)), NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go index a718090c..7bb3ab10 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go @@ -138,3 +138,109 @@ var _ interface { Cause() error ErrorName() string } = ExternalTicketSettingsValidationError{} + +// Validate checks the field values on ExternalTicketRef with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ExternalTicketRef) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalTicketRef with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExternalTicketRefMultiError, or nil if none found. +func (m *ExternalTicketRef) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalTicketRef) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for ExternalTicketProvisionerConfigId + + if len(errors) > 0 { + return ExternalTicketRefMultiError(errors) + } + + return nil +} + +// ExternalTicketRefMultiError is an error wrapping multiple validation errors +// returned by ExternalTicketRef.ValidateAll() if the designated constraints +// aren't met. +type ExternalTicketRefMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalTicketRefMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalTicketRefMultiError) AllErrors() []error { return m } + +// ExternalTicketRefValidationError is the validation error returned by +// ExternalTicketRef.Validate if the designated constraints aren't met. +type ExternalTicketRefValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalTicketRefValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalTicketRefValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalTicketRefValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalTicketRefValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalTicketRefValidationError) ErrorName() string { + return "ExternalTicketRefValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalTicketRefValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExternalTicketRef.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalTicketRefValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalTicketRefValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go index 6ef572ac..3027d370 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go @@ -39,6 +39,7 @@ const ( Capability_CAPABILITY_SYNC_SECRETS Capability = 9 Capability_CAPABILITY_ACTIONS Capability = 10 Capability_CAPABILITY_TARGETED_SYNC Capability = 11 + Capability_CAPABILITY_EVENT_FEED_V2 Capability = 12 ) // Enum value maps for Capability. @@ -56,6 +57,7 @@ var ( 9: "CAPABILITY_SYNC_SECRETS", 10: "CAPABILITY_ACTIONS", 11: "CAPABILITY_TARGETED_SYNC", + 12: "CAPABILITY_EVENT_FEED_V2", } Capability_value = map[string]int32{ "CAPABILITY_UNSPECIFIED": 0, @@ -70,6 +72,7 @@ var ( "CAPABILITY_SYNC_SECRETS": 9, "CAPABILITY_ACTIONS": 10, "CAPABILITY_TARGETED_SYNC": 11, + "CAPABILITY_EVENT_FEED_V2": 12, } ) @@ -1473,7 +1476,7 @@ var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, - 0xe8, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, + 0x86, 0x03, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, @@ -1495,49 +1498,51 @@ var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{ 0x54, 0x53, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, - 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x0b, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, - 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, - 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, - 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, - 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, - 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, - 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, - 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, - 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, + 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x0b, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, + 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, + 0x45, 0x45, 0x44, 0x5f, 0x56, 0x32, 0x10, 0x0c, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, + 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, + 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, - 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, - 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, + 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, + 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, + 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, + 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, - 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, - 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, - 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, - 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, + 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, + 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go index 916c5052..0da9efb1 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go @@ -24,13 +24,65 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type EventType int32 + +const ( + EventType_EVENT_TYPE_UNSPECIFIED EventType = 0 + EventType_EVENT_TYPE_USAGE EventType = 1 + EventType_EVENT_TYPE_RESOURCE_CHANGE EventType = 4 +) + +// Enum value maps for EventType. +var ( + EventType_name = map[int32]string{ + 0: "EVENT_TYPE_UNSPECIFIED", + 1: "EVENT_TYPE_USAGE", + 4: "EVENT_TYPE_RESOURCE_CHANGE", + } + EventType_value = map[string]int32{ + "EVENT_TYPE_UNSPECIFIED": 0, + "EVENT_TYPE_USAGE": 1, + "EVENT_TYPE_RESOURCE_CHANGE": 4, + } +) + +func (x EventType) Enum() *EventType { + p := new(EventType) + *p = x + return p +} + +func (x EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventType) Descriptor() protoreflect.EnumDescriptor { + return file_c1_connector_v2_event_feed_proto_enumTypes[0].Descriptor() +} + +func (EventType) Type() protoreflect.EnumType { + return &file_c1_connector_v2_event_feed_proto_enumTypes[0] +} + +func (x EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EventType.Descriptor instead. +func (EventType) EnumDescriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{0} +} + type ListEventsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Can function like a page token but also can be arbitrary to resume a feed at any point - Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` - StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` - PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` + StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` + PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + // Used to specify a specific event feed to list events from. + // If not provided, the connector will use the old event feed. + EventFeedId string `protobuf:"bytes,5,opt,name=event_feed_id,json=eventFeedId,proto3" json:"event_feed_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -93,6 +145,13 @@ func (x *ListEventsRequest) GetAnnotations() []*anypb.Any { return nil } +func (x *ListEventsRequest) GetEventFeedId() string { + if x != nil { + return x.EventFeedId + } + return "" +} + type ListEventsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` @@ -161,6 +220,102 @@ func (x *ListEventsResponse) GetAnnotations() []*anypb.Any { return nil } +type ListEventFeedsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListEventFeedsRequest) Reset() { + *x = ListEventFeedsRequest{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListEventFeedsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEventFeedsRequest) ProtoMessage() {} + +func (x *ListEventFeedsRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEventFeedsRequest.ProtoReflect.Descriptor instead. +func (*ListEventFeedsRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{2} +} + +func (x *ListEventFeedsRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ListEventFeedsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + List []*EventFeedMetadata `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListEventFeedsResponse) Reset() { + *x = ListEventFeedsResponse{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListEventFeedsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEventFeedsResponse) ProtoMessage() {} + +func (x *ListEventFeedsResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEventFeedsResponse.ProtoReflect.Descriptor instead. +func (*ListEventFeedsResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{3} +} + +func (x *ListEventFeedsResponse) GetList() []*EventFeedMetadata { + if x != nil { + return x.List + } + return nil +} + +func (x *ListEventFeedsResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type Event struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -183,7 +338,7 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -195,7 +350,7 @@ func (x *Event) String() string { func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -208,7 +363,7 @@ func (x *Event) ProtoReflect() protoreflect.Message { // Deprecated: Use Event.ProtoReflect.Descriptor instead. func (*Event) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{2} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{4} } func (x *Event) GetId() string { @@ -313,7 +468,7 @@ type UsageEvent struct { func (x *UsageEvent) Reset() { *x = UsageEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -325,7 +480,7 @@ func (x *UsageEvent) String() string { func (*UsageEvent) ProtoMessage() {} func (x *UsageEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -338,7 +493,7 @@ func (x *UsageEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use UsageEvent.ProtoReflect.Descriptor instead. func (*UsageEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{3} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{5} } func (x *UsageEvent) GetTargetResource() *Resource { @@ -365,7 +520,7 @@ type GrantEvent struct { func (x *GrantEvent) Reset() { *x = GrantEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -377,7 +532,7 @@ func (x *GrantEvent) String() string { func (*GrantEvent) ProtoMessage() {} func (x *GrantEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -390,7 +545,7 @@ func (x *GrantEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantEvent.ProtoReflect.Descriptor instead. func (*GrantEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{4} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{6} } func (x *GrantEvent) GetGrant() *Grant { @@ -410,7 +565,7 @@ type RevokeEvent struct { func (x *RevokeEvent) Reset() { *x = RevokeEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -422,7 +577,7 @@ func (x *RevokeEvent) String() string { func (*RevokeEvent) ProtoMessage() {} func (x *RevokeEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -435,7 +590,7 @@ func (x *RevokeEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeEvent.ProtoReflect.Descriptor instead. func (*RevokeEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{5} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{7} } func (x *RevokeEvent) GetEntitlement() *Entitlement { @@ -463,7 +618,7 @@ type ResourceChangeEvent struct { func (x *ResourceChangeEvent) Reset() { *x = ResourceChangeEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -475,7 +630,7 @@ func (x *ResourceChangeEvent) String() string { func (*ResourceChangeEvent) ProtoMessage() {} func (x *ResourceChangeEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -488,7 +643,7 @@ func (x *ResourceChangeEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use ResourceChangeEvent.ProtoReflect.Descriptor instead. func (*ResourceChangeEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{6} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{8} } func (x *ResourceChangeEvent) GetResourceId() *ResourceId { @@ -505,6 +660,59 @@ func (x *ResourceChangeEvent) GetParentResourceId() *ResourceId { return nil } +type EventFeedMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + // unique identifier for the event feed + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SupportedEventTypes []EventType `protobuf:"varint,2,rep,packed,name=supported_event_types,json=supportedEventTypes,proto3,enum=c1.connector.v2.EventType" json:"supported_event_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventFeedMetadata) Reset() { + *x = EventFeedMetadata{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventFeedMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventFeedMetadata) ProtoMessage() {} + +func (x *EventFeedMetadata) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventFeedMetadata.ProtoReflect.Descriptor instead. +func (*EventFeedMetadata) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{9} +} + +func (x *EventFeedMetadata) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *EventFeedMetadata) GetSupportedEventTypes() []EventType { + if x != nil { + return x.SupportedEventTypes + } + return nil +} + var File_c1_connector_v2_event_feed_proto protoreflect.FileDescriptor var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ @@ -522,7 +730,7 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x63, @@ -535,90 +743,129 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbe, 0x01, - 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, - 0xd0, 0x01, 0x01, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, - 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, - 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb4, - 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x61, - 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, - 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, - 0xa8, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x0a, + 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, + 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x49, 0x64, + 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, + 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x19, + 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, + 0x65, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb4, 0x03, + 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x13, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0xa8, + 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x32, 0x65, 0x0a, 0x0c, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, - 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x49, + 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x11, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, + 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x02, 0x69, 0x64, 0x12, 0x5f, 0x0a, 0x15, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x92, 0x01, 0x09, 0x18, 0x01, + 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2a, 0x69, 0x0a, 0x09, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x04, 0x22, 0x04, 0x08, 0x02, 0x10, + 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, 0xc8, 0x01, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x61, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, + 0x73, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, + 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, }) var ( @@ -633,47 +880,58 @@ func file_c1_connector_v2_event_feed_proto_rawDescGZIP() []byte { return file_c1_connector_v2_event_feed_proto_rawDescData } -var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_c1_connector_v2_event_feed_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_c1_connector_v2_event_feed_proto_goTypes = []any{ - (*ListEventsRequest)(nil), // 0: c1.connector.v2.ListEventsRequest - (*ListEventsResponse)(nil), // 1: c1.connector.v2.ListEventsResponse - (*Event)(nil), // 2: c1.connector.v2.Event - (*UsageEvent)(nil), // 3: c1.connector.v2.UsageEvent - (*GrantEvent)(nil), // 4: c1.connector.v2.GrantEvent - (*RevokeEvent)(nil), // 5: c1.connector.v2.RevokeEvent - (*ResourceChangeEvent)(nil), // 6: c1.connector.v2.ResourceChangeEvent - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*anypb.Any)(nil), // 8: google.protobuf.Any - (*Resource)(nil), // 9: c1.connector.v2.Resource - (*Grant)(nil), // 10: c1.connector.v2.Grant - (*Entitlement)(nil), // 11: c1.connector.v2.Entitlement - (*ResourceId)(nil), // 12: c1.connector.v2.ResourceId + (EventType)(0), // 0: c1.connector.v2.EventType + (*ListEventsRequest)(nil), // 1: c1.connector.v2.ListEventsRequest + (*ListEventsResponse)(nil), // 2: c1.connector.v2.ListEventsResponse + (*ListEventFeedsRequest)(nil), // 3: c1.connector.v2.ListEventFeedsRequest + (*ListEventFeedsResponse)(nil), // 4: c1.connector.v2.ListEventFeedsResponse + (*Event)(nil), // 5: c1.connector.v2.Event + (*UsageEvent)(nil), // 6: c1.connector.v2.UsageEvent + (*GrantEvent)(nil), // 7: c1.connector.v2.GrantEvent + (*RevokeEvent)(nil), // 8: c1.connector.v2.RevokeEvent + (*ResourceChangeEvent)(nil), // 9: c1.connector.v2.ResourceChangeEvent + (*EventFeedMetadata)(nil), // 10: c1.connector.v2.EventFeedMetadata + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*anypb.Any)(nil), // 12: google.protobuf.Any + (*Resource)(nil), // 13: c1.connector.v2.Resource + (*Grant)(nil), // 14: c1.connector.v2.Grant + (*Entitlement)(nil), // 15: c1.connector.v2.Entitlement + (*ResourceId)(nil), // 16: c1.connector.v2.ResourceId } var file_c1_connector_v2_event_feed_proto_depIdxs = []int32{ - 7, // 0: c1.connector.v2.ListEventsRequest.start_at:type_name -> google.protobuf.Timestamp - 8, // 1: c1.connector.v2.ListEventsRequest.annotations:type_name -> google.protobuf.Any - 2, // 2: c1.connector.v2.ListEventsResponse.events:type_name -> c1.connector.v2.Event - 8, // 3: c1.connector.v2.ListEventsResponse.annotations:type_name -> google.protobuf.Any - 7, // 4: c1.connector.v2.Event.occurred_at:type_name -> google.protobuf.Timestamp - 3, // 5: c1.connector.v2.Event.usage_event:type_name -> c1.connector.v2.UsageEvent - 4, // 6: c1.connector.v2.Event.grant_event:type_name -> c1.connector.v2.GrantEvent - 5, // 7: c1.connector.v2.Event.revoke_event:type_name -> c1.connector.v2.RevokeEvent - 6, // 8: c1.connector.v2.Event.resource_change_event:type_name -> c1.connector.v2.ResourceChangeEvent - 8, // 9: c1.connector.v2.Event.annotations:type_name -> google.protobuf.Any - 9, // 10: c1.connector.v2.UsageEvent.target_resource:type_name -> c1.connector.v2.Resource - 9, // 11: c1.connector.v2.UsageEvent.actor_resource:type_name -> c1.connector.v2.Resource - 10, // 12: c1.connector.v2.GrantEvent.grant:type_name -> c1.connector.v2.Grant - 11, // 13: c1.connector.v2.RevokeEvent.entitlement:type_name -> c1.connector.v2.Entitlement - 9, // 14: c1.connector.v2.RevokeEvent.principal:type_name -> c1.connector.v2.Resource - 12, // 15: c1.connector.v2.ResourceChangeEvent.resource_id:type_name -> c1.connector.v2.ResourceId - 12, // 16: c1.connector.v2.ResourceChangeEvent.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 0, // 17: c1.connector.v2.EventService.ListEvents:input_type -> c1.connector.v2.ListEventsRequest - 1, // 18: c1.connector.v2.EventService.ListEvents:output_type -> c1.connector.v2.ListEventsResponse - 18, // [18:19] is the sub-list for method output_type - 17, // [17:18] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 11, // 0: c1.connector.v2.ListEventsRequest.start_at:type_name -> google.protobuf.Timestamp + 12, // 1: c1.connector.v2.ListEventsRequest.annotations:type_name -> google.protobuf.Any + 5, // 2: c1.connector.v2.ListEventsResponse.events:type_name -> c1.connector.v2.Event + 12, // 3: c1.connector.v2.ListEventsResponse.annotations:type_name -> google.protobuf.Any + 12, // 4: c1.connector.v2.ListEventFeedsRequest.annotations:type_name -> google.protobuf.Any + 10, // 5: c1.connector.v2.ListEventFeedsResponse.list:type_name -> c1.connector.v2.EventFeedMetadata + 12, // 6: c1.connector.v2.ListEventFeedsResponse.annotations:type_name -> google.protobuf.Any + 11, // 7: c1.connector.v2.Event.occurred_at:type_name -> google.protobuf.Timestamp + 6, // 8: c1.connector.v2.Event.usage_event:type_name -> c1.connector.v2.UsageEvent + 7, // 9: c1.connector.v2.Event.grant_event:type_name -> c1.connector.v2.GrantEvent + 8, // 10: c1.connector.v2.Event.revoke_event:type_name -> c1.connector.v2.RevokeEvent + 9, // 11: c1.connector.v2.Event.resource_change_event:type_name -> c1.connector.v2.ResourceChangeEvent + 12, // 12: c1.connector.v2.Event.annotations:type_name -> google.protobuf.Any + 13, // 13: c1.connector.v2.UsageEvent.target_resource:type_name -> c1.connector.v2.Resource + 13, // 14: c1.connector.v2.UsageEvent.actor_resource:type_name -> c1.connector.v2.Resource + 14, // 15: c1.connector.v2.GrantEvent.grant:type_name -> c1.connector.v2.Grant + 15, // 16: c1.connector.v2.RevokeEvent.entitlement:type_name -> c1.connector.v2.Entitlement + 13, // 17: c1.connector.v2.RevokeEvent.principal:type_name -> c1.connector.v2.Resource + 16, // 18: c1.connector.v2.ResourceChangeEvent.resource_id:type_name -> c1.connector.v2.ResourceId + 16, // 19: c1.connector.v2.ResourceChangeEvent.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 0, // 20: c1.connector.v2.EventFeedMetadata.supported_event_types:type_name -> c1.connector.v2.EventType + 1, // 21: c1.connector.v2.EventService.ListEvents:input_type -> c1.connector.v2.ListEventsRequest + 3, // 22: c1.connector.v2.EventService.ListEventFeeds:input_type -> c1.connector.v2.ListEventFeedsRequest + 2, // 23: c1.connector.v2.EventService.ListEvents:output_type -> c1.connector.v2.ListEventsResponse + 4, // 24: c1.connector.v2.EventService.ListEventFeeds:output_type -> c1.connector.v2.ListEventFeedsResponse + 23, // [23:25] is the sub-list for method output_type + 21, // [21:23] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_c1_connector_v2_event_feed_proto_init() } @@ -684,7 +942,7 @@ func file_c1_connector_v2_event_feed_proto_init() { file_c1_connector_v2_entitlement_proto_init() file_c1_connector_v2_grant_proto_init() file_c1_connector_v2_resource_proto_init() - file_c1_connector_v2_event_feed_proto_msgTypes[2].OneofWrappers = []any{ + file_c1_connector_v2_event_feed_proto_msgTypes[4].OneofWrappers = []any{ (*Event_UsageEvent)(nil), (*Event_GrantEvent)(nil), (*Event_RevokeEvent)(nil), @@ -695,13 +953,14 @@ func file_c1_connector_v2_event_feed_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_event_feed_proto_rawDesc), len(file_c1_connector_v2_event_feed_proto_rawDesc)), - NumEnums: 0, - NumMessages: 7, + NumEnums: 1, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, GoTypes: file_c1_connector_v2_event_feed_proto_goTypes, DependencyIndexes: file_c1_connector_v2_event_feed_proto_depIdxs, + EnumInfos: file_c1_connector_v2_event_feed_proto_enumTypes, MessageInfos: file_c1_connector_v2_event_feed_proto_msgTypes, }.Build() File_c1_connector_v2_event_feed_proto = out.File diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go index 1f6f2558..bc384bf6 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go @@ -150,6 +150,21 @@ func (m *ListEventsRequest) validate(all bool) error { } + if m.GetEventFeedId() != "" { + + if l := len(m.GetEventFeedId()); l < 1 || l > 1024 { + err := ListEventsRequestValidationError{ + field: "EventFeedId", + reason: "value length must be between 1 and 1024 bytes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + if len(errors) > 0 { return ListEventsRequestMultiError(errors) } @@ -417,6 +432,312 @@ var _ interface { ErrorName() string } = ListEventsResponseValidationError{} +// Validate checks the field values on ListEventFeedsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListEventFeedsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListEventFeedsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListEventFeedsRequestMultiError, or nil if none found. +func (m *ListEventFeedsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListEventFeedsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListEventFeedsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListEventFeedsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListEventFeedsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListEventFeedsRequestMultiError(errors) + } + + return nil +} + +// ListEventFeedsRequestMultiError is an error wrapping multiple validation +// errors returned by ListEventFeedsRequest.ValidateAll() if the designated +// constraints aren't met. +type ListEventFeedsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListEventFeedsRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListEventFeedsRequestMultiError) AllErrors() []error { return m } + +// ListEventFeedsRequestValidationError is the validation error returned by +// ListEventFeedsRequest.Validate if the designated constraints aren't met. +type ListEventFeedsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListEventFeedsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListEventFeedsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListEventFeedsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListEventFeedsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListEventFeedsRequestValidationError) ErrorName() string { + return "ListEventFeedsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListEventFeedsRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListEventFeedsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListEventFeedsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListEventFeedsRequestValidationError{} + +// Validate checks the field values on ListEventFeedsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListEventFeedsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListEventFeedsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListEventFeedsResponseMultiError, or nil if none found. +func (m *ListEventFeedsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListEventFeedsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetList() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListEventFeedsResponseMultiError(errors) + } + + return nil +} + +// ListEventFeedsResponseMultiError is an error wrapping multiple validation +// errors returned by ListEventFeedsResponse.ValidateAll() if the designated +// constraints aren't met. +type ListEventFeedsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListEventFeedsResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListEventFeedsResponseMultiError) AllErrors() []error { return m } + +// ListEventFeedsResponseValidationError is the validation error returned by +// ListEventFeedsResponse.Validate if the designated constraints aren't met. +type ListEventFeedsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListEventFeedsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListEventFeedsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListEventFeedsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListEventFeedsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListEventFeedsResponseValidationError) ErrorName() string { + return "ListEventFeedsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListEventFeedsResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListEventFeedsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListEventFeedsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListEventFeedsResponseValidationError{} + // Validate checks the field values on Event with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. @@ -1361,3 +1682,147 @@ var _ interface { Cause() error ErrorName() string } = ResourceChangeEventValidationError{} + +// Validate checks the field values on EventFeedMetadata with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *EventFeedMetadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EventFeedMetadata with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EventFeedMetadataMultiError, or nil if none found. +func (m *EventFeedMetadata) ValidateAll() error { + return m.validate(true) +} + +func (m *EventFeedMetadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if l := len(m.GetId()); l < 1 || l > 1024 { + err := EventFeedMetadataValidationError{ + field: "Id", + reason: "value length must be between 1 and 1024 bytes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + _EventFeedMetadata_SupportedEventTypes_Unique := make(map[EventType]struct{}, len(m.GetSupportedEventTypes())) + + for idx, item := range m.GetSupportedEventTypes() { + _, _ = idx, item + + if _, exists := _EventFeedMetadata_SupportedEventTypes_Unique[item]; exists { + err := EventFeedMetadataValidationError{ + field: fmt.Sprintf("SupportedEventTypes[%v]", idx), + reason: "repeated value must contain unique items", + } + if !all { + return err + } + errors = append(errors, err) + } else { + _EventFeedMetadata_SupportedEventTypes_Unique[item] = struct{}{} + } + + if _, ok := EventType_name[int32(item)]; !ok { + err := EventFeedMetadataValidationError{ + field: fmt.Sprintf("SupportedEventTypes[%v]", idx), + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return EventFeedMetadataMultiError(errors) + } + + return nil +} + +// EventFeedMetadataMultiError is an error wrapping multiple validation errors +// returned by EventFeedMetadata.ValidateAll() if the designated constraints +// aren't met. +type EventFeedMetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EventFeedMetadataMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EventFeedMetadataMultiError) AllErrors() []error { return m } + +// EventFeedMetadataValidationError is the validation error returned by +// EventFeedMetadata.Validate if the designated constraints aren't met. +type EventFeedMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EventFeedMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EventFeedMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EventFeedMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EventFeedMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EventFeedMetadataValidationError) ErrorName() string { + return "EventFeedMetadataValidationError" +} + +// Error satisfies the builtin error interface +func (e EventFeedMetadataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sEventFeedMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EventFeedMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EventFeedMetadataValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go index e82c8c80..1d5b11f2 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go @@ -19,7 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - EventService_ListEvents_FullMethodName = "/c1.connector.v2.EventService/ListEvents" + EventService_ListEvents_FullMethodName = "/c1.connector.v2.EventService/ListEvents" + EventService_ListEventFeeds_FullMethodName = "/c1.connector.v2.EventService/ListEventFeeds" ) // EventServiceClient is the client API for EventService service. @@ -27,6 +28,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type EventServiceClient interface { ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) + ListEventFeeds(ctx context.Context, in *ListEventFeedsRequest, opts ...grpc.CallOption) (*ListEventFeedsResponse, error) } type eventServiceClient struct { @@ -47,11 +49,22 @@ func (c *eventServiceClient) ListEvents(ctx context.Context, in *ListEventsReque return out, nil } +func (c *eventServiceClient) ListEventFeeds(ctx context.Context, in *ListEventFeedsRequest, opts ...grpc.CallOption) (*ListEventFeedsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListEventFeedsResponse) + err := c.cc.Invoke(ctx, EventService_ListEventFeeds_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // EventServiceServer is the server API for EventService service. // All implementations should embed UnimplementedEventServiceServer // for forward compatibility. type EventServiceServer interface { ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) + ListEventFeeds(context.Context, *ListEventFeedsRequest) (*ListEventFeedsResponse, error) } // UnimplementedEventServiceServer should be embedded to have @@ -64,6 +77,9 @@ type UnimplementedEventServiceServer struct{} func (UnimplementedEventServiceServer) ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented") } +func (UnimplementedEventServiceServer) ListEventFeeds(context.Context, *ListEventFeedsRequest) (*ListEventFeedsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEventFeeds not implemented") +} func (UnimplementedEventServiceServer) testEmbeddedByValue() {} // UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. @@ -102,6 +118,24 @@ func _EventService_ListEvents_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _EventService_ListEventFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEventFeedsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventServiceServer).ListEventFeeds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventService_ListEventFeeds_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventServiceServer).ListEventFeeds(ctx, req.(*ListEventFeedsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -113,6 +147,10 @@ var EventService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListEvents", Handler: _EventService_ListEvents_Handler, }, + { + MethodName: "ListEventFeeds", + Handler: _EventService_ListEventFeeds_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "c1/connector/v2/event_feed.proto", diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go index ad9f2313..42bf6b92 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go @@ -129,7 +129,7 @@ func (x Resource_CreationSource) Number() protoreflect.EnumNumber { // Deprecated: Use Resource_CreationSource.Descriptor instead. func (Resource_CreationSource) EnumDescriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20, 0} } type ResourceType struct { @@ -904,6 +904,58 @@ func (*CredentialOptions_NoPassword_) isCredentialOptions_Options() {} func (*CredentialOptions_Sso) isCredentialOptions_Options() {} +type PasswordConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + CharSet string `protobuf:"bytes,1,opt,name=char_set,json=charSet,proto3" json:"char_set,omitempty"` + MinCount uint32 `protobuf:"varint,2,opt,name=min_count,json=minCount,proto3" json:"min_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PasswordConstraint) Reset() { + *x = PasswordConstraint{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PasswordConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PasswordConstraint) ProtoMessage() {} + +func (x *PasswordConstraint) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PasswordConstraint.ProtoReflect.Descriptor instead. +func (*PasswordConstraint) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{13} +} + +func (x *PasswordConstraint) GetCharSet() string { + if x != nil { + return x.CharSet + } + return "" +} + +func (x *PasswordConstraint) GetMinCount() uint32 { + if x != nil { + return x.MinCount + } + return 0 +} + type CreateAccountRequest struct { state protoimpl.MessageState `protogen:"open.v1"` AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` @@ -915,7 +967,7 @@ type CreateAccountRequest struct { func (x *CreateAccountRequest) Reset() { *x = CreateAccountRequest{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[13] + mi := &file_c1_connector_v2_resource_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -927,7 +979,7 @@ func (x *CreateAccountRequest) String() string { func (*CreateAccountRequest) ProtoMessage() {} func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[13] + mi := &file_c1_connector_v2_resource_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -940,7 +992,7 @@ func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead. func (*CreateAccountRequest) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{13} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14} } func (x *CreateAccountRequest) GetAccountInfo() *AccountInfo { @@ -979,7 +1031,7 @@ type CreateAccountResponse struct { func (x *CreateAccountResponse) Reset() { *x = CreateAccountResponse{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[14] + mi := &file_c1_connector_v2_resource_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -991,7 +1043,7 @@ func (x *CreateAccountResponse) String() string { func (*CreateAccountResponse) ProtoMessage() {} func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[14] + mi := &file_c1_connector_v2_resource_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1004,7 +1056,7 @@ func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead. func (*CreateAccountResponse) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15} } func (x *CreateAccountResponse) GetResult() isCreateAccountResponse_Result { @@ -1078,7 +1130,7 @@ type EncryptedData struct { func (x *EncryptedData) Reset() { *x = EncryptedData{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[15] + mi := &file_c1_connector_v2_resource_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1090,7 +1142,7 @@ func (x *EncryptedData) String() string { func (*EncryptedData) ProtoMessage() {} func (x *EncryptedData) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[15] + mi := &file_c1_connector_v2_resource_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1103,7 +1155,7 @@ func (x *EncryptedData) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptedData.ProtoReflect.Descriptor instead. func (*EncryptedData) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{16} } func (x *EncryptedData) GetProvider() string { @@ -1168,7 +1220,7 @@ type PlaintextData struct { func (x *PlaintextData) Reset() { *x = PlaintextData{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[16] + mi := &file_c1_connector_v2_resource_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1180,7 +1232,7 @@ func (x *PlaintextData) String() string { func (*PlaintextData) ProtoMessage() {} func (x *PlaintextData) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[16] + mi := &file_c1_connector_v2_resource_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1193,7 +1245,7 @@ func (x *PlaintextData) ProtoReflect() protoreflect.Message { // Deprecated: Use PlaintextData.ProtoReflect.Descriptor instead. func (*PlaintextData) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{16} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17} } func (x *PlaintextData) GetName() string { @@ -1239,7 +1291,7 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[17] + mi := &file_c1_connector_v2_resource_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1251,7 +1303,7 @@ func (x *EncryptionConfig) String() string { func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[17] + mi := &file_c1_connector_v2_resource_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1264,7 +1316,7 @@ func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptionConfig.ProtoReflect.Descriptor instead. func (*EncryptionConfig) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18} } func (x *EncryptionConfig) GetPrincipal() *Resource { @@ -1325,7 +1377,7 @@ type ResourceId struct { func (x *ResourceId) Reset() { *x = ResourceId{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[18] + mi := &file_c1_connector_v2_resource_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1337,7 +1389,7 @@ func (x *ResourceId) String() string { func (*ResourceId) ProtoMessage() {} func (x *ResourceId) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[18] + mi := &file_c1_connector_v2_resource_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1350,7 +1402,7 @@ func (x *ResourceId) ProtoReflect() protoreflect.Message { // Deprecated: Use ResourceId.ProtoReflect.Descriptor instead. func (*ResourceId) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19} } func (x *ResourceId) GetResourceType() string { @@ -1390,7 +1442,7 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[19] + mi := &file_c1_connector_v2_resource_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1402,7 +1454,7 @@ func (x *Resource) String() string { func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[19] + mi := &file_c1_connector_v2_resource_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1415,7 +1467,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20} } func (x *Resource) GetId() *ResourceId { @@ -1487,7 +1539,7 @@ type ResourcesServiceListResourcesRequest struct { func (x *ResourcesServiceListResourcesRequest) Reset() { *x = ResourcesServiceListResourcesRequest{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[20] + mi := &file_c1_connector_v2_resource_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1499,7 +1551,7 @@ func (x *ResourcesServiceListResourcesRequest) String() string { func (*ResourcesServiceListResourcesRequest) ProtoMessage() {} func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[20] + mi := &file_c1_connector_v2_resource_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1512,7 +1564,7 @@ func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use ResourcesServiceListResourcesRequest.ProtoReflect.Descriptor instead. func (*ResourcesServiceListResourcesRequest) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{21} } func (x *ResourcesServiceListResourcesRequest) GetResourceTypeId() string { @@ -1561,7 +1613,7 @@ type ResourcesServiceListResourcesResponse struct { func (x *ResourcesServiceListResourcesResponse) Reset() { *x = ResourcesServiceListResourcesResponse{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[21] + mi := &file_c1_connector_v2_resource_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1573,7 +1625,7 @@ func (x *ResourcesServiceListResourcesResponse) String() string { func (*ResourcesServiceListResourcesResponse) ProtoMessage() {} func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[21] + mi := &file_c1_connector_v2_resource_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1586,7 +1638,7 @@ func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use ResourcesServiceListResourcesResponse.ProtoReflect.Descriptor instead. func (*ResourcesServiceListResourcesResponse) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{21} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{22} } func (x *ResourcesServiceListResourcesResponse) GetList() []*Resource { @@ -1621,7 +1673,7 @@ type ResourceGetterServiceGetResourceRequest struct { func (x *ResourceGetterServiceGetResourceRequest) Reset() { *x = ResourceGetterServiceGetResourceRequest{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + mi := &file_c1_connector_v2_resource_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1633,7 +1685,7 @@ func (x *ResourceGetterServiceGetResourceRequest) String() string { func (*ResourceGetterServiceGetResourceRequest) ProtoMessage() {} func (x *ResourceGetterServiceGetResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + mi := &file_c1_connector_v2_resource_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1646,7 +1698,7 @@ func (x *ResourceGetterServiceGetResourceRequest) ProtoReflect() protoreflect.Me // Deprecated: Use ResourceGetterServiceGetResourceRequest.ProtoReflect.Descriptor instead. func (*ResourceGetterServiceGetResourceRequest) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{22} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{23} } func (x *ResourceGetterServiceGetResourceRequest) GetResourceId() *ResourceId { @@ -1680,7 +1732,7 @@ type ResourceGetterServiceGetResourceResponse struct { func (x *ResourceGetterServiceGetResourceResponse) Reset() { *x = ResourceGetterServiceGetResourceResponse{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + mi := &file_c1_connector_v2_resource_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1692,7 +1744,7 @@ func (x *ResourceGetterServiceGetResourceResponse) String() string { func (*ResourceGetterServiceGetResourceResponse) ProtoMessage() {} func (x *ResourceGetterServiceGetResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + mi := &file_c1_connector_v2_resource_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1705,7 +1757,7 @@ func (x *ResourceGetterServiceGetResourceResponse) ProtoReflect() protoreflect.M // Deprecated: Use ResourceGetterServiceGetResourceResponse.ProtoReflect.Descriptor instead. func (*ResourceGetterServiceGetResourceResponse) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{23} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{24} } func (x *ResourceGetterServiceGetResourceResponse) GetResource() *Resource { @@ -1733,7 +1785,7 @@ type ExternalId struct { func (x *ExternalId) Reset() { *x = ExternalId{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[24] + mi := &file_c1_connector_v2_resource_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1745,7 +1797,7 @@ func (x *ExternalId) String() string { func (*ExternalId) ProtoMessage() {} func (x *ExternalId) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[24] + mi := &file_c1_connector_v2_resource_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1758,7 +1810,7 @@ func (x *ExternalId) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalId.ProtoReflect.Descriptor instead. func (*ExternalId) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{24} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{25} } func (x *ExternalId) GetId() string { @@ -1793,7 +1845,7 @@ type AccountInfo_Email struct { func (x *AccountInfo_Email) Reset() { *x = AccountInfo_Email{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[25] + mi := &file_c1_connector_v2_resource_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1805,7 +1857,7 @@ func (x *AccountInfo_Email) String() string { func (*AccountInfo_Email) ProtoMessage() {} func (x *AccountInfo_Email) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[25] + mi := &file_c1_connector_v2_resource_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1838,13 +1890,14 @@ func (x *AccountInfo_Email) GetIsPrimary() bool { type CredentialOptions_RandomPassword struct { state protoimpl.MessageState `protogen:"open.v1"` Length int64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` + Constraints []*PasswordConstraint `protobuf:"bytes,2,rep,name=constraints,proto3" json:"constraints,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CredentialOptions_RandomPassword) Reset() { *x = CredentialOptions_RandomPassword{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[26] + mi := &file_c1_connector_v2_resource_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1856,7 +1909,7 @@ func (x *CredentialOptions_RandomPassword) String() string { func (*CredentialOptions_RandomPassword) ProtoMessage() {} func (x *CredentialOptions_RandomPassword) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[26] + mi := &file_c1_connector_v2_resource_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1879,6 +1932,13 @@ func (x *CredentialOptions_RandomPassword) GetLength() int64 { return 0 } +func (x *CredentialOptions_RandomPassword) GetConstraints() []*PasswordConstraint { + if x != nil { + return x.Constraints + } + return nil +} + type CredentialOptions_NoPassword struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -1887,7 +1947,7 @@ type CredentialOptions_NoPassword struct { func (x *CredentialOptions_NoPassword) Reset() { *x = CredentialOptions_NoPassword{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[27] + mi := &file_c1_connector_v2_resource_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1899,7 +1959,7 @@ func (x *CredentialOptions_NoPassword) String() string { func (*CredentialOptions_NoPassword) ProtoMessage() {} func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[27] + mi := &file_c1_connector_v2_resource_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1924,7 +1984,7 @@ type CredentialOptions_SSO struct { func (x *CredentialOptions_SSO) Reset() { *x = CredentialOptions_SSO{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[28] + mi := &file_c1_connector_v2_resource_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1936,7 +1996,7 @@ func (x *CredentialOptions_SSO) String() string { func (*CredentialOptions_SSO) ProtoMessage() {} func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[28] + mi := &file_c1_connector_v2_resource_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1969,7 +2029,7 @@ type CreateAccountResponse_SuccessResult struct { func (x *CreateAccountResponse_SuccessResult) Reset() { *x = CreateAccountResponse_SuccessResult{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[29] + mi := &file_c1_connector_v2_resource_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1981,7 +2041,7 @@ func (x *CreateAccountResponse_SuccessResult) String() string { func (*CreateAccountResponse_SuccessResult) ProtoMessage() {} func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[29] + mi := &file_c1_connector_v2_resource_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1994,7 +2054,7 @@ func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Messag // Deprecated: Use CreateAccountResponse_SuccessResult.ProtoReflect.Descriptor instead. func (*CreateAccountResponse_SuccessResult) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15, 0} } func (x *CreateAccountResponse_SuccessResult) GetResource() *Resource { @@ -2022,7 +2082,7 @@ type CreateAccountResponse_ActionRequiredResult struct { func (x *CreateAccountResponse_ActionRequiredResult) Reset() { *x = CreateAccountResponse_ActionRequiredResult{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[30] + mi := &file_c1_connector_v2_resource_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2034,7 +2094,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) String() string { func (*CreateAccountResponse_ActionRequiredResult) ProtoMessage() {} func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[30] + mi := &file_c1_connector_v2_resource_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2047,7 +2107,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect // Deprecated: Use CreateAccountResponse_ActionRequiredResult.ProtoReflect.Descriptor instead. func (*CreateAccountResponse_ActionRequiredResult) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14, 1} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15, 1} } func (x *CreateAccountResponse_ActionRequiredResult) GetResource() *Resource { @@ -2080,7 +2140,7 @@ type EncryptionConfig_JWKPublicKeyConfig struct { func (x *EncryptionConfig_JWKPublicKeyConfig) Reset() { *x = EncryptionConfig_JWKPublicKeyConfig{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[31] + mi := &file_c1_connector_v2_resource_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2092,7 +2152,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) String() string { func (*EncryptionConfig_JWKPublicKeyConfig) ProtoMessage() {} func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[31] + mi := &file_c1_connector_v2_resource_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2105,7 +2165,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Messag // Deprecated: Use EncryptionConfig_JWKPublicKeyConfig.ProtoReflect.Descriptor instead. func (*EncryptionConfig_JWKPublicKeyConfig) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18, 0} } func (x *EncryptionConfig_JWKPublicKeyConfig) GetPubKey() []byte { @@ -2263,7 +2323,7 @@ var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{ 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, - 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, + 0xbe, 0x03, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, @@ -2279,293 +2339,302 @@ var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{ 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, 0x03, 0x73, 0x73, - 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x1a, 0x7a, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, 0x08, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x09, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x0c, 0x0a, + 0x0a, 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, + 0x53, 0x4f, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x4c, 0x0a, 0x12, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x53, 0x65, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfc, + 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0e, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, 0x0a, - 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, - 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x0d, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x6b, 0x65, 0x79, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x49, - 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x09, - 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x5f, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, - 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, - 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, - 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0c, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, - 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, - 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62, - 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, - 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, - 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x50, - 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22, 0xc1, - 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, - 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, + 0x00, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0x7f, 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x1a, 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, + 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, + 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, + 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, + 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, + 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, + 0x15, 0x6a, 0x77, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, + 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x2f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, + 0x28, 0x80, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x26, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, + 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0xf0, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, - 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, - 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, + 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, + 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, + 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, + 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, + 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, + 0x4e, 0x54, 0x53, 0x5f, 0x50, 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, + 0x54, 0x10, 0x02, 0x22, 0xc1, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, + 0x80, 0x08, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, + 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, - 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf4, 0x01, 0x0a, 0x27, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x40, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, + 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, + 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xf4, 0x01, 0x0a, 0x27, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, + 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, - 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, - 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9c, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x67, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x56, 0x32, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9c, 0x01, 0x0a, 0x15, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, + 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x16, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, + 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, + 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, - 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, - 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, - 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, - 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, + 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, + 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -2581,7 +2650,7 @@ func file_c1_connector_v2_resource_proto_rawDescGZIP() []byte { } var file_c1_connector_v2_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_c1_connector_v2_resource_proto_goTypes = []any{ (ResourceType_Trait)(0), // 0: c1.connector.v2.ResourceType.Trait (Resource_CreationSource)(0), // 1: c1.connector.v2.Resource.CreationSource @@ -2598,99 +2667,101 @@ var file_c1_connector_v2_resource_proto_goTypes = []any{ (*RotateCredentialResponse)(nil), // 12: c1.connector.v2.RotateCredentialResponse (*AccountInfo)(nil), // 13: c1.connector.v2.AccountInfo (*CredentialOptions)(nil), // 14: c1.connector.v2.CredentialOptions - (*CreateAccountRequest)(nil), // 15: c1.connector.v2.CreateAccountRequest - (*CreateAccountResponse)(nil), // 16: c1.connector.v2.CreateAccountResponse - (*EncryptedData)(nil), // 17: c1.connector.v2.EncryptedData - (*PlaintextData)(nil), // 18: c1.connector.v2.PlaintextData - (*EncryptionConfig)(nil), // 19: c1.connector.v2.EncryptionConfig - (*ResourceId)(nil), // 20: c1.connector.v2.ResourceId - (*Resource)(nil), // 21: c1.connector.v2.Resource - (*ResourcesServiceListResourcesRequest)(nil), // 22: c1.connector.v2.ResourcesServiceListResourcesRequest - (*ResourcesServiceListResourcesResponse)(nil), // 23: c1.connector.v2.ResourcesServiceListResourcesResponse - (*ResourceGetterServiceGetResourceRequest)(nil), // 24: c1.connector.v2.ResourceGetterServiceGetResourceRequest - (*ResourceGetterServiceGetResourceResponse)(nil), // 25: c1.connector.v2.ResourceGetterServiceGetResourceResponse - (*ExternalId)(nil), // 26: c1.connector.v2.ExternalId - (*AccountInfo_Email)(nil), // 27: c1.connector.v2.AccountInfo.Email - (*CredentialOptions_RandomPassword)(nil), // 28: c1.connector.v2.CredentialOptions.RandomPassword - (*CredentialOptions_NoPassword)(nil), // 29: c1.connector.v2.CredentialOptions.NoPassword - (*CredentialOptions_SSO)(nil), // 30: c1.connector.v2.CredentialOptions.SSO - (*CreateAccountResponse_SuccessResult)(nil), // 31: c1.connector.v2.CreateAccountResponse.SuccessResult - (*CreateAccountResponse_ActionRequiredResult)(nil), // 32: c1.connector.v2.CreateAccountResponse.ActionRequiredResult - (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 33: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig - (*anypb.Any)(nil), // 34: google.protobuf.Any - (*structpb.Struct)(nil), // 35: google.protobuf.Struct + (*PasswordConstraint)(nil), // 15: c1.connector.v2.PasswordConstraint + (*CreateAccountRequest)(nil), // 16: c1.connector.v2.CreateAccountRequest + (*CreateAccountResponse)(nil), // 17: c1.connector.v2.CreateAccountResponse + (*EncryptedData)(nil), // 18: c1.connector.v2.EncryptedData + (*PlaintextData)(nil), // 19: c1.connector.v2.PlaintextData + (*EncryptionConfig)(nil), // 20: c1.connector.v2.EncryptionConfig + (*ResourceId)(nil), // 21: c1.connector.v2.ResourceId + (*Resource)(nil), // 22: c1.connector.v2.Resource + (*ResourcesServiceListResourcesRequest)(nil), // 23: c1.connector.v2.ResourcesServiceListResourcesRequest + (*ResourcesServiceListResourcesResponse)(nil), // 24: c1.connector.v2.ResourcesServiceListResourcesResponse + (*ResourceGetterServiceGetResourceRequest)(nil), // 25: c1.connector.v2.ResourceGetterServiceGetResourceRequest + (*ResourceGetterServiceGetResourceResponse)(nil), // 26: c1.connector.v2.ResourceGetterServiceGetResourceResponse + (*ExternalId)(nil), // 27: c1.connector.v2.ExternalId + (*AccountInfo_Email)(nil), // 28: c1.connector.v2.AccountInfo.Email + (*CredentialOptions_RandomPassword)(nil), // 29: c1.connector.v2.CredentialOptions.RandomPassword + (*CredentialOptions_NoPassword)(nil), // 30: c1.connector.v2.CredentialOptions.NoPassword + (*CredentialOptions_SSO)(nil), // 31: c1.connector.v2.CredentialOptions.SSO + (*CreateAccountResponse_SuccessResult)(nil), // 32: c1.connector.v2.CreateAccountResponse.SuccessResult + (*CreateAccountResponse_ActionRequiredResult)(nil), // 33: c1.connector.v2.CreateAccountResponse.ActionRequiredResult + (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 34: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig + (*anypb.Any)(nil), // 35: google.protobuf.Any + (*structpb.Struct)(nil), // 36: google.protobuf.Struct } var file_c1_connector_v2_resource_proto_depIdxs = []int32{ 0, // 0: c1.connector.v2.ResourceType.traits:type_name -> c1.connector.v2.ResourceType.Trait - 34, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any - 21, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource - 34, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any + 35, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any + 22, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource + 35, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any 2, // 4: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.list:type_name -> c1.connector.v2.ResourceType - 34, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any - 21, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource - 21, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource - 34, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any - 20, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId - 34, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any - 20, // 11: c1.connector.v2.DeleteResourceV2Request.resource_id:type_name -> c1.connector.v2.ResourceId - 34, // 12: c1.connector.v2.DeleteResourceV2Response.annotations:type_name -> google.protobuf.Any - 20, // 13: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any + 22, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource + 22, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource + 35, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any + 21, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any + 21, // 11: c1.connector.v2.DeleteResourceV2Request.resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 12: c1.connector.v2.DeleteResourceV2Response.annotations:type_name -> google.protobuf.Any + 21, // 13: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId 14, // 14: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions - 19, // 15: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 17, // 16: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData - 20, // 17: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId - 34, // 18: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any - 27, // 19: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email - 35, // 20: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct - 28, // 21: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword - 29, // 22: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword - 30, // 23: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO + 20, // 15: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig + 18, // 16: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData + 21, // 17: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 18: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any + 28, // 19: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email + 36, // 20: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct + 29, // 21: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword + 30, // 22: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword + 31, // 23: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO 13, // 24: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo 14, // 25: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions - 19, // 26: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 31, // 27: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult - 32, // 28: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult - 17, // 29: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData - 34, // 30: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any - 21, // 31: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource - 33, // 32: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig - 20, // 33: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId - 20, // 34: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 34, // 35: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any - 26, // 36: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId + 20, // 26: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig + 32, // 27: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult + 33, // 28: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult + 18, // 29: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData + 35, // 30: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any + 22, // 31: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource + 34, // 32: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig + 21, // 33: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId + 21, // 34: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 35: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any + 27, // 36: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId 1, // 37: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource - 20, // 38: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 34, // 39: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any - 21, // 40: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource - 34, // 41: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any - 20, // 42: c1.connector.v2.ResourceGetterServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId - 20, // 43: c1.connector.v2.ResourceGetterServiceGetResourceRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 34, // 44: c1.connector.v2.ResourceGetterServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any - 21, // 45: c1.connector.v2.ResourceGetterServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource - 34, // 46: c1.connector.v2.ResourceGetterServiceGetResourceResponse.annotations:type_name -> google.protobuf.Any - 21, // 47: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource - 21, // 48: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource - 3, // 49: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest - 22, // 50: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest - 24, // 51: c1.connector.v2.ResourceGetterService.GetResource:input_type -> c1.connector.v2.ResourceGetterServiceGetResourceRequest - 5, // 52: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest - 7, // 53: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest - 9, // 54: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:input_type -> c1.connector.v2.DeleteResourceV2Request - 11, // 55: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest - 15, // 56: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest - 4, // 57: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse - 23, // 58: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse - 25, // 59: c1.connector.v2.ResourceGetterService.GetResource:output_type -> c1.connector.v2.ResourceGetterServiceGetResourceResponse - 6, // 60: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse - 8, // 61: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse - 10, // 62: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:output_type -> c1.connector.v2.DeleteResourceV2Response - 12, // 63: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse - 16, // 64: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse - 57, // [57:65] is the sub-list for method output_type - 49, // [49:57] is the sub-list for method input_type - 49, // [49:49] is the sub-list for extension type_name - 49, // [49:49] is the sub-list for extension extendee - 0, // [0:49] is the sub-list for field type_name + 21, // 38: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 39: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any + 22, // 40: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource + 35, // 41: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any + 21, // 42: c1.connector.v2.ResourceGetterServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 21, // 43: c1.connector.v2.ResourceGetterServiceGetResourceRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 35, // 44: c1.connector.v2.ResourceGetterServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any + 22, // 45: c1.connector.v2.ResourceGetterServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource + 35, // 46: c1.connector.v2.ResourceGetterServiceGetResourceResponse.annotations:type_name -> google.protobuf.Any + 15, // 47: c1.connector.v2.CredentialOptions.RandomPassword.constraints:type_name -> c1.connector.v2.PasswordConstraint + 22, // 48: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource + 22, // 49: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource + 3, // 50: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest + 23, // 51: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest + 25, // 52: c1.connector.v2.ResourceGetterService.GetResource:input_type -> c1.connector.v2.ResourceGetterServiceGetResourceRequest + 5, // 53: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest + 7, // 54: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest + 9, // 55: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:input_type -> c1.connector.v2.DeleteResourceV2Request + 11, // 56: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest + 16, // 57: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest + 4, // 58: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse + 24, // 59: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse + 26, // 60: c1.connector.v2.ResourceGetterService.GetResource:output_type -> c1.connector.v2.ResourceGetterServiceGetResourceResponse + 6, // 61: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse + 8, // 62: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse + 10, // 63: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:output_type -> c1.connector.v2.DeleteResourceV2Response + 12, // 64: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse + 17, // 65: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse + 58, // [58:66] is the sub-list for method output_type + 50, // [50:58] is the sub-list for method input_type + 50, // [50:50] is the sub-list for extension type_name + 50, // [50:50] is the sub-list for extension extendee + 0, // [0:50] is the sub-list for field type_name } func init() { file_c1_connector_v2_resource_proto_init() } @@ -2703,11 +2774,11 @@ func file_c1_connector_v2_resource_proto_init() { (*CredentialOptions_NoPassword_)(nil), (*CredentialOptions_Sso)(nil), } - file_c1_connector_v2_resource_proto_msgTypes[14].OneofWrappers = []any{ + file_c1_connector_v2_resource_proto_msgTypes[15].OneofWrappers = []any{ (*CreateAccountResponse_Success)(nil), (*CreateAccountResponse_ActionRequired)(nil), } - file_c1_connector_v2_resource_proto_msgTypes[17].OneofWrappers = []any{ + file_c1_connector_v2_resource_proto_msgTypes[18].OneofWrappers = []any{ (*EncryptionConfig_JwkPublicKeyConfig)(nil), } type x struct{} @@ -2716,7 +2787,7 @@ func file_c1_connector_v2_resource_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc)), NumEnums: 2, - NumMessages: 32, + NumMessages: 33, NumExtensions: 0, NumServices: 7, }, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go index 2e0d07a6..db1dd836 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go @@ -2251,6 +2251,112 @@ var _ interface { ErrorName() string } = CredentialOptionsValidationError{} +// Validate checks the field values on PasswordConstraint with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *PasswordConstraint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PasswordConstraint with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PasswordConstraintMultiError, or nil if none found. +func (m *PasswordConstraint) ValidateAll() error { + return m.validate(true) +} + +func (m *PasswordConstraint) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for CharSet + + // no validation rules for MinCount + + if len(errors) > 0 { + return PasswordConstraintMultiError(errors) + } + + return nil +} + +// PasswordConstraintMultiError is an error wrapping multiple validation errors +// returned by PasswordConstraint.ValidateAll() if the designated constraints +// aren't met. +type PasswordConstraintMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PasswordConstraintMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PasswordConstraintMultiError) AllErrors() []error { return m } + +// PasswordConstraintValidationError is the validation error returned by +// PasswordConstraint.Validate if the designated constraints aren't met. +type PasswordConstraintValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PasswordConstraintValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PasswordConstraintValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PasswordConstraintValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PasswordConstraintValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PasswordConstraintValidationError) ErrorName() string { + return "PasswordConstraintValidationError" +} + +// Error satisfies the builtin error interface +func (e PasswordConstraintValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPasswordConstraint.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PasswordConstraintValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PasswordConstraintValidationError{} + // Validate checks the field values on CreateAccountRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. @@ -4547,6 +4653,40 @@ func (m *CredentialOptions_RandomPassword) validate(all bool) error { errors = append(errors, err) } + for idx, item := range m.GetConstraints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CredentialOptions_RandomPasswordValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CredentialOptions_RandomPasswordValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CredentialOptions_RandomPasswordValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return CredentialOptions_RandomPasswordMultiError(errors) } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go index 11d30aa2..a596cdcb 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "os" + "sort" "time" "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" @@ -131,7 +132,7 @@ func MakeMainCommand[T field.Configurable]( v.GetString("revoke-grant"), )) case v.GetBool("event-feed"): - opts = append(opts, connectorrunner.WithOnDemandEventStream()) + opts = append(opts, connectorrunner.WithOnDemandEventStream(v.GetString("event-feed-id"), v.GetTime("event-feed-start-at"))) case v.GetString("create-account-profile") != "": profileMap := v.GetStringMap("create-account-profile") if profileMap == nil { @@ -187,6 +188,19 @@ func MakeMainCommand[T field.Configurable]( v.GetString("create-account-email"), profile, )) + case v.GetString("invoke-action") != "": + invokeActionArgs := v.GetStringMap("invoke-action-args") + invokeActionArgsStruct, err := structpb.NewStruct(invokeActionArgs) + if err != nil { + return fmt.Errorf("failed to parse invoke-action-args: %w", err) + } + opts = append(opts, + connectorrunner.WithActionsEnabled(), + connectorrunner.WithOnDemandInvokeAction( + v.GetString("file"), + v.GetString("invoke-action"), + invokeActionArgsStruct, + )) case v.GetString("delete-resource") != "": opts = append(opts, connectorrunner.WithProvisioningEnabled(), @@ -326,7 +340,7 @@ func initOtel(ctx context.Context, name string, v *viper.Viper, initialLogFields otelOpts = append(otelOpts, uotel.WithOtelEndpoint(otelEndpoint, otelTLSCertPath, otelTLSCert)) } - return uotel.InitOtel(context.Background(), otelOpts...) + return uotel.InitOtel(ctx, otelOpts...) } func MakeGRPCServerCommand[T field.Configurable]( @@ -556,7 +570,13 @@ func MakeConfigSchemaCommand[T field.Configurable]( getconnector GetConnectorFunc[T], ) func(*cobra.Command, []string) error { return func(cmd *cobra.Command, args []string) error { - pb, err := json.Marshal(&confschema) + // Sort fields by FieldName + sort.Slice(confschema.Fields, func(i, j int) bool { + return confschema.Fields[i].FieldName < confschema.Fields[j].FieldName + }) + + // Use MarshalIndent for pretty printing + pb, err := json.MarshalIndent(&confschema, "", " ") if err != nil { return err } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go index d84ba414..4a521882 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go @@ -36,7 +36,7 @@ func OptionallyAddLambdaCommand[T field.Configurable]( connectorSchema field.Configuration, mainCmd *cobra.Command, ) error { - lambdaSchema := field.NewConfiguration(field.LambdaServerFields(), field.LambdaServerRelationships...) + lambdaSchema := field.NewConfiguration(field.LambdaServerFields(), field.WithConstraints(field.LambdaServerRelationships...)) lambdaCmd, err := AddCommand(mainCmd, v, &lambdaSchema, &cobra.Command{ Use: "lambda", @@ -55,6 +55,13 @@ func OptionallyAddLambdaCommand[T field.Configurable]( return err } + logLevel := v.GetString("log-level") + // Downgrade log level to "info" if debug mode has expired + debugModeExpiresAt := v.GetTime("log-level-debug-expires-at") + if logLevel == "debug" && !debugModeExpiresAt.IsZero() && time.Now().After(debugModeExpiresAt) { + logLevel = "info" + } + initalLogFields := map[string]interface{}{ "tenant": os.Getenv("tenant"), "connector": os.Getenv("connector"), @@ -67,14 +74,14 @@ func OptionallyAddLambdaCommand[T field.Configurable]( ctx, name, logging.WithLogFormat(v.GetString("log-format")), - logging.WithLogLevel(v.GetString("log-level")), + logging.WithLogLevel(logLevel), logging.WithInitialFields(initalLogFields), ) if err != nil { return err } - runCtx, otelShutdown, err := initOtel(context.Background(), name, v, initalLogFields) + runCtx, otelShutdown, err := initOtel(runCtx, name, v, initalLogFields) if err != nil { return err } @@ -95,7 +102,7 @@ func OptionallyAddLambdaCommand[T field.Configurable]( } client, webKey, err := c1_lambda_config.GetConnectorConfigServiceClient( - ctx, + runCtx, v.GetString(field.LambdaServerClientIDField.GetName()), v.GetString(field.LambdaServerClientSecretField.GetName()), ) @@ -104,7 +111,7 @@ func OptionallyAddLambdaCommand[T field.Configurable]( } // Get configuration, convert it to viper flag values, then proceed. - config, err := client.GetConnectorConfig(ctx, &pb_connector_api.GetConnectorConfigRequest{}) + config, err := client.GetConnectorConfig(runCtx, &pb_connector_api.GetConnectorConfigRequest{}) if err != nil { return fmt.Errorf("lambda-run: failed to get connector config: %w", err) } @@ -178,9 +185,9 @@ func OptionallyAddLambdaCommand[T field.Configurable]( } s := c1_lambda_grpc.NewServer(authOpt) - connector.Register(ctx, s, c, opts) + connector.Register(runCtx, s, c, opts) - aws_lambda.Start(s.Handler) + aws_lambda.StartWithOptions(s.Handler, aws_lambda.WithContext(runCtx)) return nil } return nil diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go b/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go index e5232b3c..4149a39b 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go @@ -78,7 +78,7 @@ func DefineConfiguration[T field.Configurable]( relationships = append(relationships, field.DefaultRelationships...) relationships = append(relationships, confschema.Constraints...) - err = cli.SetFlagsAndConstraints(mainCMD, field.NewConfiguration(confschema.Fields, relationships...)) + err = cli.SetFlagsAndConstraints(mainCMD, field.NewConfiguration(confschema.Fields, field.WithConstraints(relationships...))) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go index f28b8908..f1037104 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go @@ -135,13 +135,57 @@ type CredentialManager interface { RotateCapabilityDetails(ctx context.Context) (*v2.CredentialDetailsCredentialRotation, annotations.Annotations, error) } -// EventProvider extends ConnectorBuilder to add capabilities for providing event streams. -// -// Implementing this interface indicates the connector can provide a stream of events -// from the external system, enabling near real-time updates in Baton. +// Compatibility interface lets us handle both EventFeed and EventProvider the same. +type EventLister interface { + ListEvents(ctx context.Context, earliestEvent *timestamppb.Timestamp, pToken *pagination.StreamToken) ([]*v2.Event, *pagination.StreamState, annotations.Annotations, error) +} + +// Deprecated: This interface is deprecated in favor of EventProviderV2 which supports +// multiple event feeds. Implementing this interface indicates the connector can provide +// a single stream of events from the external system, enabling near real-time updates +// in Baton. New connectors should implement EventProviderV2 instead. type EventProvider interface { ConnectorBuilder - ListEvents(ctx context.Context, earliestEvent *timestamppb.Timestamp, pToken *pagination.StreamToken) ([]*v2.Event, *pagination.StreamState, annotations.Annotations, error) + EventLister +} + +// NewEventProviderV2 is a new interface that allows connectors to provide multiple event feeds. +// +// This is the recommended interface for implementing event feed support in new connectors. +type EventProviderV2 interface { + ConnectorBuilder + EventFeeds(ctx context.Context) []EventFeed +} + +// EventFeed is a single stream of events from the external system. +// +// EventFeedMetadata describes this feed, and a connector can have multiple feeds. +type EventFeed interface { + EventLister + EventFeedMetadata(ctx context.Context) *v2.EventFeedMetadata +} + +type oldEventFeedWrapper struct { + feed EventLister +} + +const ( + LegacyBatonFeedId = "baton_feed_event" +) + +func (e *oldEventFeedWrapper) EventFeedMetadata(ctx context.Context) *v2.EventFeedMetadata { + return &v2.EventFeedMetadata{ + Id: LegacyBatonFeedId, + SupportedEventTypes: []v2.EventType{v2.EventType_EVENT_TYPE_UNSPECIFIED}, + } +} + +func (e *oldEventFeedWrapper) ListEvents( + ctx context.Context, + earliestEvent *timestamppb.Timestamp, + pToken *pagination.StreamToken, +) ([]*v2.Event, *pagination.StreamState, annotations.Annotations, error) { + return e.feed.ListEvents(ctx, earliestEvent, pToken) } // TicketManager extends ConnectorBuilder to add capabilities for ticket management. @@ -204,7 +248,7 @@ type builderImpl struct { accountManager AccountManager actionManager CustomActionManager credentialManagers map[string]CredentialManager - eventFeed EventProvider + eventFeeds map[string]EventFeed cb ConnectorBuilder ticketManager TicketManager ticketingEnabled bool @@ -416,6 +460,7 @@ func NewConnector(ctx context.Context, in interface{}, opts ...Opt) (types.Conne accountManager: nil, actionManager: nil, credentialManagers: make(map[string]CredentialManager), + eventFeeds: make(map[string]EventFeed), cb: c, ticketManager: nil, nowFunc: time.Now, @@ -430,8 +475,31 @@ func NewConnector(ctx context.Context, in interface{}, opts ...Opt) (types.Conne ret.m = metrics.New(metrics.NewNoOpHandler(ctx)) } + if b, ok := c.(EventProviderV2); ok { + for _, ef := range b.EventFeeds(ctx) { + feedData := ef.EventFeedMetadata(ctx) + if feedData == nil { + return nil, fmt.Errorf("error: event feed metadata is nil") + } + if err := feedData.Validate(); err != nil { + return nil, fmt.Errorf("error: event feed metadata for %s is invalid: %w", feedData.Id, err) + } + if _, ok := ret.eventFeeds[feedData.Id]; ok { + return nil, fmt.Errorf("error: duplicate event feed id found: %s", feedData.Id) + } + ret.eventFeeds[feedData.Id] = ef + } + } + if b, ok := c.(EventProvider); ok { - ret.eventFeed = b + // Register the legacy Baton feed as a v2 event feed + // implementing both v1 and v2 event feeds is not supported. + if len(ret.eventFeeds) != 0 { + return nil, fmt.Errorf("error: using legacy event feed is not supported when using EventProviderV2") + } + ret.eventFeeds[LegacyBatonFeedId] = &oldEventFeedWrapper{ + feed: b, + } } if ticketManager, ok := c.(TicketManager); ok { @@ -650,7 +718,7 @@ func (b *builderImpl) GetResource(ctx context.Context, request *v2.ResourceGette rb, ok := b.resourceTargetedSyncers[resourceType] if !ok { b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start)) - return nil, fmt.Errorf("error: get resource with unknown resource type %s", resourceType) + return nil, status.Errorf(codes.Unimplemented, "error: get resource with unknown resource type %s", resourceType) } resource, annos, err := rb.Get(ctx, request.GetResourceId(), request.GetParentResourceId()) @@ -874,8 +942,8 @@ func getCapabilities(ctx context.Context, b *builderImpl) (*v2.ConnectorCapabili return resourceTypeCapabilities[i].ResourceType.GetId() < resourceTypeCapabilities[j].ResourceType.GetId() }) - if b.eventFeed != nil { - connectorCaps[v2.Capability_CAPABILITY_EVENT_FEED] = struct{}{} + if len(b.eventFeeds) > 0 { + connectorCaps[v2.Capability_CAPABILITY_EVENT_FEED_V2] = struct{}{} } if b.ticketManager != nil { @@ -909,12 +977,24 @@ func (b *builderImpl) Validate(ctx context.Context, request *v2.ConnectorService ctx, span := tracer.Start(ctx, "builderImpl.Validate") defer span.End() - annos, err := b.cb.Validate(ctx) - if err != nil { - return nil, err - } + retryer := retry.NewRetryer(ctx, retry.RetryConfig{ + MaxAttempts: 0, // 0 means no limit - retry indefinitely + InitialDelay: 1 * time.Second, + MaxDelay: 0, + }) + + for { + annos, err := b.cb.Validate(ctx) + if err == nil { + return &v2.ConnectorServiceValidateResponse{Annotations: annos}, nil + } + + if retryer.ShouldWaitAndRetry(ctx, err) { + continue + } - return &v2.ConnectorServiceValidateResponse{Annotations: annos}, nil + return nil, fmt.Errorf("validate failed: %w", err) + } } func (b *builderImpl) Grant(ctx context.Context, request *v2.GrantManagerServiceGrantRequest) (*v2.GrantManagerServiceGrantResponse, error) { @@ -964,9 +1044,8 @@ func (b *builderImpl) Grant(ctx context.Context, request *v2.GrantManagerService if retryer.ShouldWaitAndRetry(ctx, err) { continue } - l.Error("error: grant failed", zap.Error(err)) b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start)) - return nil, fmt.Errorf("err: grant failed: %w", err) + return nil, fmt.Errorf("grant failed: %w", err) } } @@ -1012,9 +1091,8 @@ func (b *builderImpl) Revoke(ctx context.Context, request *v2.GrantManagerServic if retryer.ShouldWaitAndRetry(ctx, err) { continue } - l.Error("error: revoke failed", zap.Error(err)) b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start)) - return nil, fmt.Errorf("error: revoke failed: %w", err) + return nil, fmt.Errorf("revoke failed: %w", err) } } @@ -1027,17 +1105,44 @@ func (b *builderImpl) GetAsset(request *v2.AssetServiceGetAssetRequest, server v return nil } +func (b *builderImpl) ListEventFeeds(ctx context.Context, request *v2.ListEventFeedsRequest) (*v2.ListEventFeedsResponse, error) { + ctx, span := tracer.Start(ctx, "builderImpl.ListEventFeeds") + defer span.End() + + start := b.nowFunc() + tt := tasks.ListEventFeedsType + + feeds := make([]*v2.EventFeedMetadata, 0, len(b.eventFeeds)) + + for _, feed := range b.eventFeeds { + feeds = append(feeds, feed.EventFeedMetadata(ctx)) + } + + b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start)) + return &v2.ListEventFeedsResponse{ + List: feeds, + }, nil +} + func (b *builderImpl) ListEvents(ctx context.Context, request *v2.ListEventsRequest) (*v2.ListEventsResponse, error) { ctx, span := tracer.Start(ctx, "builderImpl.ListEvents") defer span.End() start := b.nowFunc() - tt := tasks.ListEventsType - if b.eventFeed == nil { - b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start)) - return nil, fmt.Errorf("error: event feed not implemented") + feedId := request.GetEventFeedId() + + // If no feedId is provided, use the legacy Baton feed Id + if feedId == "" { + feedId = LegacyBatonFeedId } - events, streamState, annotations, err := b.eventFeed.ListEvents(ctx, request.StartAt, &pagination.StreamToken{ + + feed, ok := b.eventFeeds[feedId] + if !ok { + return nil, status.Errorf(codes.NotFound, "error: event feed not found") + } + + tt := tasks.ListEventsType + events, streamState, annotations, err := feed.ListEvents(ctx, request.StartAt, &pagination.StreamToken{ Size: int(request.PageSize), Cursor: request.Cursor, }) diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go index 61e39fdb..e5ddb37c 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go @@ -159,11 +159,7 @@ func (c *connectorRunner) run(ctx context.Context) error { // Acquire a worker slot before we call Next() so we don't claim a task before we can actually process it. err = sem.Acquire(ctx, 1) if err != nil { - if errors.Is(err, context.Canceled) { - // Any error returned from Acquire() is due to the context being cancelled. - // Except for some tests where error is context deadline exceeded - sem.Release(1) - } + l.Error("runner: error acquiring semaphore to claim worker", zap.Error(err)) return c.handleContextCancel(ctx) } l.Debug("runner: worker claimed, checking for next task") @@ -287,6 +283,11 @@ type createAccountConfig struct { profile *structpb.Struct } +type invokeActionConfig struct { + action string + args *structpb.Struct +} + type deleteResourceConfig struct { resourceId string resourceType string @@ -297,7 +298,10 @@ type rotateCredentialsConfig struct { resourceType string } -type eventStreamConfig struct{} +type eventStreamConfig struct { + feedId string + startAt time.Time +} type syncDifferConfig struct { baseSyncID string @@ -320,11 +324,13 @@ type runnerConfig struct { clientSecret string provisioningEnabled bool ticketingEnabled bool + actionsEnabled bool grantConfig *grantConfig revokeConfig *revokeConfig eventFeedConfig *eventStreamConfig tempDir string createAccountConfig *createAccountConfig + invokeActionConfig *invokeActionConfig deleteResourceConfig *deleteResourceConfig rotateCredentialsConfig *rotateCredentialsConfig createTicketConfig *createTicketConfig @@ -460,6 +466,18 @@ func WithOnDemandCreateAccount(c1zPath string, login string, email string, profi } } +func WithOnDemandInvokeAction(c1zPath string, action string, args *structpb.Struct) Option { + return func(ctx context.Context, cfg *runnerConfig) error { + cfg.onDemand = true + cfg.c1zPath = c1zPath + cfg.invokeActionConfig = &invokeActionConfig{ + action: action, + args: args, + } + return nil + } +} + func WithOnDemandDeleteResource(c1zPath string, resourceId string, resourceType string) Option { return func(ctx context.Context, cfg *runnerConfig) error { cfg.onDemand = true @@ -492,10 +510,13 @@ func WithOnDemandSync(c1zPath string) Option { } } -func WithOnDemandEventStream() Option { +func WithOnDemandEventStream(feedId string, startAt time.Time) Option { return func(ctx context.Context, cfg *runnerConfig) error { cfg.onDemand = true - cfg.eventFeedConfig = &eventStreamConfig{} + cfg.eventFeedConfig = &eventStreamConfig{ + feedId: feedId, + startAt: startAt, + } return nil } } @@ -507,6 +528,13 @@ func WithProvisioningEnabled() Option { } } +func WithActionsEnabled() Option { + return func(ctx context.Context, cfg *runnerConfig) error { + cfg.actionsEnabled = true + return nil + } +} + func WithFullSyncDisabled() Option { return func(ctx context.Context, cfg *runnerConfig) error { cfg.skipFullSync = true @@ -677,6 +705,9 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op case cfg.createAccountConfig != nil: tm = local.NewCreateAccountManager(ctx, cfg.c1zPath, cfg.createAccountConfig.login, cfg.createAccountConfig.email, cfg.createAccountConfig.profile) + case cfg.invokeActionConfig != nil: + tm = local.NewActionInvoker(ctx, cfg.c1zPath, cfg.invokeActionConfig.action, cfg.invokeActionConfig.args) + case cfg.deleteResourceConfig != nil: tm = local.NewResourceDeleter(ctx, cfg.c1zPath, cfg.deleteResourceConfig.resourceId, cfg.deleteResourceConfig.resourceType) @@ -684,7 +715,7 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op tm = local.NewCredentialRotator(ctx, cfg.c1zPath, cfg.rotateCredentialsConfig.resourceId, cfg.rotateCredentialsConfig.resourceType) case cfg.eventFeedConfig != nil: - tm = local.NewEventFeed(ctx) + tm = local.NewEventFeed(ctx, cfg.eventFeedConfig.feedId, cfg.eventFeedConfig.startAt) case cfg.createTicketConfig != nil: tm = local.NewTicket(ctx, cfg.createTicketConfig.templatePath) case cfg.listTicketSchemasConfig != nil: diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go index c2482e81..71db3b92 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go @@ -37,6 +37,7 @@ type Writer interface { StartSync(ctx context.Context) (string, bool, error) StartNewSync(ctx context.Context) (string, error) StartNewSyncV2(ctx context.Context, syncType string, parentSyncID string) (string, error) + SetCurrentSync(ctx context.Context, syncID string) error CurrentSyncStep(ctx context.Context) (string, error) CheckpointSync(ctx context.Context, syncToken string) error EndSync(ctx context.Context) error diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/password.go b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/password.go index e24fdd18..dd75d302 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/password.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/password.go @@ -30,6 +30,30 @@ func GeneratePassword(credentialOptions *v2.CredentialOptions) (string, error) { return "", ErrInvalidCredentialOptions } +func addBasicValidityCharacters(password *strings.Builder) error { + sets := []string{upperCaseLetters, lowerCaseLetters, digits, symbols} + for _, characterSet := range sets { + err := addCharacterToPassword(password, characterSet) + if err != nil { + return err + } + } + return nil +} + +func addCharacterToPassword(password *strings.Builder, set string) error { + index, err := rand.Int(rand.Reader, big.NewInt(int64(len(set)))) + if err != nil { + return fmt.Errorf("failed to generate password: %w", err) + } + character := set[index.Int64()] + err = password.WriteByte(character) + if err != nil { + return fmt.Errorf("failed to generate password: %w", err) + } + return nil +} + func GenerateRandomPassword(randomPassword *v2.CredentialOptions_RandomPassword) (string, error) { passwordLength := randomPassword.GetLength() if passwordLength < 8 { @@ -37,16 +61,51 @@ func GenerateRandomPassword(randomPassword *v2.CredentialOptions_RandomPassword) } var password strings.Builder - for i := int64(0); i < passwordLength; i++ { - index, err := rand.Int(rand.Reader, big.NewInt(int64(len(characters)))) + constraints := randomPassword.Constraints + if len(constraints) > 0 { + // apply constraints + for _, constraint := range constraints { + for i := int64(0); i < int64(constraint.MinCount); i++ { + err := addCharacterToPassword(&password, constraint.CharSet) + if err != nil { + return "", err + } + } + } + } else { + err := addBasicValidityCharacters(&password) if err != nil { - return "", fmt.Errorf("failed generating password: %w", err) + return "", err } - character := characters[index.Int64()] - err = password.WriteByte(character) + } + + remaining := passwordLength - int64(len(password.String())) + if remaining < 0 { + return "", fmt.Errorf("password length %d is less than the sum of constraints minimums (%d)", passwordLength, int64(password.Len())) + } + for i := int64(0); i < remaining; i++ { + err := addCharacterToPassword(&password, characters) + if err != nil { + return "", err + } + } + stringPassword, err := getShuffledPassword(password) + if err != nil { + return "", err + } + return stringPassword, nil +} + +func getShuffledPassword(password strings.Builder) (string, error) { + runes := []rune(password.String()) + n := len(runes) + for i := n - 1; i > 0; i-- { + jBig, err := rand.Int(rand.Reader, big.NewInt(int64(i+1))) if err != nil { - return "", fmt.Errorf("failed generating password: %w", err) + return "", fmt.Errorf("error while generating password") } + j := int(jBig.Int64()) + runes[i], runes[j] = runes[j], runes[i] } - return password.String(), nil + return string(runes), nil } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go index cb32c0f9..96fbfc9a 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go @@ -340,6 +340,19 @@ func (c *C1File) getCurrentSync(ctx context.Context) (*syncRun, error) { return c.getSync(ctx, c.currentSyncID) } +func (c *C1File) SetCurrentSync(ctx context.Context, syncID string) error { + ctx, span := tracer.Start(ctx, "C1File.SetCurrentSync") + defer span.End() + + _, err := c.getSync(ctx, syncID) + if err != nil { + return err + } + + c.currentSyncID = syncID + return nil +} + func (c *C1File) CheckpointSync(ctx context.Context, syncToken string) error { ctx, span := tracer.Start(ctx, "C1File.CheckpointSync") defer span.End() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go index d38edaaf..373065ef 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go @@ -1,6 +1,12 @@ package field -import "github.com/conductorone/baton-sdk/pkg/logging" +import ( + "os" + "time" + + "github.com/conductorone/baton-sdk/pkg/logging" + "golang.org/x/term" +) const ( OtelCollectorEndpointFieldName = "otel-collector-endpoint" @@ -11,6 +17,14 @@ const ( OtelLoggingDisabledFieldName = "otel-logging-disabled" ) +func defaultLogFormat() any { + // If stdout is a TTY, use console format, otherwise use JSON + if term.IsTerminal(int(os.Stdout.Fd())) { + return logging.LogFormatConsole + } + return logging.LogFormatJSON +} + var ( createTicketField = BoolField("create-ticket", WithHidden(true), WithDescription("Create ticket"), WithPersistent(true), WithExportTarget(ExportTargetNone)) bulkCreateTicketField = BoolField("bulk-create-ticket", WithHidden(true), WithDescription("Bulk create tickets"), WithPersistent(true), WithExportTarget(ExportTargetNone)) @@ -20,7 +34,11 @@ var ( ListTicketSchemasField = BoolField("list-ticket-schemas", WithHidden(true), WithDescription("List ticket schemas"), WithPersistent(true), WithExportTarget(ExportTargetNone)) provisioningField = BoolField("provisioning", WithShortHand("p"), WithDescription("This must be set in order for provisioning actions to be enabled"), WithPersistent(true), WithExportTarget(ExportTargetNone)) - TicketingField = BoolField("ticketing", WithDescription("This must be set to enable ticketing support"), WithPersistent(true), WithExportTarget(ExportTargetNone)) + TicketingField = BoolField("ticketing", + WithDisplayName("Enable external ticket provisioning"), + WithDescription("This must be set to enable ticketing support"), + WithPersistent(true), + WithExportTarget(ExportTargetNone)) c1zTmpDirField = StringField("c1z-temp-dir", WithHidden(true), WithDescription("The directory to store temporary files in. It must exist, "+ "and write access is required. Defaults to the OS temporary directory."), WithPersistent(true), WithExportTarget(ExportTargetNone)) clientIDField = StringField("client-id", WithDescription("The client ID used to authenticate with ConductorOne"), WithPersistent(true), WithExportTarget(ExportTargetNone)) @@ -34,7 +52,14 @@ var ( deleteResourceField = StringField("delete-resource", WithHidden(true), WithDescription("The id of the resource to delete"), WithPersistent(true), WithExportTarget(ExportTargetNone)) deleteResourceTypeField = StringField("delete-resource-type", WithHidden(true), WithDescription("The type of the resource to delete"), WithPersistent(true), WithExportTarget(ExportTargetNone)) eventFeedField = StringField("event-feed", WithHidden(true), WithDescription("Read feed events to stdout"), WithPersistent(true), WithExportTarget(ExportTargetNone)) - fileField = StringField("file", WithShortHand("f"), WithDefaultValue("sync.c1z"), WithDescription("The path to the c1z file to sync with"), + eventFeedIdField = StringField("event-feed-id", WithHidden(true), WithDescription("The id of the event feed to read events from"), WithPersistent(true), WithExportTarget(ExportTargetNone)) + eventFeedStartAtField = StringField("event-feed-start-at", + WithDefaultValue(time.Now().AddDate(0, 0, -1).Format(time.RFC3339)), + WithHidden(true), + WithDescription("The start time of the event feed to read events from"), + WithPersistent(true), + WithExportTarget(ExportTargetNone)) + fileField = StringField("file", WithShortHand("f"), WithDefaultValue("sync.c1z"), WithDescription("The path to the c1z file to sync with"), WithPersistent(true), WithExportTarget(ExportTargetNone)) grantEntitlementField = StringField("grant-entitlement", WithHidden(true), WithDescription("The id of the entitlement to grant to the supplied principal"), WithPersistent(true), WithExportTarget(ExportTargetNone)) @@ -42,7 +67,7 @@ var ( WithPersistent(true), WithExportTarget(ExportTargetNone)) grantPrincipalTypeField = StringField("grant-principal-type", WithHidden(true), WithDescription("The resource type of the principal to grant the entitlement to"), WithPersistent(true), WithExportTarget(ExportTargetNone)) - logFormatField = StringField("log-format", WithDefaultValue(logging.LogFormatJSON), WithDescription("The output format for logs: json, console"), + logFormatField = StringField("log-format", WithDefaultValueFunc(defaultLogFormat), WithDescription("The output format for logs: json, console"), WithPersistent(true), WithExportTarget(ExportTargetNone)) revokeGrantField = StringField("revoke-grant", WithHidden(true), WithDescription("The grant to revoke"), WithPersistent(true), WithExportTarget(ExportTargetNone)) rotateCredentialsField = StringField("rotate-credentials", WithHidden(true), WithDescription("The id of the resource to rotate credentials on"), @@ -54,6 +79,10 @@ var ( WithPersistent(true), WithExportTarget(ExportTargetNone)) logLevelField = StringField("log-level", WithDefaultValue("info"), WithDescription("The log level: debug, info, warn, error"), WithPersistent(true), WithExportTarget(ExportTargetOps)) + logLevelDebugExpiresAtField = StringField("log-level-debug-expires-at", + WithDescription("The timestamp indicating when debug-level logging should expire"), + WithPersistent(true), + WithExportTarget(ExportTargetOps)) skipFullSync = BoolField("skip-full-sync", WithDescription("This must be set to skip a full sync"), WithPersistent(true), WithExportTarget(ExportTargetNone)) targetedSyncResourceIDs = StringSliceField("sync-resources", WithDescription("The resource IDs to sync"), WithPersistent(true), WithExportTarget(ExportTargetNone)) diffSyncsField = BoolField( @@ -101,6 +130,20 @@ var ( WithExportTarget(ExportTargetNone), ) + invokeActionField = StringField("invoke-action", + WithDescription("The name of the custom action to invoke"), + WithHidden(true), + WithPersistent(true), + WithExportTarget(ExportTargetNone), + ) + invokeActionArgsField = StringMapField("invoke-action-args", + WithHidden(true), + WithDescription("JSON-formatted object of map keys and values like '{ 'key': 'value' }'"), + WithDefaultValue(map[string]any{}), + WithPersistent(true), + WithExportTarget(ExportTargetNone), + ) + otelCollectorEndpoint = StringField(OtelCollectorEndpointFieldName, WithDescription("The endpoint of the OpenTelemetry collector to send observability data to (used for both tracing and logging if specific endpoints are not provided)"), WithPersistent(true), WithExportTarget(ExportTargetOps)) @@ -193,6 +236,8 @@ var DefaultFields = []SchemaField{ deleteResourceField, deleteResourceTypeField, eventFeedField, + eventFeedIdField, + eventFeedStartAtField, fileField, grantEntitlementField, grantPrincipalField, @@ -204,6 +249,7 @@ var DefaultFields = []SchemaField{ ticketIDField, ticketTemplatePathField, logLevelField, + logLevelDebugExpiresAtField, skipFullSync, targetedSyncResourceIDs, externalResourceC1ZField, @@ -215,6 +261,8 @@ var DefaultFields = []SchemaField{ compactFilePathsField, compactOutputDirectoryField, compactSyncsField, + invokeActionField, + invokeActionArgsField, otelCollectorEndpoint, otelCollectorEndpointTLSCertPath, diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go index 1e076171..874c7535 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go @@ -67,6 +67,13 @@ func WithDefaultValue(value any) fieldOption { } } +func WithDefaultValueFunc(f func() any) fieldOption { + return func(o SchemaField) SchemaField { + o.DefaultValue = f() + return o + } +} + func WithHidden(hidden bool) fieldOption { return func(o SchemaField) SchemaField { o.SyncerConfig.Hidden = hidden diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go index cb235a57..5aca646d 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go @@ -8,7 +8,7 @@ import ( v1_conf "github.com/conductorone/baton-sdk/pb/c1/config/v1" ) -var WrongValueTypeErr = errors.New("unable to cast any to concrete type") +var ErrWrongValueType = errors.New("unable to cast any to concrete type") type Variant string @@ -128,31 +128,31 @@ func (s SchemaField) validate(value any) (bool, error) { case StringVariant: v, ok := value.(string) if !ok { - return false, WrongValueTypeErr + return false, ErrWrongValueType } return v != "", ValidateStringRules(s.Rules.s, v, s.FieldName) case BoolVariant: v, ok := value.(bool) if !ok { - return false, WrongValueTypeErr + return false, ErrWrongValueType } return v, ValidateBoolRules(s.Rules.b, v, s.FieldName) case IntVariant: v, ok := value.(int) if !ok { - return false, WrongValueTypeErr + return false, ErrWrongValueType } return v != 0, ValidateIntRules(s.Rules.i, v, s.FieldName) case StringSliceVariant: v, ok := value.([]string) if !ok { - return false, WrongValueTypeErr + return false, ErrWrongValueType } return len(v) != 0, ValidateRepeatedStringRules(s.Rules.ss, v, s.FieldName) case StringMapVariant: v, ok := value.(map[string]any) if !ok { - return false, WrongValueTypeErr + return false, ErrWrongValueType } return len(v) != 0, ValidateStringMapRules(s.Rules.sm, v, s.FieldName) default: @@ -168,7 +168,7 @@ func toUpperCase(i string) string { func GetDefaultValue[T SchemaTypes](s SchemaField) (*T, error) { value, ok := s.DefaultValue.(T) if !ok { - return nil, WrongValueTypeErr + return nil, ErrWrongValueType } return &value, nil } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go index 4d6e8186..a143d98a 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go @@ -36,7 +36,15 @@ func (c *Configuration) Marshal() ([]byte, error) { } func (c Configuration) marshal() (*v1_conf.Configuration, error) { - conf := &v1_conf.Configuration{} + conf := &v1_conf.Configuration{ + DisplayName: c.DisplayName, + HelpUrl: c.HelpUrl, + IconUrl: c.IconUrl, + CatalogId: c.CatalogId, + IsDirectory: c.IsDirectory, + SupportsExternalResources: c.SupportsExternalResources, + RequiresExternalConnector: c.RequiresExternalConnector, + } ignore := make(map[string]struct{}) for _, f := range c.Fields { @@ -177,5 +185,6 @@ func (c Configuration) marshal() (*v1_conf.Configuration, error) { conf.Constraints = append(conf.Constraints, &constraint) } + return conf, nil } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/struct.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/struct.go index 12ecf64d..6e614e0d 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/field/struct.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/struct.go @@ -1,13 +1,91 @@ package field type Configuration struct { - Fields []SchemaField - Constraints []SchemaFieldRelationship + Fields []SchemaField + Constraints []SchemaFieldRelationship + DisplayName string + HelpUrl string + IconUrl string + CatalogId string + IsDirectory bool + SupportsExternalResources bool + RequiresExternalConnector bool } -func NewConfiguration(fields []SchemaField, constraints ...SchemaFieldRelationship) Configuration { - return Configuration{ - Fields: fields, - Constraints: constraints, +type configOption func(Configuration) Configuration + +func WithConnectorDisplayName(value string) configOption { + return func(c Configuration) Configuration { + c.DisplayName = value + + return c + } +} + +func WithHelpUrl(value string) configOption { + return func(c Configuration) Configuration { + c.HelpUrl = value + + return c + } +} + +func WithIconUrl(value string) configOption { + return func(c Configuration) Configuration { + c.IconUrl = value + + return c + } +} + +func WithCatalogId(value string) configOption { + return func(c Configuration) Configuration { + c.CatalogId = value + + return c + } +} + +func WithIsDirectory(value bool) configOption { + return func(c Configuration) Configuration { + c.IsDirectory = value + + return c } } + +func WithSupportsExternalResources(value bool) configOption { + return func(c Configuration) Configuration { + c.SupportsExternalResources = value + + return c + } +} + +func WithRequiresExternalConnector(value bool) configOption { + return func(c Configuration) Configuration { + c.RequiresExternalConnector = value + + return c + } +} + +func WithConstraints(constraints ...SchemaFieldRelationship) configOption { + return func(c Configuration) Configuration { + c.Constraints = constraints + + return c + } +} + +func NewConfiguration(fields []SchemaField, opts ...configOption) Configuration { + configuration := Configuration{ + Fields: fields, + } + + for _, opt := range opts { + configuration = opt(configuration) + } + + return configuration +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go index c52eec9f..74b6053c 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go @@ -2,11 +2,15 @@ package grpc import ( "context" + "encoding/base64" "encoding/json" "fmt" + "slices" + "strings" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/lambda" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -26,6 +30,7 @@ func (l *lambdaTransport) RoundTrip(ctx context.Context, req *Request) (*Respons } input := &lambda.InvokeInput{ + LogType: types.LogTypeTail, FunctionName: aws.String(l.functionName), Payload: payload, } @@ -38,7 +43,21 @@ func (l *lambdaTransport) RoundTrip(ctx context.Context, req *Request) (*Respons // Check if the function returned an error. if invokeResp.FunctionError != nil { - return nil, fmt.Errorf("lambda_transport: function returned error: %v", *invokeResp.FunctionError) + logSummary := "" + if invokeResp.LogResult != nil { + decodedLog, err := base64.StdEncoding.DecodeString(*invokeResp.LogResult) + if err == nil { + logSummary = string(decodedLog) + } + } + + filteredLogs := extractMeaningfulLogLines(logSummary) + + return nil, fmt.Errorf( + "lambda_transport: function returned error: %s; logSummary: %s", + *invokeResp.FunctionError, + filteredLogs, + ) } resp := &Response{} @@ -127,3 +146,38 @@ func NewClientConn(transport ClientTransport) grpc.ClientConnInterface { t: transport, } } + +var ignoredLogPrefixes = []string{ + "START RequestId:", + "END RequestId:", + "REPORT RequestId:", + "INIT_REPORT", + "RequestId:", + "Duration:", + "Billed Duration:", + "Memory Size:", + "Max Memory Used:", +} + +func extractMeaningfulLogLines(raw string) string { + lines := strings.Split(raw, "\n") + var filtered []string + + for _, line := range lines { + line = strings.TrimSpace(line) + + if line == "" { + continue + } + + if slices.ContainsFunc(ignoredLogPrefixes, func(prefix string) bool { + return strings.HasPrefix(line, prefix) + }) || strings.Contains(line, "Runtime.ExitError") { + continue + } + + filtered = append(filtered, line) + } + + return strings.Join(filtered, "\n") +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go b/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go index 12fe545f..2e6e3a41 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go @@ -104,7 +104,7 @@ func ExtractRateLimitData(statusCode int, header *http.Header) (*v2.RateLimitDes if resetAtStr != "" { resetAt, err = parseTime(resetAtStr) if err != nil { - return nil, err + continue } break } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/empty_connector.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/empty_connector.go index 19b7dd35..2667bbab 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/empty_connector.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/empty_connector.go @@ -4,71 +4,162 @@ import ( "context" v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type emptyConnector struct{} // GetAsset gets an asset. -func (n *emptyConnector) GetAsset(request *v2.AssetServiceGetAssetRequest, server v2.AssetService_GetAssetServer) error { - err := server.Send(&v2.AssetServiceGetAssetResponse{ - Msg: &v2.AssetServiceGetAssetResponse_Metadata_{ - Metadata: &v2.AssetServiceGetAssetResponse_Metadata{ContentType: "application/example"}, - }, - }) - if err != nil { - return err - } - - err = server.Send(&v2.AssetServiceGetAssetResponse{ - Msg: &v2.AssetServiceGetAssetResponse_Data_{ - Data: &v2.AssetServiceGetAssetResponse_Data{Data: nil}, - }, - }) - if err != nil { - return err - } - - return nil +func (n *emptyConnector) GetAsset(_ context.Context, request *v2.AssetServiceGetAssetRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v2.AssetServiceGetAssetResponse], error) { + return nil, status.Errorf(codes.NotFound, "empty connector") } // ListResourceTypes returns a list of resource types. -func (n *emptyConnector) ListResourceTypes(ctx context.Context, request *v2.ResourceTypesServiceListResourceTypesRequest) (*v2.ResourceTypesServiceListResourceTypesResponse, error) { +func (n *emptyConnector) ListResourceTypes( + ctx context.Context, + request *v2.ResourceTypesServiceListResourceTypesRequest, + opts ...grpc.CallOption, +) (*v2.ResourceTypesServiceListResourceTypesResponse, error) { return &v2.ResourceTypesServiceListResourceTypesResponse{ List: []*v2.ResourceType{}, }, nil } // ListResources returns a list of resources. -func (n *emptyConnector) ListResources(ctx context.Context, request *v2.ResourcesServiceListResourcesRequest) (*v2.ResourcesServiceListResourcesResponse, error) { +func (n *emptyConnector) ListResources(ctx context.Context, request *v2.ResourcesServiceListResourcesRequest, opts ...grpc.CallOption) (*v2.ResourcesServiceListResourcesResponse, error) { return &v2.ResourcesServiceListResourcesResponse{ List: []*v2.Resource{}, }, nil } +func (n *emptyConnector) GetResource( + ctx context.Context, + request *v2.ResourceGetterServiceGetResourceRequest, + opts ...grpc.CallOption, +) (*v2.ResourceGetterServiceGetResourceResponse, error) { + return nil, status.Errorf(codes.NotFound, "empty connector") +} + // ListEntitlements returns a list of entitlements. -func (n *emptyConnector) ListEntitlements(ctx context.Context, request *v2.EntitlementsServiceListEntitlementsRequest) (*v2.EntitlementsServiceListEntitlementsResponse, error) { +func (n *emptyConnector) ListEntitlements( + ctx context.Context, + request *v2.EntitlementsServiceListEntitlementsRequest, + opts ...grpc.CallOption, +) (*v2.EntitlementsServiceListEntitlementsResponse, error) { return &v2.EntitlementsServiceListEntitlementsResponse{ List: []*v2.Entitlement{}, }, nil } // ListGrants returns a list of grants. -func (n *emptyConnector) ListGrants(ctx context.Context, request *v2.GrantsServiceListGrantsRequest) (*v2.GrantsServiceListGrantsResponse, error) { +func (n *emptyConnector) ListGrants(ctx context.Context, request *v2.GrantsServiceListGrantsRequest, opts ...grpc.CallOption) (*v2.GrantsServiceListGrantsResponse, error) { return &v2.GrantsServiceListGrantsResponse{ List: []*v2.Grant{}, }, nil } +func (n *emptyConnector) Grant(ctx context.Context, request *v2.GrantManagerServiceGrantRequest, opts ...grpc.CallOption) (*v2.GrantManagerServiceGrantResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) Revoke(ctx context.Context, request *v2.GrantManagerServiceRevokeRequest, opts ...grpc.CallOption) (*v2.GrantManagerServiceRevokeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + // GetMetadata returns a connector metadata. -func (n *emptyConnector) GetMetadata(ctx context.Context, request *v2.ConnectorServiceGetMetadataRequest) (*v2.ConnectorServiceGetMetadataResponse, error) { +func (n *emptyConnector) GetMetadata(ctx context.Context, request *v2.ConnectorServiceGetMetadataRequest, opts ...grpc.CallOption) (*v2.ConnectorServiceGetMetadataResponse, error) { return &v2.ConnectorServiceGetMetadataResponse{Metadata: &v2.ConnectorMetadata{}}, nil } // Validate is called by the connector framework to validate the correct response. -func (n *emptyConnector) Validate(ctx context.Context, request *v2.ConnectorServiceValidateRequest) (*v2.ConnectorServiceValidateResponse, error) { +func (n *emptyConnector) Validate(ctx context.Context, request *v2.ConnectorServiceValidateRequest, opts ...grpc.CallOption) (*v2.ConnectorServiceValidateResponse, error) { return &v2.ConnectorServiceValidateResponse{}, nil } +func (n *emptyConnector) BulkCreateTickets(ctx context.Context, request *v2.TicketsServiceBulkCreateTicketsRequest, opts ...grpc.CallOption) (*v2.TicketsServiceBulkCreateTicketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) BulkGetTickets(ctx context.Context, request *v2.TicketsServiceBulkGetTicketsRequest, opts ...grpc.CallOption) (*v2.TicketsServiceBulkGetTicketsResponse, error) { + return &v2.TicketsServiceBulkGetTicketsResponse{ + Tickets: []*v2.TicketsServiceGetTicketResponse{}, + }, nil +} + +func (n *emptyConnector) CreateTicket(ctx context.Context, request *v2.TicketsServiceCreateTicketRequest, opts ...grpc.CallOption) (*v2.TicketsServiceCreateTicketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) GetTicket(ctx context.Context, request *v2.TicketsServiceGetTicketRequest, opts ...grpc.CallOption) (*v2.TicketsServiceGetTicketResponse, error) { + return nil, status.Errorf(codes.NotFound, "empty connector") +} + +func (n *emptyConnector) ListTicketSchemas(ctx context.Context, request *v2.TicketsServiceListTicketSchemasRequest, opts ...grpc.CallOption) (*v2.TicketsServiceListTicketSchemasResponse, error) { + return &v2.TicketsServiceListTicketSchemasResponse{ + List: []*v2.TicketSchema{}, + }, nil +} + +func (n *emptyConnector) GetTicketSchema(ctx context.Context, request *v2.TicketsServiceGetTicketSchemaRequest, opts ...grpc.CallOption) (*v2.TicketsServiceGetTicketSchemaResponse, error) { + return nil, status.Errorf(codes.NotFound, "empty connector") +} + +func (n *emptyConnector) Cleanup(ctx context.Context, request *v2.ConnectorServiceCleanupRequest, opts ...grpc.CallOption) (*v2.ConnectorServiceCleanupResponse, error) { + return &v2.ConnectorServiceCleanupResponse{}, nil +} + +func (n *emptyConnector) CreateAccount(ctx context.Context, request *v2.CreateAccountRequest, opts ...grpc.CallOption) (*v2.CreateAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) RotateCredential(ctx context.Context, request *v2.RotateCredentialRequest, opts ...grpc.CallOption) (*v2.RotateCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) CreateResource(ctx context.Context, request *v2.CreateResourceRequest, opts ...grpc.CallOption) (*v2.CreateResourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) DeleteResource(ctx context.Context, request *v2.DeleteResourceRequest, opts ...grpc.CallOption) (*v2.DeleteResourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) DeleteResourceV2(ctx context.Context, request *v2.DeleteResourceV2Request, opts ...grpc.CallOption) (*v2.DeleteResourceV2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) GetActionSchema(ctx context.Context, request *v2.GetActionSchemaRequest, opts ...grpc.CallOption) (*v2.GetActionSchemaResponse, error) { + return nil, status.Errorf(codes.NotFound, "empty connector") +} + +func (n *emptyConnector) GetActionStatus(ctx context.Context, request *v2.GetActionStatusRequest, opts ...grpc.CallOption) (*v2.GetActionStatusResponse, error) { + return nil, status.Errorf(codes.NotFound, "empty connector") +} + +func (n *emptyConnector) InvokeAction(ctx context.Context, request *v2.InvokeActionRequest, opts ...grpc.CallOption) (*v2.InvokeActionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "empty connector") +} + +func (n *emptyConnector) ListActionSchemas(ctx context.Context, request *v2.ListActionSchemasRequest, opts ...grpc.CallOption) (*v2.ListActionSchemasResponse, error) { + return &v2.ListActionSchemasResponse{ + Schemas: []*v2.BatonActionSchema{}, + }, nil +} + +func (n *emptyConnector) ListEvents(ctx context.Context, request *v2.ListEventsRequest, opts ...grpc.CallOption) (*v2.ListEventsResponse, error) { + return &v2.ListEventsResponse{ + Events: []*v2.Event{}, + }, nil +} + +func (n *emptyConnector) ListEventFeeds(ctx context.Context, request *v2.ListEventFeedsRequest, opts ...grpc.CallOption) (*v2.ListEventFeedsResponse, error) { + return &v2.ListEventFeedsResponse{ + List: []*v2.EventFeedMetadata{}, + }, nil +} + // NewEmptyConnector returns a new emptyConnector. func NewEmptyConnector() (*emptyConnector, error) { return &emptyConnector{}, nil diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go index 0fea9493..d2c0142c 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go @@ -1,3 +1,3 @@ package sdk -const Version = "v0.3.6" +const Version = "v0.3.27" diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go index df137208..e8dc6fe6 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go @@ -29,6 +29,8 @@ type State interface { SetNeedsExpansion() HasExternalResourcesGrants() bool SetHasExternalResourcesGrants() + ShouldFetchRelatedResources() bool + SetShouldFetchRelatedResources() } // ActionOp represents a sync operation. @@ -129,22 +131,24 @@ type Action struct { // state is an object used for tracking the current status of a connector sync. It operates like a stack. type state struct { - mtx sync.RWMutex - actions []Action - currentAction *Action - entitlementGraph *expand.EntitlementGraph - needsExpansion bool - hasExternalResourceGrants bool + mtx sync.RWMutex + actions []Action + currentAction *Action + entitlementGraph *expand.EntitlementGraph + needsExpansion bool + hasExternalResourceGrants bool + shouldFetchRelatedResources bool } // serializedToken is used to serialize the token to JSON. This separate object is used to avoid having exported fields // on the object used externally. We should interface this, probably. type serializedToken struct { - Actions []Action `json:"actions"` - CurrentAction *Action `json:"current_action"` - NeedsExpansion bool `json:"needs_expansion"` - EntitlementGraph *expand.EntitlementGraph `json:"entitlement_graph"` - HasExternalResourceGrants bool `json:"has_external_resource_grants"` + Actions []Action `json:"actions"` + CurrentAction *Action `json:"current_action"` + NeedsExpansion bool `json:"needs_expansion"` + EntitlementGraph *expand.EntitlementGraph `json:"entitlement_graph"` + HasExternalResourceGrants bool `json:"has_external_resource_grants"` + ShouldFetchRelatedResources bool `json:"should_fetch_related_resources"` } // push adds a new action to the stack. If there is no current state, the action is directly set to current, else @@ -286,6 +290,14 @@ func (st *state) SetHasExternalResourcesGrants() { st.hasExternalResourceGrants = true } +func (st *state) ShouldFetchRelatedResources() bool { + return st.shouldFetchRelatedResources +} + +func (st *state) SetShouldFetchRelatedResources() { + st.shouldFetchRelatedResources = true +} + // PageToken returns the page token for the current action. func (st *state) PageToken(ctx context.Context) string { c := st.Current() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go index 7022b979..5db1f0cf 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go @@ -107,12 +107,6 @@ func (p *ProgressCounts) LogEntitlementsProgress(ctx context.Context, resourceTy percentComplete := (entitlementsProgress * 100) / resources switch { - case entitlementsProgress > resources: - l.Error("more entitlement resources than resources", - zap.String("resource_type_id", resourceType), - zap.Int("synced", entitlementsProgress), - zap.Int("total", resources), - ) case percentComplete == 100: l.Info("Synced entitlements", zap.String("resource_type_id", resourceType), @@ -121,12 +115,20 @@ func (p *ProgressCounts) LogEntitlementsProgress(ctx context.Context, resourceTy ) p.LastEntitlementLog[resourceType] = time.Time{} case time.Since(p.LastEntitlementLog[resourceType]) > maxLogFrequency: - l.Info("Syncing entitlements", - zap.String("resource_type_id", resourceType), - zap.Int("synced", entitlementsProgress), - zap.Int("total", resources), - zap.Int("percent_complete", percentComplete), - ) + if entitlementsProgress > resources { + l.Warn("more entitlement resources than resources", + zap.String("resource_type_id", resourceType), + zap.Int("synced", entitlementsProgress), + zap.Int("total", resources), + ) + } else { + l.Info("Syncing entitlements", + zap.String("resource_type_id", resourceType), + zap.Int("synced", entitlementsProgress), + zap.Int("total", resources), + zap.Int("percent_complete", percentComplete), + ) + } p.LastEntitlementLog[resourceType] = time.Now() } } @@ -151,12 +153,6 @@ func (p *ProgressCounts) LogGrantsProgress(ctx context.Context, resourceType str percentComplete := (grantsProgress * 100) / resources switch { - case grantsProgress > resources: - l.Error("more grant resources than resources", - zap.String("resource_type_id", resourceType), - zap.Int("synced", grantsProgress), - zap.Int("total", resources), - ) case percentComplete == 100: l.Info("Synced grants", zap.String("resource_type_id", resourceType), @@ -165,12 +161,20 @@ func (p *ProgressCounts) LogGrantsProgress(ctx context.Context, resourceType str ) p.LastGrantLog[resourceType] = time.Time{} case time.Since(p.LastGrantLog[resourceType]) > maxLogFrequency: - l.Info("Syncing grants", - zap.String("resource_type_id", resourceType), - zap.Int("synced", grantsProgress), - zap.Int("total", resources), - zap.Int("percent_complete", percentComplete), - ) + if grantsProgress > resources { + l.Warn("more grant resources than resources", + zap.String("resource_type_id", resourceType), + zap.Int("synced", grantsProgress), + zap.Int("total", resources), + ) + } else { + l.Info("Syncing grants", + zap.String("resource_type_id", resourceType), + zap.Int("synced", grantsProgress), + zap.Int("total", resources), + zap.Int("percent_complete", percentComplete), + ) + } p.LastGrantLog[resourceType] = time.Now() } } @@ -204,8 +208,9 @@ type syncer struct { lastCheckPointTime time.Time counts *ProgressCounts targetedSyncResourceIDs []string - - skipEGForResourceType map[string]bool + onlyExpandGrants bool + syncID string + skipEGForResourceType map[string]bool } const minCheckpointInterval = 10 * time.Second @@ -262,6 +267,14 @@ func (s *syncer) startOrResumeSync(ctx context.Context) (string, bool, error) { // If no targetedSyncResourceIDs, find the most recent sync and resume it (regardless of partial or full). // If targetedSyncResourceIDs, start a new partial sync. Use the most recent completed sync as the parent sync ID (if it exists). + if s.syncID != "" { + err := s.store.SetCurrentSync(ctx, s.syncID) + if err != nil { + return "", false, err + } + return s.syncID, false, nil + } + var syncID string var newSync bool var err error @@ -409,6 +422,7 @@ func (s *syncer) Sync(ctx context.Context) error { ParentResourceTypeID: r.GetParentResourceId().GetResourceType(), }) } + s.state.SetShouldFetchRelatedResources() s.state.PushAction(ctx, Action{Op: SyncResourceTypesOp}) err = s.Checkpoint(ctx, true) if err != nil { @@ -424,6 +438,14 @@ func (s *syncer) Sync(ctx context.Context) error { if s.externalResourceReader != nil { s.state.PushAction(ctx, Action{Op: SyncExternalResourcesOp}) } + if s.onlyExpandGrants { + s.state.SetNeedsExpansion() + err = s.Checkpoint(ctx, true) + if err != nil { + return err + } + continue + } s.state.PushAction(ctx, Action{Op: SyncGrantsOp}) s.state.PushAction(ctx, Action{Op: SyncEntitlementsOp}) s.state.PushAction(ctx, Action{Op: SyncResourcesOp}) @@ -660,6 +682,31 @@ func (s *syncer) getSubResources(ctx context.Context, parent *v2.Resource) error return nil } +func (s *syncer) getResourceFromConnector(ctx context.Context, resourceID *v2.ResourceId, parentResourceID *v2.ResourceId) (*v2.Resource, error) { + ctx, span := tracer.Start(ctx, "syncer.getResource") + defer span.End() + + resourceResp, err := s.connector.GetResource(ctx, + &v2.ResourceGetterServiceGetResourceRequest{ + ResourceId: resourceID, + ParentResourceId: parentResourceID, + }, + ) + if err == nil { + return resourceResp.Resource, nil + } + l := ctxzap.Extract(ctx) + if status.Code(err) == codes.NotFound { + l.Warn("skipping resource due to not found", zap.String("resource_id", resourceID.GetResource()), zap.String("resource_type_id", resourceID.GetResourceType())) + return nil, nil + } + if status.Code(err) == codes.Unimplemented { + l.Warn("skipping resource due to unimplemented connector", zap.String("resource_id", resourceID.GetResource()), zap.String("resource_type_id", resourceID.GetResourceType())) + return nil, nil + } + return nil, err +} + func (s *syncer) SyncTargetedResource(ctx context.Context) error { ctx, span := tracer.Start(ctx, "syncer.SyncTargetedResource") defer span.End() @@ -680,21 +727,22 @@ func (s *syncer) SyncTargetedResource(ctx context.Context) error { } } - resourceResp, err := s.connector.GetResource(ctx, - &v2.ResourceGetterServiceGetResourceRequest{ - ResourceId: &v2.ResourceId{ - ResourceType: resourceTypeID, - Resource: resourceID, - }, - ParentResourceId: prID, - }, - ) + resource, err := s.getResourceFromConnector(ctx, &v2.ResourceId{ + ResourceType: resourceTypeID, + Resource: resourceID, + }, prID) if err != nil { return err } + // If getResource encounters not found or unimplemented, it returns a nil resource and nil error. + if resource == nil { + s.state.FinishAction(ctx) + return nil + } + // Save our resource in the DB - if err := s.store.PutResources(ctx, resourceResp.Resource); err != nil { + if err := s.store.PutResources(ctx, resource); err != nil { return err } @@ -714,7 +762,7 @@ func (s *syncer) SyncTargetedResource(ctx context.Context) error { ResourceID: resourceID, }) - err = s.getSubResources(ctx, resourceResp.Resource) + err = s.getSubResources(ctx, resource) if err != nil { return err } @@ -1515,6 +1563,7 @@ func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.Resou // We want to process any grants from the previous sync first so that if there is a conflict, the newer data takes precedence grants = append(grants, resp.List...) + l := ctxzap.Extract(ctx) for _, grant := range grants { grantAnnos := annotations.Annotations(grant.GetAnnotations()) if grantAnnos.Contains(&v2.GrantExpandable{}) { @@ -1523,6 +1572,57 @@ func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.Resou if grantAnnos.ContainsAny(&v2.ExternalResourceMatchAll{}, &v2.ExternalResourceMatch{}, &v2.ExternalResourceMatchID{}) { s.state.SetHasExternalResourcesGrants() } + + if !s.state.ShouldFetchRelatedResources() { + continue + } + // Some connectors emit grants for other resources. If we're doing a partial sync, check if it exists and queue a fetch if not. + entitlementResource := grant.GetEntitlement().GetResource() + _, err := s.store.GetResource(ctx, &reader_v2.ResourcesReaderServiceGetResourceRequest{ + ResourceId: entitlementResource.GetId(), + }) + if err != nil { + if !errors.Is(err, sql.ErrNoRows) { + return err + } + + erId := entitlementResource.GetId() + prId := entitlementResource.GetParentResourceId() + resource, err := s.getResourceFromConnector(ctx, erId, prId) + if err != nil { + l.Error("error fetching entitlement resource", zap.Error(err)) + return err + } + if resource == nil { + continue + } + if err := s.store.PutResources(ctx, resource); err != nil { + return err + } + } + + principalResource := grant.GetPrincipal() + _, err = s.store.GetResource(ctx, &reader_v2.ResourcesReaderServiceGetResourceRequest{ + ResourceId: principalResource.GetId(), + }) + if err != nil { + if !errors.Is(err, sql.ErrNoRows) { + return err + } + + // Principal resource is not in the DB, so try to fetch it from the connector. + resource, err := s.getResourceFromConnector(ctx, principalResource.GetId(), principalResource.GetParentResourceId()) + if err != nil { + l.Error("error fetching principal resource", zap.Error(err)) + return err + } + if resource == nil { + continue + } + if err := s.store.PutResources(ctx, resource); err != nil { + return err + } + } } err = s.store.PutGrants(ctx, grants...) if err != nil { @@ -2236,7 +2336,8 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { // Peek the next action on the stack if len(graph.Actions) == 0 { - l.Debug("runGrantExpandActions: no actions", zap.Any("graph", graph)) + l.Debug("runGrantExpandActions: no actions") // zap.Any("graph", graph), + return true, nil } action := graph.Actions[0] @@ -2366,12 +2467,6 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { } // Include the source grant as a source. sourcesMap[sourceGrant.GetEntitlement().GetId()] = &v2.GrantSources_GrantSource{} - - l.Debug( - "runGrantExpandActions: updating sources for descendant grant", - zap.String("grant_id", descendantGrant.GetId()), - zap.Any("sources", sources), - ) } newGrants = append(newGrants, descendantGrants...) } @@ -2424,7 +2519,7 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error { graph := s.state.EntitlementGraph(ctx) l = l.With(zap.Int("depth", graph.Depth)) - l.Debug("expandGrantsForEntitlements: start", zap.Any("graph", graph)) + l.Debug("expandGrantsForEntitlements: start") // zap.Any("graph", graph) s.counts.LogExpandProgress(ctx, graph.Actions) @@ -2451,7 +2546,7 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error { if int64(graph.Depth) > maxDepth { l.Error( "expandGrantsForEntitlements: exceeded max depth", - zap.Any("graph", graph), + // zap.Any("graph", graph), zap.Int64("max_depth", maxDepth), ) s.state.FinishAction(ctx) @@ -2487,13 +2582,13 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error { } if graph.IsExpanded() { - l.Debug("expandGrantsForEntitlements: graph is expanded", zap.Any("graph", graph)) + l.Debug("expandGrantsForEntitlements: graph is expanded") // zap.Any("graph", graph) s.state.FinishAction(ctx) return nil } graph.Depth++ - l.Debug("expandGrantsForEntitlements: graph is not expanded", zap.Any("graph", graph)) + l.Debug("expandGrantsForEntitlements: graph is not expanded") // zap.Any("graph", graph) return nil } @@ -2623,6 +2718,18 @@ func WithTargetedSyncResourceIDs(resourceIDs []string) SyncOpt { } } +func WithOnlyExpandGrants() SyncOpt { + return func(s *syncer) { + s.onlyExpandGrants = true + } +} + +func WithSyncID(syncID string) SyncOpt { + return func(s *syncer) { + s.syncID = syncID + } +} + // NewSyncer returns a new syncer object. func NewSyncer(ctx context.Context, c types.ConnectorClient, opts ...SyncOpt) (Syncer, error) { s := &syncer{ diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/synccompactor/compactor.go b/vendor/github.com/conductorone/baton-sdk/pkg/synccompactor/compactor.go index db442899..535c8ffe 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/synccompactor/compactor.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/synccompactor/compactor.go @@ -7,12 +7,13 @@ import ( "io" "os" "path" - "runtime" - "syscall" + "path/filepath" reader_v2 "github.com/conductorone/baton-sdk/pb/c1/reader/v2" "github.com/conductorone/baton-sdk/pkg/dotc1z" c1zmanager "github.com/conductorone/baton-sdk/pkg/dotc1z/manager" + "github.com/conductorone/baton-sdk/pkg/sdk" + "github.com/conductorone/baton-sdk/pkg/sync" sync_compactor "github.com/conductorone/baton-sdk/pkg/synccompactor/naive" "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" "go.uber.org/zap" @@ -20,8 +21,9 @@ import ( type Compactor struct { entries []*CompactableSync - destDir string + tmpDir string + destDir string } type CompactableSync struct { @@ -33,39 +35,42 @@ var ErrNotEnoughFilesToCompact = errors.New("must provide two or more files to c type Option func(*Compactor) -// WithTmpDir sets the temporary directory for intermediate files during compaction. -func WithTmpDir(tmpDir string) Option { +// WithTmpDir sets the working directory where files will be created and edited during compaction. +// If not provided, the temporary directory will be used. +func WithTmpDir(tempDir string) Option { return func(c *Compactor) { - c.tmpDir = tmpDir + c.tmpDir = tempDir } } -func NewCompactor(ctx context.Context, destDir string, compactableSyncs []*CompactableSync, opts ...Option) (*Compactor, error) { +func NewCompactor(ctx context.Context, outputDir string, compactableSyncs []*CompactableSync, opts ...Option) (*Compactor, func() error, error) { if len(compactableSyncs) < 2 { - return nil, ErrNotEnoughFilesToCompact + return nil, nil, ErrNotEnoughFilesToCompact } - c := &Compactor{entries: compactableSyncs, destDir: destDir} + c := &Compactor{entries: compactableSyncs, destDir: outputDir} for _, opt := range opts { opt(c) } - return c, nil -} - -func removeIntermediateFiles(intermediates []string, preserveLast bool) error { - // The last one is our "base" so we don't want to remove that one - if preserveLast { - intermediates = intermediates[:len(intermediates)-1] + // If no tmpDir is provided, use the tmpDir + if c.tmpDir == "" { + c.tmpDir = os.TempDir() } - for _, intermediateFile := range intermediates { - err := os.Remove(intermediateFile) - // Weird case if the file doesn't exist but it's "fine". - if err != nil && !errors.Is(err, os.ErrNotExist) { + tmpDir, err := os.MkdirTemp(c.tmpDir, "baton-sync-compactor-") + if err != nil { + return nil, nil, err + } + c.tmpDir = tmpDir + + cleanup := func() error { + if err := os.RemoveAll(c.tmpDir); err != nil { return err } + return nil } - return nil + + return c, cleanup, nil } func (c *Compactor) Compact(ctx context.Context) (*CompactableSync, error) { @@ -73,63 +78,72 @@ func (c *Compactor) Compact(ctx context.Context) (*CompactableSync, error) { return nil, nil } - intermediates := make([]string, 0, len(c.entries)-1) - base := c.entries[0] for i := 1; i < len(c.entries); i++ { applied := c.entries[i] compactable, err := c.doOneCompaction(ctx, base, applied) if err != nil { - if err := removeIntermediateFiles(intermediates, false); err != nil { - return nil, err - } return nil, err } - // Collect all the intermediate files we create to remove at the end - intermediates = append(intermediates, compactable.FilePath) + base = compactable } - if len(intermediates) > 0 { - if err := removeIntermediateFiles(intermediates, true); err != nil { - return nil, err - } + l := ctxzap.Extract(ctx) + // Grant expansion doesn't use the connector interface at all, so giving syncer an empty connector is safe... for now. + // If that ever changes, we should implement a file connector that is a wrapper around the reader. + emptyConnector, err := sdk.NewEmptyConnector() + if err != nil { + l.Error("error creating empty connector", zap.Error(err)) + return nil, err + } + + // Use syncer to expand grants. + // TODO: Handle external resources. + syncer, err := sync.NewSyncer( + ctx, + emptyConnector, + sync.WithC1ZPath(base.FilePath), + sync.WithSyncID(base.SyncID), + sync.WithOnlyExpandGrants(), + ) + if err != nil { + l.Error("error creating syncer", zap.Error(err)) + return nil, err + } + + if err := syncer.Sync(ctx); err != nil { + l.Error("error syncing with grant expansion", zap.Error(err)) + return nil, err + } + if err := syncer.Close(ctx); err != nil { + l.Error("error closing syncer", zap.Error(err)) + return nil, err } // Move last compacted file to the destination dir finalPath := path.Join(c.destDir, fmt.Sprintf("compacted-%s.c1z", base.SyncID)) - // Attempt to move via rename - if err := os.Rename(base.FilePath, finalPath); err != nil { - var linkErr *os.LinkError - if errors.As(err, &linkErr) { - // Mac err table: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/intro.2.html - // Win err table: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d?redirectedfrom=MSDN - if errors.Is(linkErr.Err, syscall.Errno(0x12)) || (runtime.GOOS == "windows" && errors.Is(linkErr.Err, syscall.Errno(0x11))) { - // If rename doesn't work do a full create/copy - if err := mvFile(base.FilePath, finalPath); err != nil { - // Return if mv file failed - return nil, err - } - } else { - // Return if it's a different kind of link err - return nil, err - } - } else { - // Return if it's not a link err + if err := cpFile(base.FilePath, finalPath); err != nil { + return nil, err + } + + if !filepath.IsAbs(finalPath) { + abs, err := filepath.Abs(finalPath) + if err != nil { return nil, err } + finalPath = abs } - base.FilePath = finalPath - - return base, nil + return &CompactableSync{FilePath: finalPath, SyncID: base.SyncID}, nil } -func mvFile(sourcePath string, destPath string) error { +func cpFile(sourcePath string, destPath string) error { source, err := os.Open(sourcePath) if err != nil { return fmt.Errorf("failed to open source file: %w", err) } + defer source.Close() destination, err := os.Create(destPath) if err != nil { @@ -142,16 +156,6 @@ func mvFile(sourcePath string, destPath string) error { return fmt.Errorf("failed to copy file: %w", err) } - // Explicitly close the source file before removing it - if err := source.Close(); err != nil { - return err - } - - err = os.Remove(sourcePath) - if err != nil { - return fmt.Errorf("failed to remove original file: %w", err) - } - return nil } @@ -194,17 +198,18 @@ func (c *Compactor) doOneCompaction(ctx context.Context, base *CompactableSync, zap.String("base_sync", base.SyncID), zap.String("applied_file", applied.FilePath), zap.String("applied_sync", applied.SyncID), + zap.String("tmp_dir", c.tmpDir), ) - filePath := fmt.Sprintf("compacted-%s-%s.c1z", base.SyncID, applied.SyncID) - - opts := []dotc1z.C1ZOption{dotc1z.WithPragma("journal_mode", "WAL")} - if c.tmpDir != "" { - opts = append(opts, dotc1z.WithTmpDir(c.tmpDir)) + opts := []dotc1z.C1ZOption{ + dotc1z.WithPragma("journal_mode", "WAL"), + dotc1z.WithTmpDir(c.tmpDir), } - newFile, err := dotc1z.NewC1ZFile(ctx, filePath, opts...) + fileName := fmt.Sprintf("compacted-%s-%s.c1z", base.SyncID, applied.SyncID) + newFile, err := dotc1z.NewC1ZFile(ctx, path.Join(c.tmpDir, fileName), opts...) if err != nil { + l.Error("doOneCompaction failed: could not create c1z file", zap.Error(err)) return nil, err } defer func() { _ = newFile.Close() }() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/action_invoker.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/action_invoker.go new file mode 100644 index 00000000..236842d1 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/action_invoker.go @@ -0,0 +1,82 @@ +package local + +import ( + "context" + "fmt" + "sync" + "time" + + "go.opentelemetry.io/otel/trace" + "go.uber.org/zap" + "google.golang.org/protobuf/types/known/structpb" + + v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" + v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1" + "github.com/conductorone/baton-sdk/pkg/tasks" + "github.com/conductorone/baton-sdk/pkg/types" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" +) + +type localActionInvoker struct { + dbPath string + o sync.Once + + action string + args *structpb.Struct +} + +func (m *localActionInvoker) GetTempDir() string { + return "" +} + +func (m *localActionInvoker) ShouldDebug() bool { + return false +} + +func (m *localActionInvoker) Next(ctx context.Context) (*v1.Task, time.Duration, error) { + var task *v1.Task + m.o.Do(func() { + task = &v1.Task{ + TaskType: &v1.Task_ActionInvoke{ + ActionInvoke: &v1.Task_ActionInvokeTask{ + Name: m.action, + Args: m.args, + }, + }, + } + }) + return task, 0, nil +} + +func (m *localActionInvoker) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error { + l := ctxzap.Extract(ctx) + ctx, span := tracer.Start(ctx, "localActionInvoker.Process", trace.WithNewRoot()) + defer span.End() + + t := task.GetActionInvoke() + resp, err := cc.InvokeAction(ctx, &v2.InvokeActionRequest{ + Name: t.GetName(), + Args: t.GetArgs(), + Annotations: t.GetAnnotations(), + }) + if err != nil { + return err + } + + l.Info("ActionInvoke response", zap.Any("resp", resp)) + + if resp.GetStatus() == v2.BatonActionStatus_BATON_ACTION_STATUS_FAILED { + return fmt.Errorf("action invoke failed: %v", resp.GetResponse()) + } + + return nil +} + +// NewActionInvoker returns a task manager that queues an action invoke task. +func NewActionInvoker(ctx context.Context, dbPath string, action string, args *structpb.Struct) tasks.Manager { + return &localActionInvoker{ + dbPath: dbPath, + action: action, + args: args, + } +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/compactor.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/compactor.go index 34daa7a6..1153134f 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/compactor.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/compactor.go @@ -44,10 +44,14 @@ func (m *localCompactor) Process(ctx context.Context, task *v1.Task, cc types.Co defer span.End() log := ctxzap.Extract(ctx) - compactor, err := synccompactor.NewCompactor(ctx, m.outputPath, m.compactableSyncs) + compactor, cleanup, err := synccompactor.NewCompactor(ctx, m.outputPath, m.compactableSyncs) if err != nil { return err } + defer func() { + _ = cleanup() + }() + compacted, err := compactor.Compact(ctx) if err != nil { return err diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go index 0415b4e6..18e04a4b 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go @@ -6,17 +6,19 @@ import ( "sync" "time" - "go.opentelemetry.io/otel/trace" - "google.golang.org/protobuf/encoding/protojson" - v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1" "github.com/conductorone/baton-sdk/pkg/tasks" "github.com/conductorone/baton-sdk/pkg/types" + "go.opentelemetry.io/otel/trace" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/types/known/timestamppb" ) type localEventFeed struct { - o sync.Once + o sync.Once + feedId string + startAt time.Time } const EventsPerPageLocally = 100 @@ -33,7 +35,11 @@ func (m *localEventFeed) Next(ctx context.Context) (*v1.Task, time.Duration, err var task *v1.Task m.o.Do(func() { task = &v1.Task{ - TaskType: &v1.Task_EventFeed{}, + TaskType: &v1.Task_EventFeed{ + EventFeed: &v1.Task_EventFeedTask{ + StartAt: timestamppb.New(m.startAt), + }, + }, } }) return task, 0, nil @@ -46,9 +52,10 @@ func (m *localEventFeed) Process(ctx context.Context, task *v1.Task, cc types.Co var pageToken string for { resp, err := cc.ListEvents(ctx, &v2.ListEventsRequest{ - PageSize: EventsPerPageLocally, - Cursor: pageToken, - StartAt: task.GetEventFeed().GetStartAt(), + PageSize: EventsPerPageLocally, + Cursor: pageToken, + StartAt: task.GetEventFeed().GetStartAt(), + EventFeedId: m.feedId, }) if err != nil { return err @@ -71,6 +78,9 @@ func (m *localEventFeed) Process(ctx context.Context, task *v1.Task, cc types.Co } // NewEventFeed returns a task manager that queues an event feed task. -func NewEventFeed(ctx context.Context) tasks.Manager { - return &localEventFeed{} +func NewEventFeed(ctx context.Context, feedId string, startAt time.Time) tasks.Manager { + return &localEventFeed{ + feedId: feedId, + startAt: startAt, + } } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go index 69699b79..5be4e840 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go @@ -71,3 +71,28 @@ func NewAssignmentEntitlement(resource *v2.Resource, name string, entitlementOpt } return entitlement } + +func NewEntitlement(resource *v2.Resource, name, purposeStr string, entitlementOptions ...EntitlementOption) *v2.Entitlement { + var purpose v2.Entitlement_PurposeValue + switch purposeStr { + case "permission": + purpose = v2.Entitlement_PURPOSE_VALUE_PERMISSION + case "assignment": + purpose = v2.Entitlement_PURPOSE_VALUE_ASSIGNMENT + default: + purpose = v2.Entitlement_PURPOSE_VALUE_UNSPECIFIED + } + + entitlement := &v2.Entitlement{ + Id: NewEntitlementID(resource, name), + DisplayName: name, + Slug: name, + Purpose: purpose, + Resource: resource, + } + + for _, entitlementOption := range entitlementOptions { + entitlementOption(entitlement) + } + return entitlement +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/role_trait.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/role_trait.go index 44fe8096..4b80da27 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/role_trait.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/role_trait.go @@ -46,7 +46,7 @@ func GetRoleTrait(resource *v2.Resource) (*v2.RoleTrait, error) { return nil, err } if !ok { - return nil, fmt.Errorf("group trait was not found on resource") + return nil, fmt.Errorf("role trait was not found on resource") } return ret, nil diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go index b46a58b1..73071aa4 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go @@ -88,6 +88,7 @@ const ( ListGrantsType GetMetadataType ListEventsType + ListEventFeedsType StartDebugging BulkCreateTicketsType BulkGetTicketsType diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go index d4e42176..cae9b483 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go @@ -142,6 +142,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { zap.String("http.method", req.Method), zap.String("http.url_details.host", req.URL.Host), zap.String("http.url_details.path", req.URL.Path), + zap.String("http.url_details.query", req.URL.RawQuery), ) } resp, err := rt.RoundTrip(req) @@ -149,6 +150,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { fields := []zap.Field{zap.String("http.method", req.Method), zap.String("http.url_details.host", req.URL.Host), zap.String("http.url_details.path", req.URL.Path), + zap.String("http.url_details.query", req.URL.RawQuery), } if err != nil { diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go index 0471edb7..1a368cac 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go @@ -11,6 +11,7 @@ import ( "net/http" "net/url" "os" + "strings" "syscall" "time" @@ -133,7 +134,7 @@ func NewBaseHttpClientWithContext(ctx context.Context, httpClient *http.Client, // WithJSONResponse is a wrapper that marshals the returned response body into // the provided shape. If the API should return an empty JSON body (i.e. HTTP // status code 204 No Content), then pass a `nil` to `response`. -func WithJSONResponse(response interface{}) DoOption { +func WithJSONResponse(response any) DoOption { return func(resp *WrapperResponse) error { contentHeader := resp.Header.Get(ContentType) @@ -157,7 +158,7 @@ func WithJSONResponse(response interface{}) DoOption { } // Ignore content type header and always try to parse the response as JSON. -func WithAlwaysJSONResponse(response interface{}) DoOption { +func WithAlwaysJSONResponse(response any) DoOption { return func(resp *WrapperResponse) error { if response == nil && len(resp.Body) == 0 { return nil @@ -171,6 +172,36 @@ func WithAlwaysJSONResponse(response interface{}) DoOption { } } +func WithXMLResponse(response any) DoOption { + return func(resp *WrapperResponse) error { + if !IsXMLContentType(resp.Header.Get(ContentType)) { + return fmt.Errorf("unexpected content type for xml response: %s", resp.Header.Get(ContentType)) + } + if response == nil && len(resp.Body) == 0 { + return nil + } + err := xml.Unmarshal(resp.Body, response) + if err != nil { + return fmt.Errorf("failed to unmarshal xml response: %w. status code: %d", err, resp.StatusCode) + } + return nil + } +} + +// Ignore content type header and always try to parse the response as XML. +func WithAlwaysXMLResponse(response any) DoOption { + return func(resp *WrapperResponse) error { + if response == nil && len(resp.Body) == 0 { + return nil + } + err := xml.Unmarshal(resp.Body, response) + if err != nil { + return fmt.Errorf("failed to unmarshal xml response: %w. status code: %d", err, resp.StatusCode) + } + return nil + } +} + type ErrorResponse interface { Message() string } @@ -185,13 +216,13 @@ func WithErrorResponse(resource ErrorResponse) DoOption { if !IsJSONContentType(contentHeader) { // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead - return fmt.Errorf("unexpected content type for JSON error response: %s. status code: %d", contentHeader, resp.StatusCode) + return fmt.Errorf("unexpected content type for JSON error response: %s. status code: %d. body: %s", contentHeader, resp.StatusCode, string(resp.Body)) } // Decode the JSON response body into the ErrorResponse if err := json.Unmarshal(resp.Body, &resource); err != nil { // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead - return fmt.Errorf("failed to unmarshal JSON error response: %w. status code: %d", err, resp.StatusCode) + return fmt.Errorf("failed to unmarshal JSON error response: %w. status code: %d. body: %s", err, resp.StatusCode, string(resp.Body)) } // Construct a more detailed error message @@ -220,32 +251,60 @@ func WithRatelimitData(resource *v2.RateLimitDescription) DoOption { } } -func WithXMLResponse(response interface{}) DoOption { +func WithResponse(response any) DoOption { return func(resp *WrapperResponse) error { - if !IsXMLContentType(resp.Header.Get(ContentType)) { - return fmt.Errorf("unexpected content type for xml response: %s", resp.Header.Get(ContentType)) - } - if response == nil && len(resp.Body) == 0 { - return nil + if IsJSONContentType(resp.Header.Get(ContentType)) { + return WithJSONResponse(response)(resp) } - err := xml.Unmarshal(resp.Body, response) - if err != nil { - return fmt.Errorf("failed to unmarshal xml response: %w. body %v", err, resp.Body) + if IsXMLContentType(resp.Header.Get(ContentType)) { + return WithXMLResponse(response)(resp) } - return nil + + return status.Error(codes.Unknown, "unsupported content type") } } -func WithResponse(response interface{}) DoOption { +// Handle anything that can be marshaled into JSON or XML. +// If the response is a list, its values will be put into the "items" field. +func WithGenericResponse(response *map[string]any) DoOption { return func(resp *WrapperResponse) error { + if response == nil { + return status.Error(codes.InvalidArgument, "response is nil") + } + var v any + var err error + if IsJSONContentType(resp.Header.Get(ContentType)) { - return WithJSONResponse(response)(resp) + err = WithJSONResponse(&v)(resp) + if err != nil { + return err + } + if list, ok := v.([]any); ok { + (*response)["items"] = list + } else if vMap, ok := v.(map[string]any); ok { + *response = vMap + } else { + return status.Errorf(codes.Internal, "unsupported content type: %T", v) + } + return nil } + if IsXMLContentType(resp.Header.Get(ContentType)) { - return WithXMLResponse(response)(resp) + err = WithXMLResponse(response)(resp) + if err != nil { + return err + } + if list, ok := v.([]any); ok { + (*response)["items"] = list + } else if vMap, ok := v.(map[string]any); ok { + *response = vMap + } else { + return status.Errorf(codes.Internal, "unsupported content type: %T", v) + } + return nil } - return status.Error(codes.Unknown, "unsupported content type") + return status.Error(codes.Unknown, fmt.Sprintf("unsupported content type: %s", resp.Header.Get(ContentType))) } } @@ -304,6 +363,7 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo if resp == nil { resp, err = c.HttpClient.Do(req) if err != nil { + l.Error("base-http-client: HTTP error response", zap.Error(err)) var urlErr *url.Error if errors.As(err, &urlErr) { if urlErr.Timeout() { @@ -359,6 +419,16 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo } } + // Log response headers directly for certain errors + if resp.StatusCode >= 400 { + redactedHeaders := redactHeaders(resp.Header) + l.Error("base-http-client: HTTP error status", + zap.Int("status_code", resp.StatusCode), + zap.String("status", resp.Status), + zap.Any("headers", redactedHeaders), + ) + } + switch resp.StatusCode { case http.StatusRequestTimeout: return resp, WrapErrorsWithRateLimitInfo(codes.DeadlineExceeded, resp, optErrs...) @@ -394,6 +464,19 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo return resp, errors.Join(optErrs...) } +func redactHeaders(h http.Header) http.Header { + safe := make(http.Header, len(h)) + for k, v := range h { + switch strings.ToLower(k) { + case "authorization", "set-cookie", "cookie": + safe[k] = []string{"REDACTED"} + default: + safe[k] = v + } + } + return safe +} + func WithHeader(key, value string) RequestOption { return func() (io.ReadWriter, map[string]string, error) { return nil, map[string]string{ @@ -408,7 +491,7 @@ func WithBody(body []byte) RequestOption { } } -func WithJSONBody(body interface{}) RequestOption { +func WithJSONBody(body any) RequestOption { return func() (io.ReadWriter, map[string]string, error) { buffer := new(bytes.Buffer) err := json.NewEncoder(buffer).Encode(body) @@ -442,7 +525,7 @@ func WithFormBody(body string) RequestOption { } } -func WithXMLBody(body interface{}) RequestOption { +func WithXMLBody(body any) RequestOption { return func() (io.ReadWriter, map[string]string, error) { var buffer bytes.Buffer diff --git a/vendor/golang.org/x/sys/plan9/asm.s b/vendor/golang.org/x/sys/plan9/asm.s new file mode 100644 index 00000000..06449ebf --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm.s @@ -0,0 +1,8 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +TEXT ·use(SB),NOSPLIT,$0 + RET diff --git a/vendor/golang.org/x/sys/plan9/asm_plan9_386.s b/vendor/golang.org/x/sys/plan9/asm_plan9_386.s new file mode 100644 index 00000000..bc5cab1f --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm_plan9_386.s @@ -0,0 +1,30 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// +// System call support for 386, Plan 9 +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-32 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-44 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-36 + JMP syscall·seek(SB) + +TEXT ·exit(SB),NOSPLIT,$4-4 + JMP syscall·exit(SB) diff --git a/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s b/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s new file mode 100644 index 00000000..d3448e67 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s @@ -0,0 +1,30 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// +// System call support for amd64, Plan 9 +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-64 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-88 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-56 + JMP syscall·seek(SB) + +TEXT ·exit(SB),NOSPLIT,$8-8 + JMP syscall·exit(SB) diff --git a/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s b/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s new file mode 100644 index 00000000..afb7c0a9 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s @@ -0,0 +1,25 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// System call support for plan9 on arm + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-32 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-44 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-36 + JMP syscall·exit(SB) diff --git a/vendor/golang.org/x/sys/plan9/const_plan9.go b/vendor/golang.org/x/sys/plan9/const_plan9.go new file mode 100644 index 00000000..b4e85a3a --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/const_plan9.go @@ -0,0 +1,70 @@ +package plan9 + +// Plan 9 Constants + +// Open modes +const ( + O_RDONLY = 0 + O_WRONLY = 1 + O_RDWR = 2 + O_TRUNC = 16 + O_CLOEXEC = 32 + O_EXCL = 0x1000 +) + +// Rfork flags +const ( + RFNAMEG = 1 << 0 + RFENVG = 1 << 1 + RFFDG = 1 << 2 + RFNOTEG = 1 << 3 + RFPROC = 1 << 4 + RFMEM = 1 << 5 + RFNOWAIT = 1 << 6 + RFCNAMEG = 1 << 10 + RFCENVG = 1 << 11 + RFCFDG = 1 << 12 + RFREND = 1 << 13 + RFNOMNT = 1 << 14 +) + +// Qid.Type bits +const ( + QTDIR = 0x80 + QTAPPEND = 0x40 + QTEXCL = 0x20 + QTMOUNT = 0x10 + QTAUTH = 0x08 + QTTMP = 0x04 + QTFILE = 0x00 +) + +// Dir.Mode bits +const ( + DMDIR = 0x80000000 + DMAPPEND = 0x40000000 + DMEXCL = 0x20000000 + DMMOUNT = 0x10000000 + DMAUTH = 0x08000000 + DMTMP = 0x04000000 + DMREAD = 0x4 + DMWRITE = 0x2 + DMEXEC = 0x1 +) + +const ( + STATMAX = 65535 + ERRMAX = 128 + STATFIXLEN = 49 +) + +// Mount and bind flags +const ( + MREPL = 0x0000 + MBEFORE = 0x0001 + MAFTER = 0x0002 + MORDER = 0x0003 + MCREATE = 0x0004 + MCACHE = 0x0010 + MMASK = 0x0017 +) diff --git a/vendor/golang.org/x/sys/plan9/dir_plan9.go b/vendor/golang.org/x/sys/plan9/dir_plan9.go new file mode 100644 index 00000000..0955e0c5 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/dir_plan9.go @@ -0,0 +1,212 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Plan 9 directory marshalling. See intro(5). + +package plan9 + +import "errors" + +var ( + ErrShortStat = errors.New("stat buffer too short") + ErrBadStat = errors.New("malformed stat buffer") + ErrBadName = errors.New("bad character in file name") +) + +// A Qid represents a 9P server's unique identification for a file. +type Qid struct { + Path uint64 // the file server's unique identification for the file + Vers uint32 // version number for given Path + Type uint8 // the type of the file (plan9.QTDIR for example) +} + +// A Dir contains the metadata for a file. +type Dir struct { + // system-modified data + Type uint16 // server type + Dev uint32 // server subtype + + // file data + Qid Qid // unique id from server + Mode uint32 // permissions + Atime uint32 // last read time + Mtime uint32 // last write time + Length int64 // file length + Name string // last element of path + Uid string // owner name + Gid string // group name + Muid string // last modifier name +} + +var nullDir = Dir{ + Type: ^uint16(0), + Dev: ^uint32(0), + Qid: Qid{ + Path: ^uint64(0), + Vers: ^uint32(0), + Type: ^uint8(0), + }, + Mode: ^uint32(0), + Atime: ^uint32(0), + Mtime: ^uint32(0), + Length: ^int64(0), +} + +// Null assigns special "don't touch" values to members of d to +// avoid modifying them during plan9.Wstat. +func (d *Dir) Null() { *d = nullDir } + +// Marshal encodes a 9P stat message corresponding to d into b +// +// If there isn't enough space in b for a stat message, ErrShortStat is returned. +func (d *Dir) Marshal(b []byte) (n int, err error) { + n = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid) + if n > len(b) { + return n, ErrShortStat + } + + for _, c := range d.Name { + if c == '/' { + return n, ErrBadName + } + } + + b = pbit16(b, uint16(n)-2) + b = pbit16(b, d.Type) + b = pbit32(b, d.Dev) + b = pbit8(b, d.Qid.Type) + b = pbit32(b, d.Qid.Vers) + b = pbit64(b, d.Qid.Path) + b = pbit32(b, d.Mode) + b = pbit32(b, d.Atime) + b = pbit32(b, d.Mtime) + b = pbit64(b, uint64(d.Length)) + b = pstring(b, d.Name) + b = pstring(b, d.Uid) + b = pstring(b, d.Gid) + b = pstring(b, d.Muid) + + return n, nil +} + +// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir. +// +// If b is too small to hold a valid stat message, ErrShortStat is returned. +// +// If the stat message itself is invalid, ErrBadStat is returned. +func UnmarshalDir(b []byte) (*Dir, error) { + if len(b) < STATFIXLEN { + return nil, ErrShortStat + } + size, buf := gbit16(b) + if len(b) != int(size)+2 { + return nil, ErrBadStat + } + b = buf + + var d Dir + d.Type, b = gbit16(b) + d.Dev, b = gbit32(b) + d.Qid.Type, b = gbit8(b) + d.Qid.Vers, b = gbit32(b) + d.Qid.Path, b = gbit64(b) + d.Mode, b = gbit32(b) + d.Atime, b = gbit32(b) + d.Mtime, b = gbit32(b) + + n, b := gbit64(b) + d.Length = int64(n) + + var ok bool + if d.Name, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + if d.Uid, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + if d.Gid, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + if d.Muid, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + + return &d, nil +} + +// pbit8 copies the 8-bit number v to b and returns the remaining slice of b. +func pbit8(b []byte, v uint8) []byte { + b[0] = byte(v) + return b[1:] +} + +// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b. +func pbit16(b []byte, v uint16) []byte { + b[0] = byte(v) + b[1] = byte(v >> 8) + return b[2:] +} + +// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b. +func pbit32(b []byte, v uint32) []byte { + b[0] = byte(v) + b[1] = byte(v >> 8) + b[2] = byte(v >> 16) + b[3] = byte(v >> 24) + return b[4:] +} + +// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b. +func pbit64(b []byte, v uint64) []byte { + b[0] = byte(v) + b[1] = byte(v >> 8) + b[2] = byte(v >> 16) + b[3] = byte(v >> 24) + b[4] = byte(v >> 32) + b[5] = byte(v >> 40) + b[6] = byte(v >> 48) + b[7] = byte(v >> 56) + return b[8:] +} + +// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and +// returning the remaining slice of b.. +func pstring(b []byte, s string) []byte { + b = pbit16(b, uint16(len(s))) + n := copy(b, s) + return b[n:] +} + +// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b. +func gbit8(b []byte) (uint8, []byte) { + return uint8(b[0]), b[1:] +} + +// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b. +func gbit16(b []byte) (uint16, []byte) { + return uint16(b[0]) | uint16(b[1])<<8, b[2:] +} + +// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b. +func gbit32(b []byte) (uint32, []byte) { + return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:] +} + +// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b. +func gbit64(b []byte) (uint64, []byte) { + lo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + hi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24 + return uint64(lo) | uint64(hi)<<32, b[8:] +} + +// gstring reads a string from b, prefixed with a 16-bit length in little-endian order. +// It returns the string with the remaining slice of b and a boolean. If the length is +// greater than the number of bytes in b, the boolean will be false. +func gstring(b []byte) (string, []byte, bool) { + n, b := gbit16(b) + if int(n) > len(b) { + return "", b, false + } + return string(b[:n]), b[n:], true +} diff --git a/vendor/golang.org/x/sys/plan9/env_plan9.go b/vendor/golang.org/x/sys/plan9/env_plan9.go new file mode 100644 index 00000000..8f191800 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/env_plan9.go @@ -0,0 +1,31 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Plan 9 environment variables. + +package plan9 + +import ( + "syscall" +) + +func Getenv(key string) (value string, found bool) { + return syscall.Getenv(key) +} + +func Setenv(key, value string) error { + return syscall.Setenv(key, value) +} + +func Clearenv() { + syscall.Clearenv() +} + +func Environ() []string { + return syscall.Environ() +} + +func Unsetenv(key string) error { + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/plan9/errors_plan9.go b/vendor/golang.org/x/sys/plan9/errors_plan9.go new file mode 100644 index 00000000..65fe74d3 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/errors_plan9.go @@ -0,0 +1,50 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package plan9 + +import "syscall" + +// Constants +const ( + // Invented values to support what package os expects. + O_CREAT = 0x02000 + O_APPEND = 0x00400 + O_NOCTTY = 0x00000 + O_NONBLOCK = 0x00000 + O_SYNC = 0x00000 + O_ASYNC = 0x00000 + + S_IFMT = 0x1f000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 +) + +// Errors +var ( + EINVAL = syscall.NewError("bad arg in system call") + ENOTDIR = syscall.NewError("not a directory") + EISDIR = syscall.NewError("file is a directory") + ENOENT = syscall.NewError("file does not exist") + EEXIST = syscall.NewError("file already exists") + EMFILE = syscall.NewError("no free file descriptors") + EIO = syscall.NewError("i/o error") + ENAMETOOLONG = syscall.NewError("file name too long") + EINTR = syscall.NewError("interrupted") + EPERM = syscall.NewError("permission denied") + EBUSY = syscall.NewError("no free devices") + ETIMEDOUT = syscall.NewError("connection timed out") + EPLAN9 = syscall.NewError("not supported by plan 9") + + // The following errors do not correspond to any + // Plan 9 system messages. Invented to support + // what package os and others expect. + EACCES = syscall.NewError("access permission denied") + EAFNOSUPPORT = syscall.NewError("address family not supported by protocol") +) diff --git a/vendor/golang.org/x/sys/plan9/mkall.sh b/vendor/golang.org/x/sys/plan9/mkall.sh new file mode 100644 index 00000000..1650fbcc --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/mkall.sh @@ -0,0 +1,150 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# The plan9 package provides access to the raw system call +# interface of the underlying operating system. Porting Go to +# a new architecture/operating system combination requires +# some manual effort, though there are tools that automate +# much of the process. The auto-generated files have names +# beginning with z. +# +# This script runs or (given -n) prints suggested commands to generate z files +# for the current system. Running those commands is not automatic. +# This script is documentation more than anything else. +# +# * asm_${GOOS}_${GOARCH}.s +# +# This hand-written assembly file implements system call dispatch. +# There are three entry points: +# +# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); +# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# +# The first and second are the standard ones; they differ only in +# how many arguments can be passed to the kernel. +# The third is for low-level use by the ForkExec wrapper; +# unlike the first two, it does not call into the scheduler to +# let it know that a system call is running. +# +# * syscall_${GOOS}.go +# +# This hand-written Go file implements system calls that need +# special handling and lists "//sys" comments giving prototypes +# for ones that can be auto-generated. Mksyscall reads those +# comments to generate the stubs. +# +# * syscall_${GOOS}_${GOARCH}.go +# +# Same as syscall_${GOOS}.go except that it contains code specific +# to ${GOOS} on one particular architecture. +# +# * types_${GOOS}.c +# +# This hand-written C file includes standard C headers and then +# creates typedef or enum names beginning with a dollar sign +# (use of $ in variable names is a gcc extension). The hardest +# part about preparing this file is figuring out which headers to +# include and which symbols need to be #defined to get the +# actual data structures that pass through to the kernel system calls. +# Some C libraries present alternate versions for binary compatibility +# and translate them on the way in and out of system calls, but +# there is almost always a #define that can get the real ones. +# See types_darwin.c and types_linux.c for examples. +# +# * zerror_${GOOS}_${GOARCH}.go +# +# This machine-generated file defines the system's error numbers, +# error strings, and signal numbers. The generator is "mkerrors.sh". +# Usually no arguments are needed, but mkerrors.sh will pass its +# arguments on to godefs. +# +# * zsyscall_${GOOS}_${GOARCH}.go +# +# Generated by mksyscall.pl; see syscall_${GOOS}.go above. +# +# * zsysnum_${GOOS}_${GOARCH}.go +# +# Generated by mksysnum_${GOOS}. +# +# * ztypes_${GOOS}_${GOARCH}.go +# +# Generated by godefs; see types_${GOOS}.c above. + +GOOSARCH="${GOOS}_${GOARCH}" + +# defaults +mksyscall="go run mksyscall.go" +mkerrors="./mkerrors.sh" +zerrors="zerrors_$GOOSARCH.go" +mksysctl="" +zsysctl="zsysctl_$GOOSARCH.go" +mksysnum= +mktypes= +run="sh" + +case "$1" in +-syscalls) + for i in zsyscall*go + do + sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i + rm _$i + done + exit 0 + ;; +-n) + run="cat" + shift +esac + +case "$#" in +0) + ;; +*) + echo 'usage: mkall.sh [-n]' 1>&2 + exit 2 +esac + +case "$GOOSARCH" in +_* | *_ | _) + echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 + exit 1 + ;; +plan9_386) + mkerrors= + mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,386" + mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" + mktypes="XXX" + ;; +plan9_amd64) + mkerrors= + mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,amd64" + mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" + mktypes="XXX" + ;; +plan9_arm) + mkerrors= + mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,arm" + mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" + mktypes="XXX" + ;; +*) + echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 + exit 1 + ;; +esac + +( + if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi + case "$GOOS" in + plan9) + syscall_goos="syscall_$GOOS.go" + if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos |gofmt >zsyscall_$GOOSARCH.go"; fi + ;; + esac + if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi + if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi + if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi +) | $run diff --git a/vendor/golang.org/x/sys/plan9/mkerrors.sh b/vendor/golang.org/x/sys/plan9/mkerrors.sh new file mode 100644 index 00000000..526d04ab --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/mkerrors.sh @@ -0,0 +1,246 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# Generate Go code listing errors and other #defined constant +# values (ENAMETOOLONG etc.), by asking the preprocessor +# about the definitions. + +unset LANG +export LC_ALL=C +export LC_CTYPE=C + +CC=${CC:-gcc} + +uname=$(uname) + +includes=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + +ccflags="$@" + +# Write go tool cgo -godefs input. +( + echo package plan9 + echo + echo '/*' + indirect="includes_$(uname)" + echo "${!indirect} $includes" + echo '*/' + echo 'import "C"' + echo + echo 'const (' + + # The gcc command line prints all the #defines + # it encounters while processing the input + echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | + awk ' + $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} + + $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers + $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} + $2 ~ /^(SCM_SRCRT)$/ {next} + $2 ~ /^(MAP_FAILED)$/ {next} + + $2 !~ /^ETH_/ && + $2 !~ /^EPROC_/ && + $2 !~ /^EQUIV_/ && + $2 !~ /^EXPR_/ && + $2 ~ /^E[A-Z0-9_]+$/ || + $2 ~ /^B[0-9_]+$/ || + $2 ~ /^V[A-Z0-9]+$/ || + $2 ~ /^CS[A-Z0-9]/ || + $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ || + $2 ~ /^IGN/ || + $2 ~ /^IX(ON|ANY|OFF)$/ || + $2 ~ /^IN(LCR|PCK)$/ || + $2 ~ /(^FLU?SH)|(FLU?SH$)/ || + $2 ~ /^C(LOCAL|READ)$/ || + $2 == "BRKINT" || + $2 == "HUPCL" || + $2 == "PENDIN" || + $2 == "TOSTOP" || + $2 ~ /^PAR/ || + $2 ~ /^SIG[^_]/ || + $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ || + $2 ~ /^IN_/ || + $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || + $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || + $2 == "ICMPV6_FILTER" || + $2 == "SOMAXCONN" || + $2 == "NAME_MAX" || + $2 == "IFNAMSIZ" || + $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ || + $2 ~ /^SYSCTL_VERS/ || + $2 ~ /^(MS|MNT)_/ || + $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || + $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ || + $2 ~ /^LINUX_REBOOT_CMD_/ || + $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || + $2 !~ "NLA_TYPE_MASK" && + $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ || + $2 ~ /^SIOC/ || + $2 ~ /^TIOC/ || + $2 !~ "RTF_BITS" && + $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || + $2 ~ /^BIOC/ || + $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || + $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ || + $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || + $2 ~ /^CLONE_[A-Z_]+/ || + $2 !~ /^(BPF_TIMEVAL)$/ && + $2 ~ /^(BPF|DLT)_/ || + $2 !~ "WMESGLEN" && + $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)} + $2 ~ /^__WCOREFLAG$/ {next} + $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} + + {next} + ' | sort + + echo ')' +) >_const.go + +# Pull out the error names for later. +errors=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | + sort +) + +# Pull out the signal names for later. +signals=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | + grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' | + sort +) + +# Again, writing regexps to a file. +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | + sort >_error.grep +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | + grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' | + sort >_signal.grep + +echo '// mkerrors.sh' "$@" +echo '// Code generated by the command above; DO NOT EDIT.' +echo +go tool cgo -godefs -- "$@" _const.go >_error.out +cat _error.out | grep -vf _error.grep | grep -vf _signal.grep +echo +echo '// Errors' +echo 'const (' +cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/' +echo ')' + +echo +echo '// Signals' +echo 'const (' +cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/' +echo ')' + +# Run C program to print error and syscall strings. +( + echo -E " +#include +#include +#include +#include +#include +#include + +#define nelem(x) (sizeof(x)/sizeof((x)[0])) + +enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below + +int errors[] = { +" + for i in $errors + do + echo -E ' '$i, + done + + echo -E " +}; + +int signals[] = { +" + for i in $signals + do + echo -E ' '$i, + done + + # Use -E because on some systems bash builtin interprets \n itself. + echo -E ' +}; + +static int +intcmp(const void *a, const void *b) +{ + return *(int*)a - *(int*)b; +} + +int +main(void) +{ + int i, j, e; + char buf[1024], *p; + + printf("\n\n// Error table\n"); + printf("var errors = [...]string {\n"); + qsort(errors, nelem(errors), sizeof errors[0], intcmp); + for(i=0; i 0 && errors[i-1] == e) + continue; + strcpy(buf, strerror(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + printf("\n\n// Signal table\n"); + printf("var signals = [...]string {\n"); + qsort(signals, nelem(signals), sizeof signals[0], intcmp); + for(i=0; i 0 && signals[i-1] == e) + continue; + strcpy(buf, strsignal(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + // cut trailing : number. + p = strrchr(buf, ":"[0]); + if(p) + *p = '\0'; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + return 0; +} + +' +) >_errors.c + +$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh b/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh new file mode 100644 index 00000000..3c3ab058 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +COMMAND="mksysnum_plan9.sh $@" + +cat <= 10 { + buf[i] = byte(val%10 + '0') + i-- + val /= 10 + } + buf[i] = byte(val + '0') + return string(buf[i:]) +} diff --git a/vendor/golang.org/x/sys/plan9/syscall.go b/vendor/golang.org/x/sys/plan9/syscall.go new file mode 100644 index 00000000..d631fd66 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/syscall.go @@ -0,0 +1,109 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build plan9 + +// Package plan9 contains an interface to the low-level operating system +// primitives. OS details vary depending on the underlying system, and +// by default, godoc will display the OS-specific documentation for the current +// system. If you want godoc to display documentation for another +// system, set $GOOS and $GOARCH to the desired system. For example, if +// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS +// to freebsd and $GOARCH to arm. +// +// The primary use of this package is inside other packages that provide a more +// portable interface to the system, such as "os", "time" and "net". Use +// those packages rather than this one if you can. +// +// For details of the functions and data types in this package consult +// the manuals for the appropriate operating system. +// +// These calls return err == nil to indicate success; otherwise +// err represents an operating system error describing the failure and +// holds a value of type syscall.ErrorString. +package plan9 // import "golang.org/x/sys/plan9" + +import ( + "bytes" + "strings" + "unsafe" +) + +// ByteSliceFromString returns a NUL-terminated slice of bytes +// containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func ByteSliceFromString(s string) ([]byte, error) { + if strings.IndexByte(s, 0) != -1 { + return nil, EINVAL + } + a := make([]byte, len(s)+1) + copy(a, s) + return a, nil +} + +// BytePtrFromString returns a pointer to a NUL-terminated array of +// bytes containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func BytePtrFromString(s string) (*byte, error) { + a, err := ByteSliceFromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any +// bytes after the NUL removed. +func ByteSliceToString(s []byte) string { + if i := bytes.IndexByte(s, 0); i != -1 { + s = s[:i] + } + return string(s) +} + +// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. +// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated +// at a zero byte; if the zero byte is not present, the program may crash. +func BytePtrToString(p *byte) string { + if p == nil { + return "" + } + if *p == 0 { + return "" + } + + // Find NUL terminator. + n := 0 + for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ { + ptr = unsafe.Pointer(uintptr(ptr) + 1) + } + + return string(unsafe.Slice(p, n)) +} + +// Single-word zero for use when we need a valid pointer to 0 bytes. +// See mksyscall.pl. +var _zero uintptr + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} + +func (ts *Timespec) Nano() int64 { + return int64(ts.Sec)*1e9 + int64(ts.Nsec) +} + +func (tv *Timeval) Nano() int64 { + return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 +} + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +// +//go:noescape +func use(p unsafe.Pointer) diff --git a/vendor/golang.org/x/sys/plan9/syscall_plan9.go b/vendor/golang.org/x/sys/plan9/syscall_plan9.go new file mode 100644 index 00000000..d079d811 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/syscall_plan9.go @@ -0,0 +1,361 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Plan 9 system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and +// wrap it in our own nicer implementation. + +package plan9 + +import ( + "bytes" + "syscall" + "unsafe" +) + +// A Note is a string describing a process note. +// It implements the os.Signal interface. +type Note string + +func (n Note) Signal() {} + +func (n Note) String() string { + return string(n) +} + +var ( + Stdin = 0 + Stdout = 1 + Stderr = 2 +) + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.ErrorString) +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.ErrorString) +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) + +func atoi(b []byte) (n uint) { + n = 0 + for i := 0; i < len(b); i++ { + n = n*10 + uint(b[i]-'0') + } + return +} + +func cstring(s []byte) string { + i := bytes.IndexByte(s, 0) + if i == -1 { + i = len(s) + } + return string(s[:i]) +} + +func errstr() string { + var buf [ERRMAX]byte + + RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0) + + buf[len(buf)-1] = 0 + return cstring(buf[:]) +} + +// Implemented in assembly to import from runtime. +func exit(code int) + +func Exit(code int) { exit(code) } + +func readnum(path string) (uint, error) { + var b [12]byte + + fd, e := Open(path, O_RDONLY) + if e != nil { + return 0, e + } + defer Close(fd) + + n, e := Pread(fd, b[:], 0) + + if e != nil { + return 0, e + } + + m := 0 + for ; m < n && b[m] == ' '; m++ { + } + + return atoi(b[m : n-1]), nil +} + +func Getpid() (pid int) { + n, _ := readnum("#c/pid") + return int(n) +} + +func Getppid() (ppid int) { + n, _ := readnum("#c/ppid") + return int(n) +} + +func Read(fd int, p []byte) (n int, err error) { + return Pread(fd, p, -1) +} + +func Write(fd int, p []byte) (n int, err error) { + return Pwrite(fd, p, -1) +} + +var ioSync int64 + +//sys fd2path(fd int, buf []byte) (err error) + +func Fd2path(fd int) (path string, err error) { + var buf [512]byte + + e := fd2path(fd, buf[:]) + if e != nil { + return "", e + } + return cstring(buf[:]), nil +} + +//sys pipe(p *[2]int32) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return syscall.ErrorString("bad arg in system call") + } + var pp [2]int32 + err = pipe(&pp) + if err == nil { + p[0] = int(pp[0]) + p[1] = int(pp[1]) + } + return +} + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, e := seek(0, fd, offset, whence) + + if newoffset == -1 { + err = syscall.ErrorString(e) + } + return +} + +func Mkdir(path string, mode uint32) (err error) { + fd, err := Create(path, O_RDONLY, DMDIR|mode) + + if fd != -1 { + Close(fd) + } + + return +} + +type Waitmsg struct { + Pid int + Time [3]uint32 + Msg string +} + +func (w Waitmsg) Exited() bool { return true } +func (w Waitmsg) Signaled() bool { return false } + +func (w Waitmsg) ExitStatus() int { + if len(w.Msg) == 0 { + // a normal exit returns no message + return 0 + } + return 1 +} + +//sys await(s []byte) (n int, err error) + +func Await(w *Waitmsg) (err error) { + var buf [512]byte + var f [5][]byte + + n, err := await(buf[:]) + + if err != nil || w == nil { + return + } + + nf := 0 + p := 0 + for i := 0; i < n && nf < len(f)-1; i++ { + if buf[i] == ' ' { + f[nf] = buf[p:i] + p = i + 1 + nf++ + } + } + f[nf] = buf[p:] + nf++ + + if nf != len(f) { + return syscall.ErrorString("invalid wait message") + } + w.Pid = int(atoi(f[0])) + w.Time[0] = uint32(atoi(f[1])) + w.Time[1] = uint32(atoi(f[2])) + w.Time[2] = uint32(atoi(f[3])) + w.Msg = cstring(f[4]) + if w.Msg == "''" { + // await() returns '' for no error + w.Msg = "" + } + return +} + +func Unmount(name, old string) (err error) { + fixwd() + oldp, err := BytePtrFromString(old) + if err != nil { + return err + } + oldptr := uintptr(unsafe.Pointer(oldp)) + + var r0 uintptr + var e syscall.ErrorString + + // bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted. + if name == "" { + r0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0) + } else { + namep, err := BytePtrFromString(name) + if err != nil { + return err + } + r0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0) + } + + if int32(r0) == -1 { + err = e + } + return +} + +func Fchdir(fd int) (err error) { + path, err := Fd2path(fd) + + if err != nil { + return + } + + return Chdir(path) +} + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +func nsec() int64 { + var scratch int64 + + r0, _, _ := Syscall(SYS_NSEC, uintptr(unsafe.Pointer(&scratch)), 0, 0) + // TODO(aram): remove hack after I fix _nsec in the pc64 kernel. + if r0 == 0 { + return scratch + } + return int64(r0) +} + +func Gettimeofday(tv *Timeval) error { + nsec := nsec() + *tv = NsecToTimeval(nsec) + return nil +} + +func Getpagesize() int { return 0x1000 } + +func Getegid() (egid int) { return -1 } +func Geteuid() (euid int) { return -1 } +func Getgid() (gid int) { return -1 } +func Getuid() (uid int) { return -1 } + +func Getgroups() (gids []int, err error) { + return make([]int, 0), nil +} + +//sys open(path string, mode int) (fd int, err error) + +func Open(path string, mode int) (fd int, err error) { + fixwd() + return open(path, mode) +} + +//sys create(path string, mode int, perm uint32) (fd int, err error) + +func Create(path string, mode int, perm uint32) (fd int, err error) { + fixwd() + return create(path, mode, perm) +} + +//sys remove(path string) (err error) + +func Remove(path string) error { + fixwd() + return remove(path) +} + +//sys stat(path string, edir []byte) (n int, err error) + +func Stat(path string, edir []byte) (n int, err error) { + fixwd() + return stat(path, edir) +} + +//sys bind(name string, old string, flag int) (err error) + +func Bind(name string, old string, flag int) (err error) { + fixwd() + return bind(name, old, flag) +} + +//sys mount(fd int, afd int, old string, flag int, aname string) (err error) + +func Mount(fd int, afd int, old string, flag int, aname string) (err error) { + fixwd() + return mount(fd, afd, old, flag, aname) +} + +//sys wstat(path string, edir []byte) (err error) + +func Wstat(path string, edir []byte) (err error) { + fixwd() + return wstat(path, edir) +} + +//sys chdir(path string) (err error) +//sys Dup(oldfd int, newfd int) (fd int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys Close(fd int) (err error) +//sys Fstat(fd int, edir []byte) (n int, err error) +//sys Fwstat(fd int, edir []byte) (err error) diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go new file mode 100644 index 00000000..f780d5c8 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go @@ -0,0 +1,284 @@ +// go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +//go:build plan9 && 386 + +package plan9 + +import "unsafe" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fd2path(fd int, buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]int32) (err error) { + r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func await(s []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(s) > 0 { + _p0 = unsafe.Pointer(&s[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func open(path string, mode int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func create(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func remove(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, edir []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(name string, old string, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(old) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(fd int, afd int, old string, flag int, aname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(old) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(aname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wstat(path string, edir []byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int, newfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, edir []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fwstat(fd int, edir []byte) (err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go new file mode 100644 index 00000000..7de61065 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go @@ -0,0 +1,284 @@ +// go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +//go:build plan9 && amd64 + +package plan9 + +import "unsafe" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fd2path(fd int, buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]int32) (err error) { + r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func await(s []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(s) > 0 { + _p0 = unsafe.Pointer(&s[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func open(path string, mode int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func create(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func remove(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, edir []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(name string, old string, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(old) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(fd int, afd int, old string, flag int, aname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(old) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(aname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wstat(path string, edir []byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int, newfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, edir []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fwstat(fd int, edir []byte) (err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go new file mode 100644 index 00000000..ea85780f --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go @@ -0,0 +1,284 @@ +// go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +//go:build plan9 && arm + +package plan9 + +import "unsafe" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fd2path(fd int, buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]int32) (err error) { + r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func await(s []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(s) > 0 { + _p0 = unsafe.Pointer(&s[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func open(path string, mode int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func create(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func remove(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, edir []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(name string, old string, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(old) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(fd int, afd int, old string, flag int, aname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(old) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(aname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wstat(path string, edir []byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int, newfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, edir []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fwstat(fd int, edir []byte) (err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go b/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go new file mode 100644 index 00000000..22e8abd4 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go @@ -0,0 +1,49 @@ +// mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +package plan9 + +const ( + SYS_SYSR1 = 0 + SYS_BIND = 2 + SYS_CHDIR = 3 + SYS_CLOSE = 4 + SYS_DUP = 5 + SYS_ALARM = 6 + SYS_EXEC = 7 + SYS_EXITS = 8 + SYS_FAUTH = 10 + SYS_SEGBRK = 12 + SYS_OPEN = 14 + SYS_OSEEK = 16 + SYS_SLEEP = 17 + SYS_RFORK = 19 + SYS_PIPE = 21 + SYS_CREATE = 22 + SYS_FD2PATH = 23 + SYS_BRK_ = 24 + SYS_REMOVE = 25 + SYS_NOTIFY = 28 + SYS_NOTED = 29 + SYS_SEGATTACH = 30 + SYS_SEGDETACH = 31 + SYS_SEGFREE = 32 + SYS_SEGFLUSH = 33 + SYS_RENDEZVOUS = 34 + SYS_UNMOUNT = 35 + SYS_SEMACQUIRE = 37 + SYS_SEMRELEASE = 38 + SYS_SEEK = 39 + SYS_FVERSION = 40 + SYS_ERRSTR = 41 + SYS_STAT = 42 + SYS_FSTAT = 43 + SYS_WSTAT = 44 + SYS_FWSTAT = 45 + SYS_MOUNT = 46 + SYS_AWAIT = 47 + SYS_PREAD = 50 + SYS_PWRITE = 51 + SYS_TSEMACQUIRE = 52 + SYS_NSEC = 53 +) diff --git a/vendor/golang.org/x/term/CONTRIBUTING.md b/vendor/golang.org/x/term/CONTRIBUTING.md new file mode 100644 index 00000000..d0485e88 --- /dev/null +++ b/vendor/golang.org/x/term/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to Go + +Go is an open source project. + +It is the work of hundreds of contributors. We appreciate your help! + +## Filing issues + +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: + +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + +General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. +The gophers there will answer or ask you to file an issue if you've tripped over a bug. + +## Contributing code + +Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) +before sending patches. + +Unless otherwise noted, the Go source files are distributed under +the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/term/LICENSE b/vendor/golang.org/x/term/LICENSE new file mode 100644 index 00000000..2a7cf70d --- /dev/null +++ b/vendor/golang.org/x/term/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/term/PATENTS b/vendor/golang.org/x/term/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/vendor/golang.org/x/term/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/term/README.md b/vendor/golang.org/x/term/README.md new file mode 100644 index 00000000..05ff623f --- /dev/null +++ b/vendor/golang.org/x/term/README.md @@ -0,0 +1,16 @@ +# Go terminal/console support + +[![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) + +This repository provides Go terminal and console support packages. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://go.dev/doc/contribute. + +The git repository is https://go.googlesource.com/term. + +The main issue tracker for the term repository is located at +https://go.dev/issues. Prefix your issue with "x/term:" in the +subject line, so it is easy to find. diff --git a/vendor/golang.org/x/term/codereview.cfg b/vendor/golang.org/x/term/codereview.cfg new file mode 100644 index 00000000..3f8b14b6 --- /dev/null +++ b/vendor/golang.org/x/term/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/term/term.go b/vendor/golang.org/x/term/term.go new file mode 100644 index 00000000..1a40d101 --- /dev/null +++ b/vendor/golang.org/x/term/term.go @@ -0,0 +1,60 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package term provides support functions for dealing with terminals, as +// commonly found on UNIX systems. +// +// Putting a terminal into raw mode is the most common requirement: +// +// oldState, err := term.MakeRaw(int(os.Stdin.Fd())) +// if err != nil { +// panic(err) +// } +// defer term.Restore(int(os.Stdin.Fd()), oldState) +// +// Note that on non-Unix systems os.Stdin.Fd() may not be 0. +package term + +// State contains the state of a terminal. +type State struct { + state +} + +// IsTerminal returns whether the given file descriptor is a terminal. +func IsTerminal(fd int) bool { + return isTerminal(fd) +} + +// MakeRaw puts the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd int) (*State, error) { + return makeRaw(fd) +} + +// GetState returns the current state of a terminal which may be useful to +// restore the terminal after a signal. +func GetState(fd int) (*State, error) { + return getState(fd) +} + +// Restore restores the terminal connected to the given file descriptor to a +// previous state. +func Restore(fd int, oldState *State) error { + return restore(fd, oldState) +} + +// GetSize returns the visible dimensions of the given terminal. +// +// These dimensions don't include any scrollback buffer height. +func GetSize(fd int) (width, height int, err error) { + return getSize(fd) +} + +// ReadPassword reads a line of input from a terminal without local echo. This +// is commonly used for inputting passwords and other sensitive data. The slice +// returned does not include the \n. +func ReadPassword(fd int) ([]byte, error) { + return readPassword(fd) +} diff --git a/vendor/golang.org/x/term/term_plan9.go b/vendor/golang.org/x/term/term_plan9.go new file mode 100644 index 00000000..21afa55c --- /dev/null +++ b/vendor/golang.org/x/term/term_plan9.go @@ -0,0 +1,42 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package term + +import ( + "fmt" + "runtime" + + "golang.org/x/sys/plan9" +) + +type state struct{} + +func isTerminal(fd int) bool { + path, err := plan9.Fd2path(fd) + if err != nil { + return false + } + return path == "/dev/cons" || path == "/mnt/term/dev/cons" +} + +func makeRaw(fd int) (*State, error) { + return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func getState(fd int) (*State, error) { + return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func restore(fd int, state *State) error { + return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func getSize(fd int) (width, height int, err error) { + return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func readPassword(fd int) ([]byte, error) { + return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} diff --git a/vendor/golang.org/x/term/term_unix.go b/vendor/golang.org/x/term/term_unix.go new file mode 100644 index 00000000..1ad0ddfe --- /dev/null +++ b/vendor/golang.org/x/term/term_unix.go @@ -0,0 +1,91 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos + +package term + +import ( + "golang.org/x/sys/unix" +) + +type state struct { + termios unix.Termios +} + +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil +} + +func makeRaw(fd int) (*State, error) { + termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { + return nil, err + } + + oldState := State{state{termios: *termios}} + + // This attempts to replicate the behaviour documented for cfmakeraw in + // the termios(3) manpage. + termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON + termios.Oflag &^= unix.OPOST + termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN + termios.Cflag &^= unix.CSIZE | unix.PARENB + termios.Cflag |= unix.CS8 + termios.Cc[unix.VMIN] = 1 + termios.Cc[unix.VTIME] = 0 + if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil { + return nil, err + } + + return &oldState, nil +} + +func getState(fd int) (*State, error) { + termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { + return nil, err + } + + return &State{state{termios: *termios}}, nil +} + +func restore(fd int, state *State) error { + return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios) +} + +func getSize(fd int) (width, height int, err error) { + ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) + if err != nil { + return 0, 0, err + } + return int(ws.Col), int(ws.Row), nil +} + +// passwordReader is an io.Reader that reads from a specific file descriptor. +type passwordReader int + +func (r passwordReader) Read(buf []byte) (int, error) { + return unix.Read(int(r), buf) +} + +func readPassword(fd int) ([]byte, error) { + termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { + return nil, err + } + + newState := *termios + newState.Lflag &^= unix.ECHO + newState.Lflag |= unix.ICANON | unix.ISIG + newState.Iflag |= unix.ICRNL + if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil { + return nil, err + } + + defer unix.IoctlSetTermios(fd, ioctlWriteTermios, termios) + + return readPasswordLine(passwordReader(fd)) +} diff --git a/vendor/golang.org/x/term/term_unix_bsd.go b/vendor/golang.org/x/term/term_unix_bsd.go new file mode 100644 index 00000000..9dbf5462 --- /dev/null +++ b/vendor/golang.org/x/term/term_unix_bsd.go @@ -0,0 +1,12 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build darwin || dragonfly || freebsd || netbsd || openbsd + +package term + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TIOCGETA +const ioctlWriteTermios = unix.TIOCSETA diff --git a/vendor/golang.org/x/term/term_unix_other.go b/vendor/golang.org/x/term/term_unix_other.go new file mode 100644 index 00000000..1b36de79 --- /dev/null +++ b/vendor/golang.org/x/term/term_unix_other.go @@ -0,0 +1,12 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build aix || linux || solaris || zos + +package term + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS +const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/golang.org/x/term/term_unsupported.go b/vendor/golang.org/x/term/term_unsupported.go new file mode 100644 index 00000000..3c409e58 --- /dev/null +++ b/vendor/golang.org/x/term/term_unsupported.go @@ -0,0 +1,38 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9 + +package term + +import ( + "fmt" + "runtime" +) + +type state struct{} + +func isTerminal(fd int) bool { + return false +} + +func makeRaw(fd int) (*State, error) { + return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func getState(fd int) (*State, error) { + return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func restore(fd int, state *State) error { + return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func getSize(fd int) (width, height int, err error) { + return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} + +func readPassword(fd int) ([]byte, error) { + return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) +} diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go new file mode 100644 index 00000000..df6bf948 --- /dev/null +++ b/vendor/golang.org/x/term/term_windows.go @@ -0,0 +1,80 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package term + +import ( + "os" + + "golang.org/x/sys/windows" +) + +type state struct { + mode uint32 +} + +func isTerminal(fd int) bool { + var st uint32 + err := windows.GetConsoleMode(windows.Handle(fd), &st) + return err == nil +} + +func makeRaw(fd int) (*State, error) { + var st uint32 + if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { + return nil, err + } + raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT + if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { + return nil, err + } + return &State{state{st}}, nil +} + +func getState(fd int) (*State, error) { + var st uint32 + if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { + return nil, err + } + return &State{state{st}}, nil +} + +func restore(fd int, state *State) error { + return windows.SetConsoleMode(windows.Handle(fd), state.mode) +} + +func getSize(fd int) (width, height int, err error) { + var info windows.ConsoleScreenBufferInfo + if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { + return 0, 0, err + } + return int(info.Window.Right - info.Window.Left + 1), int(info.Window.Bottom - info.Window.Top + 1), nil +} + +func readPassword(fd int) ([]byte, error) { + var st uint32 + if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { + return nil, err + } + old := st + + st &^= (windows.ENABLE_ECHO_INPUT | windows.ENABLE_LINE_INPUT) + st |= (windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_PROCESSED_INPUT) + if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil { + return nil, err + } + + defer windows.SetConsoleMode(windows.Handle(fd), old) + + var h windows.Handle + p, _ := windows.GetCurrentProcess() + if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil { + return nil, err + } + + f := os.NewFile(uintptr(h), "stdin") + defer f.Close() + return readPasswordLine(f) +} diff --git a/vendor/golang.org/x/term/terminal.go b/vendor/golang.org/x/term/terminal.go new file mode 100644 index 00000000..14f89470 --- /dev/null +++ b/vendor/golang.org/x/term/terminal.go @@ -0,0 +1,995 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package term + +import ( + "bytes" + "io" + "runtime" + "strconv" + "sync" + "unicode/utf8" +) + +// EscapeCodes contains escape sequences that can be written to the terminal in +// order to achieve different styles of text. +type EscapeCodes struct { + // Foreground colors + Black, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte + + // Reset all attributes + Reset []byte +} + +var vt100EscapeCodes = EscapeCodes{ + Black: []byte{keyEscape, '[', '3', '0', 'm'}, + Red: []byte{keyEscape, '[', '3', '1', 'm'}, + Green: []byte{keyEscape, '[', '3', '2', 'm'}, + Yellow: []byte{keyEscape, '[', '3', '3', 'm'}, + Blue: []byte{keyEscape, '[', '3', '4', 'm'}, + Magenta: []byte{keyEscape, '[', '3', '5', 'm'}, + Cyan: []byte{keyEscape, '[', '3', '6', 'm'}, + White: []byte{keyEscape, '[', '3', '7', 'm'}, + + Reset: []byte{keyEscape, '[', '0', 'm'}, +} + +// Terminal contains the state for running a VT100 terminal that is capable of +// reading lines of input. +type Terminal struct { + // AutoCompleteCallback, if non-null, is called for each keypress with + // the full input line and the current position of the cursor (in + // bytes, as an index into |line|). If it returns ok=false, the key + // press is processed normally. Otherwise it returns a replacement line + // and the new cursor position. + // + // This will be disabled during ReadPassword. + AutoCompleteCallback func(line string, pos int, key rune) (newLine string, newPos int, ok bool) + + // Escape contains a pointer to the escape codes for this terminal. + // It's always a valid pointer, although the escape codes themselves + // may be empty if the terminal doesn't support them. + Escape *EscapeCodes + + // lock protects the terminal and the state in this object from + // concurrent processing of a key press and a Write() call. + lock sync.Mutex + + c io.ReadWriter + prompt []rune + + // line is the current line being entered. + line []rune + // pos is the logical position of the cursor in line + pos int + // echo is true if local echo is enabled + echo bool + // pasteActive is true iff there is a bracketed paste operation in + // progress. + pasteActive bool + + // cursorX contains the current X value of the cursor where the left + // edge is 0. cursorY contains the row number where the first row of + // the current line is 0. + cursorX, cursorY int + // maxLine is the greatest value of cursorY so far. + maxLine int + + termWidth, termHeight int + + // outBuf contains the terminal data to be sent. + outBuf []byte + // remainder contains the remainder of any partial key sequences after + // a read. It aliases into inBuf. + remainder []byte + inBuf [256]byte + + // history contains previously entered commands so that they can be + // accessed with the up and down keys. + history stRingBuffer + // historyIndex stores the currently accessed history entry, where zero + // means the immediately previous entry. + historyIndex int + // When navigating up and down the history it's possible to return to + // the incomplete, initial line. That value is stored in + // historyPending. + historyPending string +} + +// NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is +// a local terminal, that terminal must first have been put into raw mode. +// prompt is a string that is written at the start of each input line (i.e. +// "> "). +func NewTerminal(c io.ReadWriter, prompt string) *Terminal { + return &Terminal{ + Escape: &vt100EscapeCodes, + c: c, + prompt: []rune(prompt), + termWidth: 80, + termHeight: 24, + echo: true, + historyIndex: -1, + } +} + +const ( + keyCtrlC = 3 + keyCtrlD = 4 + keyCtrlU = 21 + keyEnter = '\r' + keyEscape = 27 + keyBackspace = 127 + keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota + keyUp + keyDown + keyLeft + keyRight + keyAltLeft + keyAltRight + keyHome + keyEnd + keyDeleteWord + keyDeleteLine + keyClearScreen + keyPasteStart + keyPasteEnd +) + +var ( + crlf = []byte{'\r', '\n'} + pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'} + pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'} +) + +// bytesToKey tries to parse a key sequence from b. If successful, it returns +// the key and the remainder of the input. Otherwise it returns utf8.RuneError. +func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { + if len(b) == 0 { + return utf8.RuneError, nil + } + + if !pasteActive { + switch b[0] { + case 1: // ^A + return keyHome, b[1:] + case 2: // ^B + return keyLeft, b[1:] + case 5: // ^E + return keyEnd, b[1:] + case 6: // ^F + return keyRight, b[1:] + case 8: // ^H + return keyBackspace, b[1:] + case 11: // ^K + return keyDeleteLine, b[1:] + case 12: // ^L + return keyClearScreen, b[1:] + case 23: // ^W + return keyDeleteWord, b[1:] + case 14: // ^N + return keyDown, b[1:] + case 16: // ^P + return keyUp, b[1:] + } + } + + if b[0] != keyEscape { + if !utf8.FullRune(b) { + return utf8.RuneError, b + } + r, l := utf8.DecodeRune(b) + return r, b[l:] + } + + if !pasteActive && len(b) >= 3 && b[0] == keyEscape && b[1] == '[' { + switch b[2] { + case 'A': + return keyUp, b[3:] + case 'B': + return keyDown, b[3:] + case 'C': + return keyRight, b[3:] + case 'D': + return keyLeft, b[3:] + case 'H': + return keyHome, b[3:] + case 'F': + return keyEnd, b[3:] + } + } + + if !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' { + switch b[5] { + case 'C': + return keyAltRight, b[6:] + case 'D': + return keyAltLeft, b[6:] + } + } + + if !pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteStart) { + return keyPasteStart, b[6:] + } + + if pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteEnd) { + return keyPasteEnd, b[6:] + } + + // If we get here then we have a key that we don't recognise, or a + // partial sequence. It's not clear how one should find the end of a + // sequence without knowing them all, but it seems that [a-zA-Z~] only + // appears at the end of a sequence. + for i, c := range b[0:] { + if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '~' { + return keyUnknown, b[i+1:] + } + } + + return utf8.RuneError, b +} + +// queue appends data to the end of t.outBuf +func (t *Terminal) queue(data []rune) { + t.outBuf = append(t.outBuf, []byte(string(data))...) +} + +var space = []rune{' '} + +func isPrintable(key rune) bool { + isInSurrogateArea := key >= 0xd800 && key <= 0xdbff + return key >= 32 && !isInSurrogateArea +} + +// moveCursorToPos appends data to t.outBuf which will move the cursor to the +// given, logical position in the text. +func (t *Terminal) moveCursorToPos(pos int) { + if !t.echo { + return + } + + x := visualLength(t.prompt) + pos + y := x / t.termWidth + x = x % t.termWidth + + up := 0 + if y < t.cursorY { + up = t.cursorY - y + } + + down := 0 + if y > t.cursorY { + down = y - t.cursorY + } + + left := 0 + if x < t.cursorX { + left = t.cursorX - x + } + + right := 0 + if x > t.cursorX { + right = x - t.cursorX + } + + t.cursorX = x + t.cursorY = y + t.move(up, down, left, right) +} + +func (t *Terminal) move(up, down, left, right int) { + m := []rune{} + + // 1 unit up can be expressed as ^[[A or ^[A + // 5 units up can be expressed as ^[[5A + + if up == 1 { + m = append(m, keyEscape, '[', 'A') + } else if up > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(up))...) + m = append(m, 'A') + } + + if down == 1 { + m = append(m, keyEscape, '[', 'B') + } else if down > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(down))...) + m = append(m, 'B') + } + + if right == 1 { + m = append(m, keyEscape, '[', 'C') + } else if right > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(right))...) + m = append(m, 'C') + } + + if left == 1 { + m = append(m, keyEscape, '[', 'D') + } else if left > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(left))...) + m = append(m, 'D') + } + + t.queue(m) +} + +func (t *Terminal) clearLineToRight() { + op := []rune{keyEscape, '[', 'K'} + t.queue(op) +} + +const maxLineLength = 4096 + +func (t *Terminal) setLine(newLine []rune, newPos int) { + if t.echo { + t.moveCursorToPos(0) + t.writeLine(newLine) + for i := len(newLine); i < len(t.line); i++ { + t.writeLine(space) + } + t.moveCursorToPos(newPos) + } + t.line = newLine + t.pos = newPos +} + +func (t *Terminal) advanceCursor(places int) { + t.cursorX += places + t.cursorY += t.cursorX / t.termWidth + if t.cursorY > t.maxLine { + t.maxLine = t.cursorY + } + t.cursorX = t.cursorX % t.termWidth + + if places > 0 && t.cursorX == 0 { + // Normally terminals will advance the current position + // when writing a character. But that doesn't happen + // for the last character in a line. However, when + // writing a character (except a new line) that causes + // a line wrap, the position will be advanced two + // places. + // + // So, if we are stopping at the end of a line, we + // need to write a newline so that our cursor can be + // advanced to the next line. + t.outBuf = append(t.outBuf, '\r', '\n') + } +} + +func (t *Terminal) eraseNPreviousChars(n int) { + if n == 0 { + return + } + + if t.pos < n { + n = t.pos + } + t.pos -= n + t.moveCursorToPos(t.pos) + + copy(t.line[t.pos:], t.line[n+t.pos:]) + t.line = t.line[:len(t.line)-n] + if t.echo { + t.writeLine(t.line[t.pos:]) + for i := 0; i < n; i++ { + t.queue(space) + } + t.advanceCursor(n) + t.moveCursorToPos(t.pos) + } +} + +// countToLeftWord returns then number of characters from the cursor to the +// start of the previous word. +func (t *Terminal) countToLeftWord() int { + if t.pos == 0 { + return 0 + } + + pos := t.pos - 1 + for pos > 0 { + if t.line[pos] != ' ' { + break + } + pos-- + } + for pos > 0 { + if t.line[pos] == ' ' { + pos++ + break + } + pos-- + } + + return t.pos - pos +} + +// countToRightWord returns then number of characters from the cursor to the +// start of the next word. +func (t *Terminal) countToRightWord() int { + pos := t.pos + for pos < len(t.line) { + if t.line[pos] == ' ' { + break + } + pos++ + } + for pos < len(t.line) { + if t.line[pos] != ' ' { + break + } + pos++ + } + return pos - t.pos +} + +// visualLength returns the number of visible glyphs in s. +func visualLength(runes []rune) int { + inEscapeSeq := false + length := 0 + + for _, r := range runes { + switch { + case inEscapeSeq: + if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') { + inEscapeSeq = false + } + case r == '\x1b': + inEscapeSeq = true + default: + length++ + } + } + + return length +} + +// handleKey processes the given key and, optionally, returns a line of text +// that the user has entered. +func (t *Terminal) handleKey(key rune) (line string, ok bool) { + if t.pasteActive && key != keyEnter { + t.addKeyToLine(key) + return + } + + switch key { + case keyBackspace: + if t.pos == 0 { + return + } + t.eraseNPreviousChars(1) + case keyAltLeft: + // move left by a word. + t.pos -= t.countToLeftWord() + t.moveCursorToPos(t.pos) + case keyAltRight: + // move right by a word. + t.pos += t.countToRightWord() + t.moveCursorToPos(t.pos) + case keyLeft: + if t.pos == 0 { + return + } + t.pos-- + t.moveCursorToPos(t.pos) + case keyRight: + if t.pos == len(t.line) { + return + } + t.pos++ + t.moveCursorToPos(t.pos) + case keyHome: + if t.pos == 0 { + return + } + t.pos = 0 + t.moveCursorToPos(t.pos) + case keyEnd: + if t.pos == len(t.line) { + return + } + t.pos = len(t.line) + t.moveCursorToPos(t.pos) + case keyUp: + entry, ok := t.history.NthPreviousEntry(t.historyIndex + 1) + if !ok { + return "", false + } + if t.historyIndex == -1 { + t.historyPending = string(t.line) + } + t.historyIndex++ + runes := []rune(entry) + t.setLine(runes, len(runes)) + case keyDown: + switch t.historyIndex { + case -1: + return + case 0: + runes := []rune(t.historyPending) + t.setLine(runes, len(runes)) + t.historyIndex-- + default: + entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1) + if ok { + t.historyIndex-- + runes := []rune(entry) + t.setLine(runes, len(runes)) + } + } + case keyEnter: + t.moveCursorToPos(len(t.line)) + t.queue([]rune("\r\n")) + line = string(t.line) + ok = true + t.line = t.line[:0] + t.pos = 0 + t.cursorX = 0 + t.cursorY = 0 + t.maxLine = 0 + case keyDeleteWord: + // Delete zero or more spaces and then one or more characters. + t.eraseNPreviousChars(t.countToLeftWord()) + case keyDeleteLine: + // Delete everything from the current cursor position to the + // end of line. + for i := t.pos; i < len(t.line); i++ { + t.queue(space) + t.advanceCursor(1) + } + t.line = t.line[:t.pos] + t.moveCursorToPos(t.pos) + case keyCtrlD: + // Erase the character under the current position. + // The EOF case when the line is empty is handled in + // readLine(). + if t.pos < len(t.line) { + t.pos++ + t.eraseNPreviousChars(1) + } + case keyCtrlU: + t.eraseNPreviousChars(t.pos) + case keyClearScreen: + // Erases the screen and moves the cursor to the home position. + t.queue([]rune("\x1b[2J\x1b[H")) + t.queue(t.prompt) + t.cursorX, t.cursorY = 0, 0 + t.advanceCursor(visualLength(t.prompt)) + t.setLine(t.line, t.pos) + default: + if t.AutoCompleteCallback != nil { + prefix := string(t.line[:t.pos]) + suffix := string(t.line[t.pos:]) + + t.lock.Unlock() + newLine, newPos, completeOk := t.AutoCompleteCallback(prefix+suffix, len(prefix), key) + t.lock.Lock() + + if completeOk { + t.setLine([]rune(newLine), utf8.RuneCount([]byte(newLine)[:newPos])) + return + } + } + if !isPrintable(key) { + return + } + if len(t.line) == maxLineLength { + return + } + t.addKeyToLine(key) + } + return +} + +// addKeyToLine inserts the given key at the current position in the current +// line. +func (t *Terminal) addKeyToLine(key rune) { + if len(t.line) == cap(t.line) { + newLine := make([]rune, len(t.line), 2*(1+len(t.line))) + copy(newLine, t.line) + t.line = newLine + } + t.line = t.line[:len(t.line)+1] + copy(t.line[t.pos+1:], t.line[t.pos:]) + t.line[t.pos] = key + if t.echo { + t.writeLine(t.line[t.pos:]) + } + t.pos++ + t.moveCursorToPos(t.pos) +} + +func (t *Terminal) writeLine(line []rune) { + for len(line) != 0 { + remainingOnLine := t.termWidth - t.cursorX + todo := len(line) + if todo > remainingOnLine { + todo = remainingOnLine + } + t.queue(line[:todo]) + t.advanceCursor(visualLength(line[:todo])) + line = line[todo:] + } +} + +// writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n. +func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) { + for len(buf) > 0 { + i := bytes.IndexByte(buf, '\n') + todo := len(buf) + if i >= 0 { + todo = i + } + + var nn int + nn, err = w.Write(buf[:todo]) + n += nn + if err != nil { + return n, err + } + buf = buf[todo:] + + if i >= 0 { + if _, err = w.Write(crlf); err != nil { + return n, err + } + n++ + buf = buf[1:] + } + } + + return n, nil +} + +func (t *Terminal) Write(buf []byte) (n int, err error) { + t.lock.Lock() + defer t.lock.Unlock() + + if t.cursorX == 0 && t.cursorY == 0 { + // This is the easy case: there's nothing on the screen that we + // have to move out of the way. + return writeWithCRLF(t.c, buf) + } + + // We have a prompt and possibly user input on the screen. We + // have to clear it first. + t.move(0 /* up */, 0 /* down */, t.cursorX /* left */, 0 /* right */) + t.cursorX = 0 + t.clearLineToRight() + + for t.cursorY > 0 { + t.move(1 /* up */, 0, 0, 0) + t.cursorY-- + t.clearLineToRight() + } + + if _, err = t.c.Write(t.outBuf); err != nil { + return + } + t.outBuf = t.outBuf[:0] + + if n, err = writeWithCRLF(t.c, buf); err != nil { + return + } + + t.writeLine(t.prompt) + if t.echo { + t.writeLine(t.line) + } + + t.moveCursorToPos(t.pos) + + if _, err = t.c.Write(t.outBuf); err != nil { + return + } + t.outBuf = t.outBuf[:0] + return +} + +// ReadPassword temporarily changes the prompt and reads a password, without +// echo, from the terminal. +// +// The AutoCompleteCallback is disabled during this call. +func (t *Terminal) ReadPassword(prompt string) (line string, err error) { + t.lock.Lock() + defer t.lock.Unlock() + + oldPrompt := t.prompt + t.prompt = []rune(prompt) + t.echo = false + oldAutoCompleteCallback := t.AutoCompleteCallback + t.AutoCompleteCallback = nil + defer func() { + t.AutoCompleteCallback = oldAutoCompleteCallback + }() + + line, err = t.readLine() + + t.prompt = oldPrompt + t.echo = true + + return +} + +// ReadLine returns a line of input from the terminal. +func (t *Terminal) ReadLine() (line string, err error) { + t.lock.Lock() + defer t.lock.Unlock() + + return t.readLine() +} + +func (t *Terminal) readLine() (line string, err error) { + // t.lock must be held at this point + + if t.cursorX == 0 && t.cursorY == 0 { + t.writeLine(t.prompt) + t.c.Write(t.outBuf) + t.outBuf = t.outBuf[:0] + } + + lineIsPasted := t.pasteActive + + for { + rest := t.remainder + lineOk := false + for !lineOk { + var key rune + key, rest = bytesToKey(rest, t.pasteActive) + if key == utf8.RuneError { + break + } + if !t.pasteActive { + if key == keyCtrlD { + if len(t.line) == 0 { + return "", io.EOF + } + } + if key == keyCtrlC { + return "", io.EOF + } + if key == keyPasteStart { + t.pasteActive = true + if len(t.line) == 0 { + lineIsPasted = true + } + continue + } + } else if key == keyPasteEnd { + t.pasteActive = false + continue + } + if !t.pasteActive { + lineIsPasted = false + } + line, lineOk = t.handleKey(key) + } + if len(rest) > 0 { + n := copy(t.inBuf[:], rest) + t.remainder = t.inBuf[:n] + } else { + t.remainder = nil + } + t.c.Write(t.outBuf) + t.outBuf = t.outBuf[:0] + if lineOk { + if t.echo { + t.historyIndex = -1 + t.history.Add(line) + } + if lineIsPasted { + err = ErrPasteIndicator + } + return + } + + // t.remainder is a slice at the beginning of t.inBuf + // containing a partial key sequence + readBuf := t.inBuf[len(t.remainder):] + var n int + + t.lock.Unlock() + n, err = t.c.Read(readBuf) + t.lock.Lock() + + if err != nil { + return + } + + t.remainder = t.inBuf[:n+len(t.remainder)] + } +} + +// SetPrompt sets the prompt to be used when reading subsequent lines. +func (t *Terminal) SetPrompt(prompt string) { + t.lock.Lock() + defer t.lock.Unlock() + + t.prompt = []rune(prompt) +} + +func (t *Terminal) clearAndRepaintLinePlusNPrevious(numPrevLines int) { + // Move cursor to column zero at the start of the line. + t.move(t.cursorY, 0, t.cursorX, 0) + t.cursorX, t.cursorY = 0, 0 + t.clearLineToRight() + for t.cursorY < numPrevLines { + // Move down a line + t.move(0, 1, 0, 0) + t.cursorY++ + t.clearLineToRight() + } + // Move back to beginning. + t.move(t.cursorY, 0, 0, 0) + t.cursorX, t.cursorY = 0, 0 + + t.queue(t.prompt) + t.advanceCursor(visualLength(t.prompt)) + t.writeLine(t.line) + t.moveCursorToPos(t.pos) +} + +func (t *Terminal) SetSize(width, height int) error { + t.lock.Lock() + defer t.lock.Unlock() + + if width == 0 { + width = 1 + } + + oldWidth := t.termWidth + t.termWidth, t.termHeight = width, height + + switch { + case width == oldWidth: + // If the width didn't change then nothing else needs to be + // done. + return nil + case len(t.line) == 0 && t.cursorX == 0 && t.cursorY == 0: + // If there is nothing on current line and no prompt printed, + // just do nothing + return nil + case width < oldWidth: + // Some terminals (e.g. xterm) will truncate lines that were + // too long when shinking. Others, (e.g. gnome-terminal) will + // attempt to wrap them. For the former, repainting t.maxLine + // works great, but that behaviour goes badly wrong in the case + // of the latter because they have doubled every full line. + + // We assume that we are working on a terminal that wraps lines + // and adjust the cursor position based on every previous line + // wrapping and turning into two. This causes the prompt on + // xterms to move upwards, which isn't great, but it avoids a + // huge mess with gnome-terminal. + if t.cursorX >= t.termWidth { + t.cursorX = t.termWidth - 1 + } + t.cursorY *= 2 + t.clearAndRepaintLinePlusNPrevious(t.maxLine * 2) + case width > oldWidth: + // If the terminal expands then our position calculations will + // be wrong in the future because we think the cursor is + // |t.pos| chars into the string, but there will be a gap at + // the end of any wrapped line. + // + // But the position will actually be correct until we move, so + // we can move back to the beginning and repaint everything. + t.clearAndRepaintLinePlusNPrevious(t.maxLine) + } + + _, err := t.c.Write(t.outBuf) + t.outBuf = t.outBuf[:0] + return err +} + +type pasteIndicatorError struct{} + +func (pasteIndicatorError) Error() string { + return "terminal: ErrPasteIndicator not correctly handled" +} + +// ErrPasteIndicator may be returned from ReadLine as the error, in addition +// to valid line data. It indicates that bracketed paste mode is enabled and +// that the returned line consists only of pasted data. Programs may wish to +// interpret pasted data more literally than typed data. +var ErrPasteIndicator = pasteIndicatorError{} + +// SetBracketedPasteMode requests that the terminal bracket paste operations +// with markers. Not all terminals support this but, if it is supported, then +// enabling this mode will stop any autocomplete callback from running due to +// pastes. Additionally, any lines that are completely pasted will be returned +// from ReadLine with the error set to ErrPasteIndicator. +func (t *Terminal) SetBracketedPasteMode(on bool) { + if on { + io.WriteString(t.c, "\x1b[?2004h") + } else { + io.WriteString(t.c, "\x1b[?2004l") + } +} + +// stRingBuffer is a ring buffer of strings. +type stRingBuffer struct { + // entries contains max elements. + entries []string + max int + // head contains the index of the element most recently added to the ring. + head int + // size contains the number of elements in the ring. + size int +} + +func (s *stRingBuffer) Add(a string) { + if s.entries == nil { + const defaultNumEntries = 100 + s.entries = make([]string, defaultNumEntries) + s.max = defaultNumEntries + } + + s.head = (s.head + 1) % s.max + s.entries[s.head] = a + if s.size < s.max { + s.size++ + } +} + +// NthPreviousEntry returns the value passed to the nth previous call to Add. +// If n is zero then the immediately prior value is returned, if one, then the +// next most recent, and so on. If such an element doesn't exist then ok is +// false. +func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) { + if n < 0 || n >= s.size { + return "", false + } + index := s.head - n + if index < 0 { + index += s.max + } + return s.entries[index], true +} + +// readPasswordLine reads from reader until it finds \n or io.EOF. +// The slice returned does not include the \n. +// readPasswordLine also ignores any \r it finds. +// Windows uses \r as end of line. So, on Windows, readPasswordLine +// reads until it finds \r and ignores any \n it finds during processing. +func readPasswordLine(reader io.Reader) ([]byte, error) { + var buf [1]byte + var ret []byte + + for { + n, err := reader.Read(buf[:]) + if n > 0 { + switch buf[0] { + case '\b': + if len(ret) > 0 { + ret = ret[:len(ret)-1] + } + case '\n': + if runtime.GOOS != "windows" { + return ret, nil + } + // otherwise ignore \n + case '\r': + if runtime.GOOS == "windows" { + return ret, nil + } + // otherwise ignore \r + default: + ret = append(ret, buf[0]) + } + continue + } + if err != nil { + if err == io.EOF && len(ret) > 0 { + return ret, nil + } + return ret, err + } + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4b5b4b99..6185519d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -162,7 +162,7 @@ github.com/benbjohnson/clock # github.com/cenkalti/backoff/v4 v4.3.0 ## explicit; go 1.18 github.com/cenkalti/backoff/v4 -# github.com/conductorone/baton-sdk v0.3.7 +# github.com/conductorone/baton-sdk v0.3.28 ## explicit; go 1.23.4 github.com/conductorone/baton-sdk/internal/connector github.com/conductorone/baton-sdk/pb/c1/c1z/v1 @@ -675,6 +675,7 @@ golang.org/x/sync/singleflight # golang.org/x/sys v0.32.0 ## explicit; go 1.23.0 golang.org/x/sys/cpu +golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry @@ -682,6 +683,9 @@ golang.org/x/sys/windows/svc golang.org/x/sys/windows/svc/debug golang.org/x/sys/windows/svc/eventlog golang.org/x/sys/windows/svc/mgr +# golang.org/x/term v0.31.0 +## explicit; go 1.23.0 +golang.org/x/term # golang.org/x/text v0.24.0 ## explicit; go 1.23.0 golang.org/x/text/cases